C# :: Mouse View In Picturbox?
Jan 22, 2014
i would like to add a image box to my application which shows a view/picture where ever my mouse is pointing. something like windows magnifier but it must not zoom in anything it must just display in picture box what your pointer is on.
So basically you have a picture box 504, 86 okay in a form when you move your cursor of mouse around desktop what ever you look at it will be visible inside picture box.
This is what i have so far.
private void MainForm_Load(object sender, EventArgs e) {
objPct.Visible = false;
this.Controls.Add(objPct);
}
PictureBox objPct = new PictureBox();
[code].....
View 3 Replies
ADVERTISEMENT
Jul 22, 2014
I have a program I have been working on where the user selects a date and enters the number of days to be viewed in the Calendar.cshtml view. This input renders another view (Update.cshtml) that contains two date picker boxes, one that should contain the selected date and the second one that should contain the calculated date. I am having an issue getting the date selected in the first view to populate to the first date block on the second view as the default and getting the calculated date to populate the second date block in the Update.cshtml view. In addition given the two dates, I would like to generate a calendar, which is why I chose the date picker approach and setting static dates.
Here is my code:
**CalendarController:**
using System.Web.Mvc;
using VanickCalendarApp.Models;
using System;
namespace VanickCalendarApp.Controllers {
public class CalendarController : Controller {
[Code] .....
View 5 Replies
View Related
Jul 10, 2014
I have a listview in my Windows Forms Application and I am having some trouble wrapping my mind around how I can get a number to increment in column 2 for each line item that is added. The reason that I want to do this is because this number will later be added to a set of soft fonts, which requires a unique Font ID.
Here is what I have and where I am stuck.
foreach (string fontFileName in ofd.SafeFileNames){
//Add a line in the list view for each selected file. Don't allow for the same file to appear twice.
if (listView1.FindItemWithText(fontFileName) == null){
listView1.Items.Add(fontFileName);
[Code] ....
View 10 Replies
View Related
Nov 6, 2012
I'm trying to exchange data between doc and view but i can't do it.
I've readed that i need to write AddView but i don't know where.
View 10 Replies
View Related
May 13, 2014
I have a app with doc/view architekture. Is it possible to show/edit a doc of this type also in a CDialog within this app? How can I do that?
View 9 Replies
View Related
Sep 3, 2014
This program is an address book where you caan add/view entries. I'm having a problem printing out entries. Why the information isn't getting saved into the structure array?
Code:
#include <iostream>
#include <string>
using namespace std;
struct contactinfo
[Code] .....
View 1 Replies
View Related
Mar 31, 2014
I am trying to complete this program and as far as I am aware, the only thing not working correctly is populating the listview with my data. I've been stressing over this for a few days and achieving no success. I have to load data from two text files (incidents.txt and technicians.txt), then use a query to populate a listview with all incidents that have been closed. Also, I have to use LINQ for this assignment, so I cannot change anything that would alter my use of that. I'm thinking that perhaps the problem is with my code in form1.cs?Included are all my classes,txt files, etc.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace IncidentsByTechnician {
[Code] ....
Incidents.txt
45|1089|LEAGD10 |12|7/9/2012|7/13/2012|Problem upgrading from League Scheduler 1.0|Program fails with error 303 when trying to install upgrade.
46|1016|TEAM10 |14|7/9/2012|7/12/2012|Unable to restore data from backup|Error 405 encountered while restoring backup: File not found.
47|1034|DRAFT10 |13|7/9/2012||Can't activate product|Product activation code invalid.
48|1049|TRNY20 |11|7/9/2012||Unable to print brackets|Program doesn't recognize printer.
Technicians.txt
11|Alison Diaz
12|Jason Lee
13|Andrew Wilson
14|Gunter Wendt
15|Gina Fiori
View 4 Replies
View Related
Nov 11, 2014
I have been trying to bind an xml response from a web service to a gridview but to no success. bellow is my code
soapInvoker.setMethod("GetAgentProducts");
XDocument AgentproductsRequest = SoapMethods.GetAgentProducts(pin);
XDocument AgentproductsResponse = soapInvoker.CallSoapServiceInternal(AgentproductsRequest);
XDocument xmlDoc = new XDocument(AgentproductsResponse);
var vrresult = from a in xmlDoc.Descendants("product")
[Code] ....
And I always get an error that is not explained dont know whether is coz i bootstrapped my master page or what but all errors caught where there are it shows this Runtime Error
Description: An exception occurred while processing your request. Additionally, another exception occurred while executing the custom error page for the first exception. The request has been terminated.
View 1 Replies
View Related
Apr 8, 2014
I don't really have an issue with the math behind this, rather it's more with the code structure itself. Basically, every row is right, except for the last row. The last row (year) needs to be depreciated by the value at the beginning of the last row (year).
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
[Code]......
View 2 Replies
View Related
Jan 29, 2014
Is it possible to see what usb devices are connected to a hub?
An example would be:
Onboard usb hub:
usb mass storage device
webcam imaging device
superspeed hub:
Mass storage device
Printer
MTD device
I am currently able to get a list of all connected devices with ManagementobjectCollection in C# but that doesn't give me any hierarchy (as far as I am aware).
I am not dead set on C#, I assumed that would be fastest way to get this up and running.
View 2 Replies
View Related
Jul 29, 2013
I'm working on an app which monitors user selected data sets from various devices, and I'd like to display the data in a CListCtrl. This would be very convenient, but I'm just a little concerned about (1) just how fast can a CListCtrl be populated, and (2) how can i reduce or eliminate screen flicker. To be specific...
1. There will likely be upwards of 100 rows of data, maybe more (probably 5 or 6 columns), and I'm going to have to refresh it all as quickly as possible, perhaps as fast as once per second. I can play games and only refresh a visible rectangle, but how responsive the control would be, having all that data deleted and refreshed continually?
2. You can see why I'd be worried about screen flicker, and I thought I'd likely have to make two identical overlapped controls so I could double buffer as I would with a graphic animation, switching the visibility of one or another control after its updated to give the appearance of sudden complete updates. BUT... I see there is an extended style you can set called "LVS_EX_DOUBLEBUFFER"
View 10 Replies
View Related
Jan 18, 2015
In this one program (3 body problem), there are 6 inputs that are scanned (mass, velocity and position of the 2 bodies) and these inputs are computed to arrive at values for x, y and time for the third body. There is a working code that for of extremely small time steps, i.e over 5000 iterations, it produces values for x and y positions of the third body.
I believe this info is sent to an output file since there is a:
FILE* output=fopen("results.out", "w");
I want to play around with the code, insert different values for mass and velocity of the two bodies, but I don't know how to view the results? Im guessing I need to create a results.out file somewhere, but how do I go about doing this?
Do I need to assign memory to the results and then forward that to the output file somehow?
Here is the code : 3body.c
I have a compiler and what not, I'm just unsure how i can get these results out is all.
View 1 Replies
View Related
Dec 23, 2011
i m working on a simple project, i want to populate my text boxes and comboBoxes through DataGridView, means when i double click on cell content then the text boxes are populated.my question is that if i have to populate comboBox with the specific value then what i have to do then because comboBox.selectedItem is an object but my class property is a string..
e.g
combobox shows 30 days in it and my class is Code: class account
{
public string day{set;get}
[Code]....
but that does not happen because "comboBox.selectedItem" is an object so if i have to do that what i have to do then?
View 3 Replies
View Related
Aug 15, 2013
I've been tasked with righting a program that accepts three images and combines them into a panoramic view I'm having trouble getting started?
View 2 Replies
View Related
Feb 6, 2015
How do you calculate the inverse view matrix?
Is that really just the inverse of the view/camera matrix?
Or is that something else?
I have seen articles online on the overall mathematical theory behind it but I am using the GLM math library and it has this nifty glm::inverse() function.
I was just curious if I can do a glm::inverse(ViewMatrix) and that would be correct.
View 2 Replies
View Related
Apr 18, 2014
I need to take a single column and all the rows in the column from a datagridview to a listbox using a for loop. My code is giving me no errors just not showing any data in the listbox.
private void frmProject6_Load(object sender, EventArgs e) {
// TODO: This line of code loads data into the 'enrollmentsDataSet.Enrollments' table. You can move, or remove it, as needed.
this.enrollmentsTableAdapter.Fill(this.enrollmentsDataSet.Enrollments);
[Code] .....
View 1 Replies
View Related
Oct 11, 2014
I've found that with streamwriter(sw) the data isn't displayed with the written to document until you either leave scope or use sw.close I'd prefer to keep sw open as I will be writing to the file in and out, sometimes very frequently, but would also prefer the data to be viewed in real time. Is there an efficient way of going about this?
View 12 Replies
View Related
Oct 10, 2014
On running the following codes I'm getting these errors. I'm using Code Blocks 13.12
void view(string); //error: variable or field 'view' declared void & error: 'string' was not declared in this scope
void customer()
{
char ch;
[Code]....
View 4 Replies
View Related
Oct 6, 2012
I want to display the content of my database in list view. The table has 5 columns however when I tried this code
string view = "Select * from cust_infor";
SqlCommand cmd = new SqlCommand(view,FL.clsconnection.opencon());
SqlDataReader dr = cmd.ExecuteReader();
listView1.Items.Clear();
while (dr.Read()) {
listView1.Items.Add(dr[0].ToString()).SubItems.Add(dr[1].ToString());
}
It limits the display to 2 columns. List view will only show the first 2 columns. The code above won't let me add more indexes or subitems. Only up to 2 columns.
View 1 Replies
View Related
Nov 8, 2014
I am working on a windows application that is for make a time schedule for all staff. i am using two gridview one for all staff names from employee table , and second is for time schedule, time schedule DGV is like 6to7 , 7 to8...12to1,... 5to6 columns . when user will select like 7to8 , 8to9,9to10, columns with holding ctrl key , thn i have to assign some work beteen these time for 3 hours. So i have to get multiple columns from Gridview.
View 1 Replies
View Related
Jun 23, 2013
This is what I try to achieve:
1. Using a CScrollView as the View class type.
2. Using Document/View Architecture.
3. Insert multiple Common Controls such as CEdit, CButton, CListCtrl into the View dynamically.
4. All the Common Controls is base on a template created by user. So I do not know the quantity of the Common Controls.
This is the plan on how to do it:
1. In View OnInitialUpdate(), read the template to get all necessary info on the Common Controls to be create.
2. In View OnInitialUpdate(), create all Common Control. Some Common Control may not have WS_VISIBLE as it may not needed at initial stage.
3. In View OnUpdate(), I need to refresh the Common Control properties such as is its text, position or its visibility. This should happen if Document call UpdateAllView().
My Question:
1. Is this a normal & useable plan?
2. Do I miss other functions for any other messages?
3. Still wondering if I need to involve any coding in OnDraw() for this plan.
View 1 Replies
View Related
Aug 7, 2013
How would I go about selecting a subitem in a listview control with just pure Win32 API? I know it's possible with MFC... but I can't use MFC for this project. Right now, when you click on a subitem , it selects only the first column of the row . I used the following by referring internet. But its not working.
HTML Code:
iSlected=SendMessage(hList,LVM_GETNEXTITEM,-1,LVNI_FOCUSED|LVNI_SELECTED);
ListView_SetItemState(hList,iSlected,LVIS_FOCUSED|LVIS_SELECTED,0x000F);
View 5 Replies
View Related
Nov 3, 2012
My program allow user to draw lines and the user should know the length of the line that he draw in centimeter (.cm)
I did use
SetMapMode(MM_LOMETRIC) function to convert the device units into logical units
and it works correctly but I don't know how the line length will appear to the user to let him draw in correct length
I think to make the length appear on the mouse when the user draw but I don't know how I calculate and display it.
View 2 Replies
View Related
Jul 17, 2013
Is it possible to use a CFormView as the main view without using document support. IE pointing CWinApps m_pMainWnd to the CFrameWnd derived MainFrame and attaching the CFormView from there. It does not seem to be working and I was wondering before I waste any more time on the solution if it is even possible. I know it is an easy solution if I create a true SDI application however I have no use for documents in this application.
View 9 Replies
View Related
Mar 6, 2015
I have an assignment to do a calculator in C, wich will work by clicking the numbers with the mouse, however i have a bug that when i hold the mouse and dragg it, it assumes that I'm clicking multiple times, also, when I click in an empty space the program creates a blank space on the calculator screen.
Code:
#include <stdio.h>
#include <conio.h>
#include <math.h>
#include "..MouseHandler.h" // ajustar o caminho ao seu projecto
#include "..calcSkinLib.h" // ajustar o caminho ao seu projecto
#define PI = 3.1415;
[code]....
View 2 Replies
View Related
Aug 17, 2013
i was trying to write a program in c language which can detect mouse movement, but the program which i have written can only detect the mouse click or scroll the program which i have written given below..
Code:
#include<stdio.h>
#include<string.h>
#include <ncurses.h>
int main() {
}
[code]....
run the programme with linked-lncurses. improve my program which also detect when the mouse moves.
View 1 Replies
View Related