Click here to Skip to main content
15,891,607 members
Home / Discussions / C#
   

C#

 
GeneralRe: Problem In bind DATAGRIED Pin
shahramkeyboard14-Mar-10 1:41
shahramkeyboard14-Mar-10 1:41 
AnswerRe: Problem In bind DATAGRIED Pin
OriginalGriff14-Mar-10 2:12
mveOriginalGriff14-Mar-10 2:12 
GeneralRe: Problem In bind DATAGRIED Pin
shahramkeyboard14-Mar-10 2:56
shahramkeyboard14-Mar-10 2:56 
GeneralRe: Problem In bind DATAGRIED Pin
OriginalGriff14-Mar-10 3:05
mveOriginalGriff14-Mar-10 3:05 
GeneralRe: Problem In bind DATAGRIED Pin
Luc Pattyn14-Mar-10 3:24
sitebuilderLuc Pattyn14-Mar-10 3:24 
GeneralMessage Closed Pin
14-Mar-10 3:44
stancrm14-Mar-10 3:44 
GeneralRe: Problem In bind DATAGRIED Pin
shahramkeyboard14-Mar-10 4:31
shahramkeyboard14-Mar-10 4:31 
GeneralRe: Problem In bind DATAGRIED Pin
OriginalGriff14-Mar-10 4:51
mveOriginalGriff14-Mar-10 4:51 
GeneralRe: Problem In bind DATAGRIED Pin
shahramkeyboard14-Mar-10 7:15
shahramkeyboard14-Mar-10 7:15 
GeneralRe: Problem In bind DATAGRIED Pin
0x3c014-Mar-10 11:31
0x3c014-Mar-10 11:31 
QuestionCan You Import 1 Finished C# Project Into Another C# Project Pin
Pmarten813-Mar-10 21:26
Pmarten813-Mar-10 21:26 
AnswerRe: Can You Import 1 Finished C# Project Into Another C# Project Pin
Sandeep Mewara13-Mar-10 21:36
mveSandeep Mewara13-Mar-10 21:36 
AnswerRe: Can You Import 1 Finished C# Project Into Another C# Project Pin
OriginalGriff13-Mar-10 22:48
mveOriginalGriff13-Mar-10 22:48 
QuestionForm Header Pin
jojoba201113-Mar-10 19:30
jojoba201113-Mar-10 19:30 
AnswerRe: Form Header Pin
Kristian Sixhøj14-Mar-10 1:25
Kristian Sixhøj14-Mar-10 1:25 
Questionto draw a line parallel to the existing line Pin
v17.poornima13-Mar-10 17:56
v17.poornima13-Mar-10 17:56 
AnswerRe: to draw a line parallel to the existing line Pin
Saksida Bojan13-Mar-10 18:58
Saksida Bojan13-Mar-10 18:58 
GeneralRe: to draw a line parallel to the existing line Pin
v17.poornima14-Mar-10 18:42
v17.poornima14-Mar-10 18:42 
AnswerRe: to draw a line parallel to the existing line Pin
dan!sh 13-Mar-10 19:12
professional dan!sh 13-Mar-10 19:12 
GeneralRe: to draw a line parallel to the existing line Pin
v17.poornima14-Mar-10 18:41
v17.poornima14-Mar-10 18:41 
AnswerRe: to draw a line parallel to the existing line Pin
OriginalGriff13-Mar-10 23:12
mveOriginalGriff13-Mar-10 23:12 
v17.poornima wrote:
he user may start drawing from anywhere with any angle. So using the draw rectangle i cannot draw that.


Yes you can!
private Point startPoint = new Point(0,0);
 private Point endPoint = new Point(0,0);
 private bool drawing = false;
 private void panel1_MouseDown(object sender, MouseEventArgs e)
     {
     startPoint = e.Location;
     endPoint = e.Location;
     panel1.Invalidate();
     drawing = true;
     }

 private void panel1_MouseMove(object sender, MouseEventArgs e)
     {
     if (drawing)
         {
         endPoint = e.Location;
         panel1.Invalidate();
         }
     }

 private void panel1_MouseUp(object sender, MouseEventArgs e)
     {
     drawing = false;
     }

 private void panel1_Paint(object sender, PaintEventArgs e)
     {
     if (!((startPoint.X == endPoint.X) && (startPoint.Y == endPoint.Y)))
         {
         Rectangle r = new Rectangle(startPoint.X, startPoint.Y, endPoint.X - startPoint.X, endPoint.Y - startPoint.Y);
         e.Graphics.DrawRectangle(Pens.Black, r);
         }
     }
This only draws the rectangle in one quadrant of the four possible, but it is a simple matter to ensure it draws in all four.
You should never use standby on an elephant. It always crashes when you lift the ears. - Mark Wallace

C/C++ (I dont see a huge difference between them, and the 'benefits' of C++ are questionable, who needs inheritance when you have copy and paste) - fat_boy

AnswerRe: to draw a line parallel to the existing line Pin
Nicholas Butler14-Mar-10 9:25
sitebuilderNicholas Butler14-Mar-10 9:25 
Questionextract each character from image with text? Pin
Druuler13-Mar-10 17:52
Druuler13-Mar-10 17:52 
QuestionThe Right Terminology Pin
DotNetMan13-Mar-10 13:44
DotNetMan13-Mar-10 13:44 
AnswerCreative reposting Pin
Not Active13-Mar-10 14:41
mentorNot Active13-Mar-10 14:41 

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.