ZJP972
Posts: 1
Joined: Fri Oct 03, 2008 10:29 am

Brush Style error

Fri Oct 03, 2008 10:38 am

Hi,

I've a trouble with this "subroutine" in VB6. GPSTools version 2.31 build 227. VB return an error. A bug or i'm miss something?
Without this line, it's ok.
Sorry. Bad english. French people ;-)

JP

Function create_ellipse() As Ellipse

' Create a black ellipse.
Set objEllipse = Map1.NewEllipse
objEllipse.Width = 20
objEllipse.Height = 20

Dim objBrush As GpsViewXPCtl.Brush
Set objBrush = New GpsViewXPCtl.Brush
objBrush.Transparent = False
objBrush.Blue = 0
objBrush.Green = 170
objBrush.Style = 0 ' <<<<<< run-time error '438': Object doesn't support this property or method



Dim objPen As Pen
Set objPen = New Pen
objPen.Red = 100
objPen.Green = 0
objPen.Blue = 0
objPen.Width = 5

Set objEllipse.Pen = objPen
Set objEllipse.Brush = objBrush
Set create_ellipse = objEllipse
End Function

Return to “GpsTools”