|
-
Jun 9th, 2000, 03:27 AM
#1
Thread Starter
Addicted Member
hello,
I want to know how to creat a picture box or/and a text box during the run time using code,,,i really need to know how do it,,please help me and reply A.S.A.P
thanx
-
Jun 9th, 2000, 03:31 AM
#2
Use this code. It will only work if you have VB6.[b]
Code:
Private Sub Command1_Click()
Controls.Add "VB.Label", "Label1"
Me!Label1.Move 0, 0
Me!Label1.Caption = "This is my label!"
Me!Label1.Visible = True
End Sub
-
Jun 9th, 2000, 03:47 AM
#3
_______
Picture Box Dynamically
'add a picture box to a form dynamically at run time
Option Explicit
Private WithEvents picObj As PictureBox
Private Sub Form_Activate()
picObj.Print "A new picture box created dynamically!"
End Sub
Private Sub Form_Load()
Set picObj = Controls.Add("VB.PictureBox", "picObj")
With picObj
.Visible = True
.Width = 3000
.Top = 1000
.Left = 1000
End With
End Sub
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
-
Jun 9th, 2000, 03:53 AM
#4
Thread Starter
Addicted Member
ok, thanx alot guys, what about if i want to creat an array of picturebox, like picture(0) and picture(1) and........
-
Jun 9th, 2000, 04:40 AM
#5
Thread Starter
Addicted Member
please help me guys,,,,,,,if you don't understand me here u'll find it in another way:
i want to creat a pictureboxes but all of them has the same name,,,like array for example : picture(0), picture(1) and picture(2) ,,,,,like that
got it guys please help me A.S.A.P.
thanx
-
Jun 9th, 2000, 04:45 AM
#6
You can load them from a Pre-existing PictureBox with an Index of 0. [b]
Code:
Load Picture1(1)
Picture1(1).Move 0, 0
Picture1(I).Visible = True
-
Jun 9th, 2000, 04:55 AM
#7
Thread Starter
Addicted Member
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
|