Click here to Skip to main content
15,893,337 members
Home / Discussions / C#
   

C#

 
GeneralRe: Writing CD/DVD Pin
Kentamanos8-Jan-04 16:51
Kentamanos8-Jan-04 16:51 
GeneralRe: Writing CD/DVD Pin
Christian Graus8-Jan-04 17:08
protectorChristian Graus8-Jan-04 17:08 
GeneralRe: Writing CD/DVD Pin
leppie8-Jan-04 10:21
leppie8-Jan-04 10:21 
GeneralRe: Writing CD/DVD Pin
Christian Graus8-Jan-04 10:36
protectorChristian Graus8-Jan-04 10:36 
Generalprinting custom page sizes Pin
lostegg8-Jan-04 9:06
susslostegg8-Jan-04 9:06 
GeneralRe: printing custom page sizes Pin
Heath Stewart8-Jan-04 11:30
protectorHeath Stewart8-Jan-04 11:30 
GeneralNull error when adding custom control Pin
KingTermite8-Jan-04 8:39
KingTermite8-Jan-04 8:39 
GeneralRe: Null error when adding custom control Pin
Christian Graus8-Jan-04 8:52
protectorChristian Graus8-Jan-04 8:52 
GeneralRe: Null error when adding custom control Pin
KingTermite8-Jan-04 9:00
KingTermite8-Jan-04 9:00 
GeneralRe: Null error when adding custom control Pin
Christian Graus8-Jan-04 9:06
protectorChristian Graus8-Jan-04 9:06 
GeneralRe: Null error when adding custom control Pin
KingTermite8-Jan-04 9:18
KingTermite8-Jan-04 9:18 
GeneralRe: Null error when adding custom control Pin
Kentamanos8-Jan-04 9:19
Kentamanos8-Jan-04 9:19 
GeneralRe: Null error when adding custom control Pin
Christian Graus8-Jan-04 9:29
protectorChristian Graus8-Jan-04 9:29 
GeneralRe: Null error when adding custom control Pin
KingTermite8-Jan-04 9:50
KingTermite8-Jan-04 9:50 
GeneralRe: Null error when adding custom control Pin
Christian Graus8-Jan-04 9:52
protectorChristian Graus8-Jan-04 9:52 
GeneralRe: Null error when adding custom control Pin
KingTermite8-Jan-04 10:49
KingTermite8-Jan-04 10:49 
QuestionHow to use PING utility in my program Pin
HAHAHA_NEXT8-Jan-04 8:34
HAHAHA_NEXT8-Jan-04 8:34 
AnswerRe: How to use PING utility in my program Pin
Kentamanos8-Jan-04 9:18
Kentamanos8-Jan-04 9:18 
GeneralGDI grab handles and mouse move Pin
Miles Roberts8-Jan-04 7:10
Miles Roberts8-Jan-04 7:10 
GeneralRe: GDI grab handles and mouse move Pin
Heath Stewart8-Jan-04 7:36
protectorHeath Stewart8-Jan-04 7:36 
Miles Roberts wrote:
1.Develop Code which allows shape objects to be dragged (moved) and resized by implementing grab handles. Write a key handler such as when the delete key is pushed the shape dissapears.

In order to do this, each shape will have to be an object so that you can individually manage it. In your MouseDown event, determine if a shape exists under the mouse and begin tracking that shape (perhaps a private field that represents the currently dragging shape). In the handler for MouseMove determine if the mouse is down and if an object is being dragged. If so, shift the coordinates of the object be dragged and call Refresh to invalidate your form and repaint those regions (it would actually be better to invalidate the region previously occupied to the whole form doesn't have to repaint). In your MouseUp handler set he new position of the shape and clear the field that tracks the currently dragging shape.

Miles Roberts wrote:
2.Add advanced features such as current co-ordinate position of the mouse.

Actually, this is pretty easy. The MouseEventHandler passed to you in the handler for the MouseMove event contains the X and Y coordinates of the mouse in the coordinate space of the control that raised the event (such as a Form or Panel onto which you're painting your custom shapes). Just use those and display them in a StatusBar or something:
private void myForm_MouseMove(object sender, MouseEventArgs e)
{
  this.statusBar.Text = string.Format("X={0}, Y={1}", e.X, e.Y);
}


 

-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
GeneralRe: GDI grab handles and mouse move Pin
leppie8-Jan-04 8:13
leppie8-Jan-04 8:13 
GeneralDO NOT HELP THIS PERSON WITH HIS HOMEWORK! Pin
leppie8-Jan-04 9:47
leppie8-Jan-04 9:47 
GeneralNon-rectangular Windows :: the 24-bit issue [advanced] Pin
nibmike8-Jan-04 7:07
nibmike8-Jan-04 7:07 
GeneralRe: Non-rectangular Windows :: the 24-bit issue [advanced] Pin
Heath Stewart8-Jan-04 7:29
protectorHeath Stewart8-Jan-04 7:29 
GeneralRe: Non-rectangular Windows :: the 24-bit issue [advanced] Pin
leppie8-Jan-04 8:17
leppie8-Jan-04 8:17 

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.