Click here to Skip to main content
15,886,963 members
Home / Discussions / C#
   

C#

 
GeneralRe: how to Encrypting Class Library Pin
jschell30-Apr-12 8:04
jschell30-Apr-12 8:04 
AnswerRe: how to Encrypting Class Library Pin
harold aptroot29-Apr-12 6:43
harold aptroot29-Apr-12 6:43 
QuestionHow to draw two parallel curves with variable width? Pin
Adnan Yaseen28-Apr-12 13:44
Adnan Yaseen28-Apr-12 13:44 
AnswerRe: How to draw two parallel curves with variable width? Pin
RobCroll28-Apr-12 15:16
RobCroll28-Apr-12 15:16 
GeneralRe: How to draw two parallel curves with variable width? Pin
Adnan Yaseen29-Apr-12 1:41
Adnan Yaseen29-Apr-12 1:41 
GeneralRe: How to draw two parallel curves with variable width? Pin
RobCroll29-Apr-12 12:20
RobCroll29-Apr-12 12:20 
QuestionMoving an object on the form using keyboard Pin
Qobacha27-Apr-12 22:13
Qobacha27-Apr-12 22:13 
AnswerRe: Moving an object on the form using keyboard Pin
OriginalGriff27-Apr-12 23:24
mveOriginalGriff27-Apr-12 23:24 
How you move it is going to depend to a large extent on how you drew it / are drawing it.

The basics are pretty obvious though: two integers, one for X and one for Y. Up key decreases Y value, Down increases it. Left key decreases X, right increases.

But there are three common ways to draw a rectangle:
1) On a panel or similar control. In this case, use the new X and Y values on the Panel.Location to move it.
2) On the form via the Paint event: In your Paint handler, use the X and Y to set the top left position of the rectangle. When you modify X or Y, use the Form.Invalidate method to force a re-draw.
3) On the form via getting a graphics context for the form and using Graphics.DrawReactangle. In this case, don't. Use method 2 instead. Trust me on this!

If you have used another method, tell us what it is!
Ideological Purity is no substitute for being able to stick your thumb down a pipe to stop the water

JokeRe: Moving an object on the form using keyboard Pin
Richard MacCutchan27-Apr-12 23:27
mveRichard MacCutchan27-Apr-12 23:27 
GeneralRe: Moving an object on the form using keyboard Pin
OriginalGriff27-Apr-12 23:30
mveOriginalGriff27-Apr-12 23:30 
JokeRe: Moving an object on the form using keyboard Pin
Richard MacCutchan28-Apr-12 0:01
mveRichard MacCutchan28-Apr-12 0:01 
GeneralRe: Moving an object on the form using keyboard Pin
Qobacha28-Apr-12 7:41
Qobacha28-Apr-12 7:41 
AnswerRe: Moving an object on the form using keyboard Pin
Richard MacCutchan27-Apr-12 23:25
mveRichard MacCutchan27-Apr-12 23:25 
GeneralRe: Moving an object on the form using keyboard Pin
Qobacha28-Apr-12 7:42
Qobacha28-Apr-12 7:42 
AnswerRe: Moving an object on the form using keyboard Pin
PIEBALDconsult28-Apr-12 6:49
mvePIEBALDconsult28-Apr-12 6:49 
AnswerRe: Moving an object on the form using keyboard Pin
Qobacha28-Apr-12 7:44
Qobacha28-Apr-12 7:44 
QuestionMODI OCR In C# Pin
Zeyad Jalil27-Apr-12 21:23
professionalZeyad Jalil27-Apr-12 21:23 
AnswerRe: MODI OCR In C# Pin
Richard Andrew x6428-Apr-12 3:54
professionalRichard Andrew x6428-Apr-12 3:54 
GeneralRe: MODI OCR In C# Pin
Zeyad Jalil28-Apr-12 19:00
professionalZeyad Jalil28-Apr-12 19:00 
QuestionListbox Pin
S Akshay27-Apr-12 16:43
S Akshay27-Apr-12 16:43 
AnswerRe: Listbox Pin
Richard MacCutchan27-Apr-12 23:19
mveRichard MacCutchan27-Apr-12 23:19 
AnswerRe: Listbox Pin
Luc Pattyn28-Apr-12 4:38
sitebuilderLuc Pattyn28-Apr-12 4:38 
AnswerRe: Listbox Pin
BobJanova29-Apr-12 23:21
BobJanova29-Apr-12 23:21 
QuestionActiveX controls are not supported. Pin
Member 872600927-Apr-12 12:01
Member 872600927-Apr-12 12:01 
AnswerRe: ActiveX controls are not supported. Pin
VJ Reddy27-Apr-12 14:02
VJ Reddy27-Apr-12 14: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.