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

C#

 
AnswerRe: Form.ShowDialog(), but without Focus Pin
Skippums21-Nov-07 5:27
Skippums21-Nov-07 5:27 
GeneralRe: Form.ShowDialog(), but without Focus Pin
blackjack215021-Nov-07 6:45
blackjack215021-Nov-07 6:45 
QuestionLoading an image into a toolStripStatusLabel Pin
Programm3r21-Nov-07 2:02
Programm3r21-Nov-07 2:02 
AnswerRe: Loading an image into a toolStripStatusLabel Pin
Andrei Ungureanu21-Nov-07 2:38
Andrei Ungureanu21-Nov-07 2:38 
GeneralRe: Loading an image into a toolStripStatusLabel Pin
Programm3r21-Nov-07 3:29
Programm3r21-Nov-07 3:29 
QuestionSend Messages to Mobile Devices Pin
Satish - Developer21-Nov-07 1:47
Satish - Developer21-Nov-07 1:47 
AnswerRe: Send Messages to Mobile Devices Pin
Vasudevan Deepak Kumar21-Nov-07 3:24
Vasudevan Deepak Kumar21-Nov-07 3:24 
Questiondrawing reverse rectangle using mouse Pin
_tasleem21-Nov-07 1:45
_tasleem21-Nov-07 1:45 
hi i am making an applicaiton that draws the rectangles using mouse,when mouse is down it takes the starting points of rectangle(x,y) and when mouse moves then ending point of rectangle are taken and rectangle is drawn,here is code of that
<br />
private void frmMedtronic_MouseMove(object sender, MouseEventArgs e)<br />
        {<br />
         if (mIsMouseDown)<br />
          {<br />
                //increase width of rectangle towards Rite<br />
                if (e.Location.X > mrctRectangle.X)<br />
                    mrctRectangle.Width = e.Location.X - mrctRectangle.X;<br />
                else // * trouble here<br />
                {<br />
                    mrctRectangle.X = e.Location.X; <br />
                    mrctRectangle.Width = e.Location.X - mrctRectangle.X;<br />
                }<br />
<br />
                if (e.Location.Y > mrctRectangle.Y)<br />
                    mrctRectangle.Height = e.Location.Y - mrctRectangle.Y;<br />
                //moving Rectangle towards Left *<br />
                else //trouble *<br />
                {<br />
                    mrctRectangle.Y = e.Location.Y; <br />
                    mrctRectangle.Height = e.Location.Y - mrctRectangle.Y;<br />
                }<br />
            }<br />
            Invalidate();<br />
        }<br />

and in formpaint drawrectangle function is called.

The problem is in moving rectangle toward left or moving upwards,as in this case ending points are greater then starting and in drawing as widht and height of rectangle can only b positive values not negative,i am having trouble in moving towards upward and left as point of screen are from 0 and not negative as in openGL, so suggest me what to do.



Regards.
Tasleem Arif

AnswerRe: drawing reverse rectangle using mouse Pin
Andrei Ungureanu21-Nov-07 2:28
Andrei Ungureanu21-Nov-07 2:28 
AnswerRe: drawing reverse rectangle using mouse [modified] Pin
Luc Pattyn21-Nov-07 4:43
sitebuilderLuc Pattyn21-Nov-07 4:43 
QuestionData reception from Multiple ports Pin
PS@Codeproj21-Nov-07 0:59
PS@Codeproj21-Nov-07 0:59 
AnswerRe: Data reception from Multiple ports Pin
Bekjong21-Nov-07 1:33
Bekjong21-Nov-07 1:33 
Questionservice doesn't start Pin
stephan_00721-Nov-07 0:18
stephan_00721-Nov-07 0:18 
AnswerRe: service doesn't start Pin
Pete O'Hanlon21-Nov-07 0:20
mvePete O'Hanlon21-Nov-07 0:20 
QuestionReading Contents of a folder from website Pin
arslanjatt21-Nov-07 0:17
arslanjatt21-Nov-07 0:17 
AnswerRe: Reading Contents of a folder from website Pin
Rob Philpott21-Nov-07 0:33
Rob Philpott21-Nov-07 0:33 
GeneralRe: Reading Contents of a folder from website Pin
arslanjatt21-Nov-07 0:48
arslanjatt21-Nov-07 0:48 
QuestionGetting Error when using System.Timers.Timer Pin
Satish - Developer21-Nov-07 0:14
Satish - Developer21-Nov-07 0:14 
AnswerRe: Getting Error when using System.Timers.Timer Pin
Andrei Ungureanu21-Nov-07 0:22
Andrei Ungureanu21-Nov-07 0:22 
GeneralRe: Getting Error when using System.Timers.Timer [modified] Pin
Satish - Developer21-Nov-07 0:27
Satish - Developer21-Nov-07 0:27 
AnswerRe: Getting Error when using System.Timers.Timer Pin
Rob Philpott21-Nov-07 0:29
Rob Philpott21-Nov-07 0:29 
GeneralRe: Getting Error when using System.Timers.Timer Pin
Satish - Developer21-Nov-07 0:33
Satish - Developer21-Nov-07 0:33 
QuestionProblem sending email to Lotus iNote Pin
Jedidah20-Nov-07 23:53
Jedidah20-Nov-07 23:53 
QuestionAccessing Control.Focused property from Thread Pin
Sukhjinder_K20-Nov-07 23:36
Sukhjinder_K20-Nov-07 23:36 
AnswerRe: Accessing Control.Focused property from Thread [modified] Pin
Martin#20-Nov-07 23:44
Martin#20-Nov-07 23:44 

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.