Click here to Skip to main content
15,921,716 members
Home / Discussions / C#
   

C#

 
GeneralRe: Problem with SendMessage() using P/Invoke Pin
Liu Shuai8-Dec-04 3:35
Liu Shuai8-Dec-04 3:35 
GeneralRe: Problem with SendMessage() using P/Invoke Pin
Daniel Turini8-Dec-04 4:00
Daniel Turini8-Dec-04 4:00 
GeneralRe: Problem with SendMessage() using P/Invoke Pin
Liu Shuai8-Dec-04 5:22
Liu Shuai8-Dec-04 5:22 
GeneralRe: Problem with SendMessage() using P/Invoke Pin
Mike Dimmick8-Dec-04 0:10
Mike Dimmick8-Dec-04 0:10 
GeneralRe: Problem with SendMessage() using P/Invoke Pin
Liu Shuai8-Dec-04 4:09
Liu Shuai8-Dec-04 4:09 
GeneralHELP ME!!! Pin
Jacob Graves7-Dec-04 13:44
Jacob Graves7-Dec-04 13:44 
GeneralRe: HELP ME!!! Pin
Heath Stewart7-Dec-04 14:51
protectorHeath Stewart7-Dec-04 14:51 
GeneralSorry.. Pin
Jacob Graves7-Dec-04 15:10
Jacob Graves7-Dec-04 15:10 
Sorry. I am new at this.

Region is defined in the main form, at the top (private Region region;)
with graphics as a class variable. (private Graphics g;)
Graph is a .cs file that holds the region data, and the Override Paint event instances the method and tells it to paint itself.
Here's more code:

protected override void OnPaint(PaintEventArgs e)
{
Graphics g = e.Graphics;
Graph gr = new Graph();
}
gr.DrawGraph(toolBarMain.Location.X+5,toolBarMain.Size.Height+5,500,500,g);

}
protected override void OnMouseMove(MouseEventArgs e)
{

Graph gr = new Graph();
region = gr.GetRegion();

if(region.GetBounds(g). >= MousePosition.X && region.GetBounds(g).Left <= MousePosition.X)
{
txtXcoord.Text = MousePosition.X.ToString();
}
base.OnMouseMove (e);
}




I didn't call it in OnPaintArgs, but does that matter?
It paints my grid fine, but I want to display the x/y coordinates of my mouse in two text boxes.
I didn't put the 2nd text box in yet because I wanted to make sure that it was working properly.

is this enough info?
GeneralRe: Sorry.. Pin
Jitesh Patil7-Dec-04 21:53
Jitesh Patil7-Dec-04 21:53 
GeneralRe: Sorry.. Pin
Heath Stewart8-Dec-04 5:51
protectorHeath Stewart8-Dec-04 5:51 
GeneralThank you! Pin
Jacob Graves8-Dec-04 7:29
Jacob Graves8-Dec-04 7:29 
GeneralRe: Installing my program on other computers... Pin
Skynyrd7-Dec-04 13:21
Skynyrd7-Dec-04 13:21 
GeneralRe: Installing my program on other computers... Pin
Heath Stewart7-Dec-04 13:32
protectorHeath Stewart7-Dec-04 13:32 
GeneralRe: Installing my program on other computers... Pin
Moochie57-Dec-04 13:36
Moochie57-Dec-04 13:36 
GeneralRe: Installing my program on other computers... Pin
exhaulted7-Dec-04 23:18
exhaulted7-Dec-04 23:18 
GeneralRe: Installing my program on other computers... Pin
Daniel Turini8-Dec-04 1:38
Daniel Turini8-Dec-04 1:38 
GeneralInstalling my program on other computers... Pin
Moochie57-Dec-04 13:14
Moochie57-Dec-04 13:14 
QuestionCombobox in C# : how to add for each Item a Tag ? Pin
youssef7-Dec-04 12:42
youssef7-Dec-04 12:42 
AnswerRe: Combobox in C# : how to add for each Item a Tag ? Pin
Skynyrd7-Dec-04 13:29
Skynyrd7-Dec-04 13:29 
AnswerRe: Combobox in C# : how to add for each Item a Tag ? Pin
Heath Stewart7-Dec-04 14:47
protectorHeath Stewart7-Dec-04 14:47 
AnswerRe: Combobox in C# : how to add for each Item a Tag ? Pin
Luis Alonso Ramos8-Dec-04 21:24
Luis Alonso Ramos8-Dec-04 21:24 
GeneralDynamicInvoke a remote object Pin
Skynyrd7-Dec-04 12:21
Skynyrd7-Dec-04 12:21 
GeneralRe: DynamicInvoke a remote object Pin
Heath Stewart7-Dec-04 14:48
protectorHeath Stewart7-Dec-04 14:48 
GeneralRe: DynamicInvoke a remote object Pin
Skynyrd8-Dec-04 0:57
Skynyrd8-Dec-04 0:57 
GeneralRe: DynamicInvoke a remote object Pin
Javier Lozano7-Dec-04 15:02
Javier Lozano7-Dec-04 15:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.