Click here to Skip to main content
15,925,528 members
Home / Discussions / C#
   

C#

 
GeneralIQueryCancelAutoPlay Pin
myker7-Dec-04 18:26
myker7-Dec-04 18:26 
GeneralRe: IQueryCancelAutoPlay Pin
Daniel Turini7-Dec-04 20:23
Daniel Turini7-Dec-04 20:23 
GeneralRe: IQueryCancelAutoPlay Pin
Heath Stewart8-Dec-04 7:40
protectorHeath Stewart8-Dec-04 7:40 
GeneralRe: IQueryCancelAutoPlay Pin
Daniel Turini8-Dec-04 8:00
Daniel Turini8-Dec-04 8:00 
GeneralRe: IQueryCancelAutoPlay Pin
Heath Stewart8-Dec-04 8:07
protectorHeath Stewart8-Dec-04 8:07 
Questionhow make a mirror printing in c# Pin
bigmega7-Dec-04 17:27
bigmega7-Dec-04 17:27 
AnswerRe: how make a mirror printing in c# Pin
Christian Graus7-Dec-04 18:33
protectorChristian Graus7-Dec-04 18:33 
GeneralProblem with SendMessage() using P/Invoke Pin
Liu Shuai7-Dec-04 17:15
Liu Shuai7-Dec-04 17:15 
GeneralRe: Problem with SendMessage() using P/Invoke Pin
Daniel Turini7-Dec-04 20:02
Daniel Turini7-Dec-04 20:02 
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 
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 
Never store a Graphics object as a field. You either create a temporary Graphics object with CreateGraphics or - when overring OnPaint or handling the Paint event of a different control - use PaintEventArgs.Graphics. Do not store these ever.

The other reply is asking the right question: why are you re-instantiating Graph? It's that object you should be referencing in a field.

The other thing you need to do is read about the MousePosition static property. This returns the screen position - not the client (your control) position, i.e. relative to your control's upper-left coordinate (always 0,0). To translate the coordinates, call Control.PointToClient (reads the SDK documentation that was installed by default when you install VS.NET or the .NET Framework SDK; it's also available online at http://msdn.microsoft.com/library[^]) the compare the coordinates.

This posting is provided "AS IS" with no warranties, and confers no rights.

Software Design Engineer
Developer Division Sustained Engineering
Microsoft

[My Articles] [My Blog]
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 

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.