View Single Post
  #4 (permalink)  
Old 05-26-2008, 11:39 PM
mjcoon mjcoon is offline
Junior Member
 
Join Date: May 2008
Posts: 24
Default Newbie having trouble with brush1.New1()

Thanks for your prompt replies.

The code isn't "mine"; as I said I just got it from a tutorial so I had to work out how to create the matching objects.
Sub Button1_Click
bitmap1.New2(100,100)
rect1.New1(0,0,bitmap1.Width,bitmap1.Height)
drawer.New2(bitmap1.Value, B4PObject(5)) 'The drawer will draw on bitmap1
brush1.New1(cBlue)
drawer.FillRectangle(brush1.Value,rect1.Value)
brush1.Color = cBlue
rect1.Width = 40
drawer.FillEllipse(brush1.Value,rect1.Value)
form1.DrawImage(bitmap1.Value,10,10) 'Draws bitmap1 on form1
End Sub
If I try retyping the offending line, the hint I get does not include any NewX() with a color parameter. Example: New2(width, height) instead. If I change the code then I get past the problematic line to the next one (which also fails).

I cannot believe that you-all would publish sample code that does not work, so what is happening?

Cheers, Mike.
Reply With Quote