|
-
Apr 29th, 2005, 10:54 PM
#1
Thread Starter
Lively Member
New Control At Runtime
VB Code:
Sub MouseMove (X As Integer, Y As Integer)
Dim o As OvalShape
If MouseX >=1 or MouseY >=1 Then
o = New OvalShape
'o.Visible
o.FillColor = RGB(255,0,0)
o.Width = 27
o.Height = 27
'o.Top = MouseX + 5
'o.Left = MouseY + 5
End if
End Sub
When trying to make a new control at runtime, which will be an OvalShape, it doesn't make the control, because the lines that I have 'commented' give me syntax errors, so RealBasic doesn't even recognize variable "o" as an OvalShape control. Can anyone tell me how to fix this?
---------------------------------
Dubbemiah
"Simply, a beginner."
-
May 25th, 2005, 07:07 AM
#2
New Member
Re: New Control At Runtime
Instead of using:
o.Visible
Use:
Me.Visible=True
Same with
o.Top = MouseX + 5
o.Left = MouseY + 5
Use Me.MouseX + 5 Blah Blah Blah
HTH
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|