Click here to Skip to main content
16,006,440 members
Home / Discussions / C#
   

C#

 
Generaluse shellexecute to create an email Pin
TNL31-Dec-04 18:14
TNL31-Dec-04 18:14 
GeneralRe: use shellexecute to create an email Pin
Heath Stewart31-Dec-04 22:53
protectorHeath Stewart31-Dec-04 22:53 
GeneralRe: use shellexecute to create an email Pin
TNL31-Dec-04 23:48
TNL31-Dec-04 23:48 
GeneralRe: use shellexecute to create an email Pin
Heath Stewart1-Jan-05 6:33
protectorHeath Stewart1-Jan-05 6:33 
Generalbits Pin
Tyrus18231-Dec-04 16:37
Tyrus18231-Dec-04 16:37 
GeneralRe: bits Pin
Heath Stewart31-Dec-04 22:58
protectorHeath Stewart31-Dec-04 22:58 
GeneralSIMPLE SIMPLE QUESTION Pin
...---...31-Dec-04 9:44
...---...31-Dec-04 9:44 
GeneralRe: SIMPLE SIMPLE QUESTION Pin
SimonS31-Dec-04 10:29
SimonS31-Dec-04 10:29 
Hi
Here's the code you'll need. If comments aren't enough, just reply:
bool bPaintLine = false;
Pen p = new Pen(Color.Blue);

private void btnLine_Click(object sender, System.EventArgs e)
{
    // if clicked - set flag, cause form to repaint and hide button
    // don't get graphics obj here and paint as line won't repaint itself
    //   rather perform line paint in the paint event
    bPaintLine = true;
    this.Invalidate();
    btnLine.Visible = false;
}
private void Form1_Paint(object sender, System.Windows.Forms.PaintEventArgs e)
{
    // if btnLine clicked (bPaintLine = false) then drawline
    if(bPaintLine)
    {
        using(Graphics g = e.Graphics)
        {
            Point pStart = new Point(10,10);
            Point pEnd = new Point(500,500);
            g.DrawLine(p,pStart,pEnd);
        }

    }
}


Cheers,
Simon

sig ::
"Don't try to be like Jackie. There is only one Jackie.... Study computers instead.", Jackie Chan on career choices.

article :: animation mechanics in SVG blog:: brokenkeyboards
"Most of us are programmers, but a few use VB", Christian Graus

GeneralRe: SIMPLE SIMPLE QUESTION Pin
Heath Stewart31-Dec-04 10:46
protectorHeath Stewart31-Dec-04 10:46 
GeneralRe: SIMPLE SIMPLE QUESTION Pin
...---...31-Dec-04 10:50
...---...31-Dec-04 10:50 
GeneralRe: SIMPLE SIMPLE QUESTION Pin
Heath Stewart31-Dec-04 11:06
protectorHeath Stewart31-Dec-04 11:06 
GeneralRe: SIMPLE SIMPLE QUESTION Pin
SimonS31-Dec-04 11:39
SimonS31-Dec-04 11:39 
GeneralRe: SIMPLE SIMPLE QUESTION Pin
Heath Stewart31-Dec-04 12:22
protectorHeath Stewart31-Dec-04 12:22 
GeneralALMOST WORKS! BUT.... Pin
...---...31-Dec-04 15:39
...---...31-Dec-04 15:39 
GeneralRe: ALMOST WORKS! BUT.... Pin
Matt Gerrans3-Jan-05 8:43
Matt Gerrans3-Jan-05 8:43 
GeneralCPU Usage and thread problem Pin
aswanee31-Dec-04 9:37
aswanee31-Dec-04 9:37 
GeneralRe: CPU Usage and thread problem Pin
leppie31-Dec-04 10:23
leppie31-Dec-04 10:23 
GeneralSending an email message through windows C#... Pin
new_phoenix31-Dec-04 6:21
new_phoenix31-Dec-04 6:21 
GeneralRe: Sending an email message through windows C#... Pin
Dennis C. Dietrich31-Dec-04 6:36
Dennis C. Dietrich31-Dec-04 6:36 
GeneralRe: Sending an email message through windows C#... Pin
new_phoenix31-Dec-04 6:47
new_phoenix31-Dec-04 6:47 
GeneralRe: Sending an email message through windows C#... Pin
Heath Stewart31-Dec-04 6:57
protectorHeath Stewart31-Dec-04 6:57 
GeneralRe: Sending an email message through windows C#... Pin
new_phoenix31-Dec-04 7:57
new_phoenix31-Dec-04 7:57 
GeneralRe: Sending an email message through windows C#... Pin
Heath Stewart31-Dec-04 8:10
protectorHeath Stewart31-Dec-04 8:10 
GeneralRe: Sending an email message through windows C#... Pin
Heath Stewart1-Jan-05 7:06
protectorHeath Stewart1-Jan-05 7:06 
GeneralMicrophone Input Level Indicator Pin
GTWebb31-Dec-04 3:50
GTWebb31-Dec-04 3:50 

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.