Results 1 to 4 of 4

Thread: Gdi- ! (resolved)

  1. #1

    Thread Starter
    Member SnappleBoy's Avatar
    Join Date
    Aug 2002
    Location
    Israel!
    Posts
    41

    Unhappy Gdi- ! (resolved)



    i use this code to paint on forms
    Code:
     Protected Overrides Sub OnPaint(ByVal e As System.Windows.Forms.PaintEventArgs)
            Dim g As Graphics = e.Graphics
            'g.DrawLine.... Whatever
    End Sub
    what can i use to paint on a groupbox ?
    can i paint on a button? if yes then how?

    Thank You for reading.

    keyword, for future search: GDI GDI+ button buttons draw paint how to can on
    Last edited by SnappleBoy; Mar 31st, 2004 at 04:47 PM.
    i like my icon, made it myself...

    except for Buttercap of course.
    and for the symbol in the back that is copied from Slipknot...


    I like the icon i use but isn't really mine.

  2. #2
    Fanatic Member pax's Avatar
    Join Date
    Mar 2001
    Location
    Denmark
    Posts
    840
    Hi.

    Buttons and the like all have paint events.
    Just put your code in there just like you did with your form.

    Note: not all controls have paint events, but most do.
    I wish I could think of something witty to put in my sig...

    ...Currently using VS2013...

  3. #3
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    When you find a control with CreateGraphics class , then it means you can use it's encapsulated methods for drawing different shapes . You can draw on any surface btw .

    VB Code:
    1. Me.Button1.CreateGraphics.DrawLine(New Pen(Color.Black), 0, 0, 10, 10)

  4. #4

    Thread Starter
    Member SnappleBoy's Avatar
    Join Date
    Aug 2002
    Location
    Israel!
    Posts
    41
    tanks thank and thanks
    i like my icon, made it myself...

    except for Buttercap of course.
    and for the symbol in the back that is copied from Slipknot...


    I like the icon i use but isn't really mine.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width