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

C#

 
AnswerRe: Check if open is already open Pin
AFSEKI8-May-07 23:23
AFSEKI8-May-07 23:23 
Questionneed help with string onchange event handler Pin
neodeaths7-May-07 22:59
neodeaths7-May-07 22:59 
AnswerRe: need help with string onchange event handler Pin
Bijesh7-May-07 23:15
Bijesh7-May-07 23:15 
GeneralRe: need help with string onchange event handler Pin
neodeaths7-May-07 23:29
neodeaths7-May-07 23:29 
GeneralRe: need help with string onchange event handler Pin
Bijesh8-May-07 0:30
Bijesh8-May-07 0:30 
Questionon closing event of old form new form should be visible and after verification both form sh'd close Pin
fgfdhghgfd7-May-07 22:44
fgfdhghgfd7-May-07 22:44 
AnswerRe: on closing event of old form new form should be visible and after verification both form sh'd close Pin
Giorgi Dalakishvili7-May-07 22:49
mentorGiorgi Dalakishvili7-May-07 22:49 
AnswerRe: on closing event of old form new form should be visible and after verification both form sh'd close Pin
Christian Graus7-May-07 22:56
protectorChristian Graus7-May-07 22:56 
Question.NET remoting: inter-client communication Pin
ChrisKiki7-May-07 22:38
ChrisKiki7-May-07 22:38 
QuestionCommunication windows app with windows service Pin
Diego F.7-May-07 22:31
Diego F.7-May-07 22:31 
QuestionFiltering dataset Pin
Muammar©7-May-07 22:24
Muammar©7-May-07 22:24 
AnswerRe: Filtering dataset Pin
rah_sin7-May-07 22:30
professionalrah_sin7-May-07 22:30 
AnswerRe: Filtering dataset Pin
Giorgi Dalakishvili7-May-07 22:35
mentorGiorgi Dalakishvili7-May-07 22:35 
Questionwindow application problem - plz help Pin
Sekar Kumarasamy7-May-07 22:19
Sekar Kumarasamy7-May-07 22:19 
AnswerRe: window application problem - plz help Pin
rah_sin7-May-07 22:28
professionalrah_sin7-May-07 22:28 
AnswerRe: window application problem - plz help Pin
Christian Graus7-May-07 22:33
protectorChristian Graus7-May-07 22:33 
GeneralRe: window application problem - plz help Pin
prabuinet8-May-07 3:48
prabuinet8-May-07 3:48 
QuestionDrawing line in running time [modified] Pin
HexaDeveloper7-May-07 21:37
HexaDeveloper7-May-07 21:37 
hi all,
i write this code to draw line by mouse and the drawline method is in the onPaint() method,this code is working properly but has two problems so is there any other idea to code it

 private void mainScreen_MouseMove(object sender, MouseEventArgs e)<br />
        {<br />
<br />
            /// Determine the End point of the line<br />
            if (lineFlag == 1 && !(mLineBeginPnt.IsEmpty) && nextLineFlag == 1)<br />
            {<br />
                Graphics grfx = this.CreateGraphics();<br />
                Pen pen = new Pen(mainScreen.DefaultBackColor, 2);<br />
                userInterface.handleMouseMove(grfx, ref lastPntOfLine,<br />
                   ref lastPntCounter, pen, ref mLineEndPnt, mLineBeginPnt, e.Location);<br />
                pen.Dispose();<br />
                grfx.Dispose();<br />
                Invalidate(drawingFrame);<br />
            }<br />
<br />
        }<br />
----------------------------------------<br />
 public void handleMouseMove(Graphics grfx,ref Point lastPntOfLine,<br />
            ref int lastPntCounter, Pen pen, ref Point mLineEndPnt, Point mLineBeginPnt,<br />
            Point location)<br />
        {<br />
            if (lastPntCounter == 0)<br />
            {<br />
                lastPntOfLine = location;<br />
                lastPntCounter++;<br />
            }<br />
            else<br />
                grfx.DrawLine(pen, mLineBeginPnt, lastPntOfLine);<br />
            mLineEndPnt = location;<br />
            Pen p = new Pen(Color.Black, 2);<br />
            grfx.DrawLine(p, mLineBeginPnt, mLineEndPnt);<br />
            lastPntOfLine = location;<br />
            grfx.Dispose();<br />
            pen.Dispose();<br />
            p.Dispose();<br />
            <br />
        }<br />

what i made in this code is that i determine the last line drawen by nouse by getting its begin and end points from line object that i have then draw this line by background color to hide it and draw new line with black color to seen by user
(this code is an alternative for using XOR mode, if any one know how to use it with drawing lines please tell me)

thanks



Generator


-- modified at 4:12 Tuesday 8th May, 2007
AnswerRe: Drawing line in running time Pin
Christian Graus7-May-07 22:14
protectorChristian Graus7-May-07 22:14 
GeneralRe: Drawing line in running time Pin
HexaDeveloper7-May-07 23:00
HexaDeveloper7-May-07 23:00 
Questionconnect XML file with App.?? Pin
yazeed_pal7-May-07 20:47
yazeed_pal7-May-07 20:47 
AnswerRe: connect XML file with App.?? Pin
Sandeep Akhare7-May-07 20:58
Sandeep Akhare7-May-07 20:58 
AnswerRe: connect XML file with App.?? Pin
blackjack21507-May-07 21:24
blackjack21507-May-07 21:24 
QuestionCreateObject Method Pin
danasegaranea7-May-07 20:02
danasegaranea7-May-07 20:02 
AnswerRe: CreateObject Method Pin
Muammar©7-May-07 20:12
Muammar©7-May-07 20:12 

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.