|
-
Jun 5th, 2000, 02:20 AM
#1
Thread Starter
transcendental analytic
Public obj As Object
Private Sub Form_Click()
Set obj = CreateObject("VB.PictureBox")
End Sub
can someone tell me why this doesn't work on my comp? I have VB5 Ent edit, but it should work!
Option Explicit
Private WithEvents btnObj As CommandButton
Private Sub btnObj_Click()
MsgBox "This is a dynamically added button."
End Sub
Private Sub Form_Load()
Set btnObj = Controls.Add("VB.CommandButton", "btnObj")
With btnObj
.Visible = True
.Width = 3000
.Caption = "This button was created on the fly!"
.Top = 1000
.Left = 1000
End With
End Sub
This example didn't work either 438 - Object doesn't support this method on the Controls.Add method
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Jun 5th, 2000, 02:26 AM
#2
You need vb6 to create controls at runtime. With vb5 you can only add controls to an existing control array.
-
Jun 5th, 2000, 05:33 AM
#3
Thread Starter
transcendental analytic
I knew it! I knew it! I knew it! I knew it! I knew it! I knew it! I knew it! I knew it! I knew it!
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
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
|