Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Troubleshooting
Research
Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

Make button click occur onload

Avatar of Millkind
MillkindFlag for Afghanistan asked on
Visual Basic.NET
4 Comments1 Solution347 ViewsLast Modified:
How do i make the following code occur on load?  I moved the code into the form1_load area but it doesn't show up.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        'define GDI+ context representing a form
        Dim GdiSurface As Graphics
        GdiSurface = Me.CreateGraphics

        'draw a thick curve
        Dim CurvePen As New Pen(Color.Plum, 30)
        Dim CurvePoints() As Point = {New Point(10, 100), New Point(50, 80), New Point(200, 200)}
        GdiSurface.DrawCurve(CurvePen, CurvePoints)

        'draw rectangle
        Dim RecPen As New Pen(Color.Crimson, 10) 'perimeter
        Dim RecBrush As New SolidBrush(Color.LightBlue) 'paint the body
        GdiSurface.DrawRectangle(RecPen, 10, 10, 200, 30)
        GdiSurface.FillRectangle(RecBrush, 10, 10, 200, 30)

        'Release GDI context
        GdiSurface.Dispose()

    End Sub
ASKER CERTIFIED SOLUTION
Avatar of Mike Tomlinson
Mike TomlinsonFlag of United States of America imageHigh School Computer Science, Computer Applications, Digital Design, and Mathematics Teacher
Commented:
This problem has been solved!
Unlock 1 Answer and 4 Comments.
See Answers