Kangaroo
05-03-2002, 02:55 PM
Hi,
at the moment I am just trying to get into VB by exoanding a program bit by bit.
Now I have a problem, which I couldnt resolve so far:
In my program I use a picturebox as a kind of "visual timer" by filling circle segments every second until it is full.
It works nicely, but I would prefer to make an object out of it.
I can define the object in my class module, but as soon as I refer to the Picturebox inside I get a runtime error.
Cant you use control elements in your own classes ?
Thx for an answer, hope I made myself clear halfway
Public CTPictureBox As PictureBox
Public Duration As Integer
Public Interval As Integer
Public Sub Start()
MsgBox "here comes the circle later"
End Sub
Private Sub Class_Initialize()
CTPictureBox.BackColor = vbRed ***** does not work
End Sub
at the moment I am just trying to get into VB by exoanding a program bit by bit.
Now I have a problem, which I couldnt resolve so far:
In my program I use a picturebox as a kind of "visual timer" by filling circle segments every second until it is full.
It works nicely, but I would prefer to make an object out of it.
I can define the object in my class module, but as soon as I refer to the Picturebox inside I get a runtime error.
Cant you use control elements in your own classes ?
Thx for an answer, hope I made myself clear halfway
Public CTPictureBox As PictureBox
Public Duration As Integer
Public Interval As Integer
Public Sub Start()
MsgBox "here comes the circle later"
End Sub
Private Sub Class_Initialize()
CTPictureBox.BackColor = vbRed ***** does not work
End Sub