Click here to Skip to main content
15,914,905 members
Home / Discussions / C#
   

C#

 
JokeRe: You did it again my friend! Pin
Luc Pattyn4-Jul-07 10:41
sitebuilderLuc Pattyn4-Jul-07 10:41 
GeneralRe: You did it again my friend! Pin
Christian Graus4-Jul-07 10:57
protectorChristian Graus4-Jul-07 10:57 
GeneralRe: You did it again my friend! Pin
Luc Pattyn4-Jul-07 11:46
sitebuilderLuc Pattyn4-Jul-07 11:46 
GeneralRe: You did it again my friend! Pin
Martin#4-Jul-07 19:47
Martin#4-Jul-07 19:47 
Questionhow to connect to sql Database in VC# 2005 Pin
Xmen Real 4-Jul-07 4:29
professional Xmen Real 4-Jul-07 4:29 
AnswerRe: how to connect to sql Database in VC# 2005 Pin
Ed.Poore4-Jul-07 6:08
Ed.Poore4-Jul-07 6:08 
QuestionDragDrop rectangle Pin
titusworld4-Jul-07 4:25
titusworld4-Jul-07 4:25 
AnswerRe: DragDrop rectangle Pin
Christian Graus4-Jul-07 4:34
protectorChristian Graus4-Jul-07 4:34 
If you're new to C# in general, you may be biting off more than you can chew.

you want to drag and drop a rectangle, the typical way to do this is to handle mouse events to track mouse position and button status, and keep calling Invalidate() in your mouse move after updating the co-ordinates that your OnPaint will use to draw the rectangle. When you finish dragging, you need to store the location, so your onpaint continues to draw it.

Did you also expect to 'pick' a rectangle to drag by clicking on it ? To do that, you work out the co-ordinates of your mouse down and iterate through your list of rectangles, to find out which one the mouse is in.


Christian Graus - Microsoft MVP - C++

"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

GeneralRe: DragDrop rectangle Pin
titusworld4-Jul-07 4:42
titusworld4-Jul-07 4:42 
GeneralRe: DragDrop rectangle Pin
Christian Graus4-Jul-07 5:17
protectorChristian Graus4-Jul-07 5:17 
GeneralRe: DragDrop rectangle Pin
titusworld4-Jul-07 5:24
titusworld4-Jul-07 5:24 
GeneralRe: DragDrop rectangle Pin
Christian Graus4-Jul-07 5:37
protectorChristian Graus4-Jul-07 5:37 
Questionc# Pin
ravilikesaboli4-Jul-07 4:22
ravilikesaboli4-Jul-07 4:22 
AnswerRe: c# Pin
Christian Graus4-Jul-07 4:29
protectorChristian Graus4-Jul-07 4:29 
AnswerRe: c# Pin
J4amieC4-Jul-07 4:50
J4amieC4-Jul-07 4:50 
QuestionQuestion about Streams Pin
RussBus4-Jul-07 4:00
RussBus4-Jul-07 4:00 
QuestionHow do i dock a window to the bottom of the screen? Pin
jafingi4-Jul-07 3:01
jafingi4-Jul-07 3:01 
AnswerRe: How do i dock a window to the bottom of the screen? Pin
Tamimi - Code4-Jul-07 3:27
Tamimi - Code4-Jul-07 3:27 
GeneralRe: How do i dock a window to the bottom of the screen? Pin
jafingi4-Jul-07 3:30
jafingi4-Jul-07 3:30 
GeneralRe: How do i dock a window to the bottom of the screen? Pin
Tamimi - Code4-Jul-07 3:37
Tamimi - Code4-Jul-07 3:37 
GeneralRe: How do i dock a window to the bottom of the screen? Pin
jafingi4-Jul-07 3:47
jafingi4-Jul-07 3:47 
GeneralRe: How do i dock a window to the bottom of the screen? Pin
Martin#4-Jul-07 4:14
Martin#4-Jul-07 4:14 
GeneralRe: How do i dock a window to the bottom of the screen? Pin
jafingi4-Jul-07 4:18
jafingi4-Jul-07 4:18 
AnswerRe: How do i dock a window to the bottom of the screen? Pin
ken.tachyon4-Jul-07 18:25
ken.tachyon4-Jul-07 18:25 
GeneralRe: How do i dock a window to the bottom of the screen? Pin
jafingi4-Jul-07 23:32
jafingi4-Jul-07 23:32 

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.