Adblock breaks this site

Help! :o

Discussion in 'Programming General' started by Syko_Chicken, Dec 3, 2007.

  1. Syko_Chicken

    Syko_Chicken Apprentice

    Joined:
    Jan 21, 2007
    Posts:
    709
    Referrals:
    1
    Sythe Gold:
    0
    Help! :o

    Hey,

    I've just started learning Visual Basic 6 and tried following a tutorial to make a basic paint like program but came up with some syntax errors

    Code:
    Private Sub Form_Load()
    [color=RED]DrawBitmap = New Bitmap(PictureBox1.Width, PictureBox1.Height)[/color]
    DrawGraphics = Graphics.FromImage(DrawBitmap)
    PictureBox1.Image = DrawBitmap
    End Sub
    
    Private Sub Picture1_Click()
    Private DrawBitmap As Bitmap
    Private DrawGraphics As Graphics
    End Sub
    
    Private Sub Picture1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
        If e.Button = Windows.Forms.MouseButtons.Left Then
          [color=RED]DrawGraphics.FillEllipse(Brushes.Blue, e.X, e.Y, 8, 8)[/color]
          PictureBox1.Image = DrawBitmap
        End If
    End Sub
    
    If anyone who has any decent knowledge in VB can help me well <3 ;) Also I have put the picture box as the tutorial said. :\
     
  2. Blupig

    Blupig BEEF TOILET
    $5 USD Donor

    Joined:
    Nov 23, 2006
    Posts:
    7,145
    Referrals:
    16
    Sythe Gold:
    1,609
    Discord Unique ID:
    178533992981594112
    Valentine's Singing Competition Winner Member of the Month Winner MushyMuncher Gohan has AIDS Extreme Homosex World War 3 I'm LAAAAAAAME
    Off Topic Participant
    Help! :o

    Did you declare all your variables in there?
     
  3. Covey

    Covey Creator of EliteSwitch
    Retired Sectional Moderator Visual Basic Programmers

    Joined:
    Sep 9, 2005
    Posts:
    4,510
    Referrals:
    9
    Sythe Gold:
    9
    Discord Unique ID:
    807246764155338833
    Discord Username:
    Covey#1816
    Help! :o

    Code:
    Private DrawBitmap As Bitmap
    Private DrawGraphics As Graphics
    
    Private Sub Form_Load()
    DrawBitmap = New Bitmap(PictureBox1.Width, PictureBox1.Height)
    DrawGraphics = Graphics.FromImage(DrawBitmap)
    PictureBox1.Image = DrawBitmap
    End Sub
    
    Private Sub Picture1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
        If e.Button = Windows.Forms.MouseButtons.Left Then
          DrawGraphics.FillEllipse(Brushes.Blue, e.X, e.Y, 8, 8)
          PictureBox1.Image = DrawBitmap
        End If
    End Sub
     
< [Source] Calling a File From Your Application Using Shell | [TUT] Starting a Word Processor >


 
 
Adblock breaks this site