|
-
Mar 2nd, 2004, 08:38 PM
#1
Thread Starter
Member
Creating Labels using code (resolved)
is there a way to create labels w/ specific names, specific borderstyles and specific text? if anyone knows how to do it in vb 5 and vb net especially that would be great!
Last edited by andrew5578; Mar 2nd, 2004 at 08:52 PM.
aka Ender
-
Mar 2nd, 2004, 08:48 PM
#2
This example assumes that ONE Label already exists, and its Index is 0 (that is a requirment):
VB Code:
Load Label1(1)
With Label1(1)
.Caption = "New Label"
.Width = 2000
.BorderStyle = 1
.Move 100, 300
.Visible = True
End With
Bruce.
-
Mar 2nd, 2004, 08:51 PM
#3
Thread Starter
Member
thanks brucefox. lol uve helped me like 10 times!!!! thanks alot
-
Mar 2nd, 2004, 08:57 PM
#4
No probs 
There is a way to load them from scratch (ie no Control Array); there are few examples posted here.
Edit:
And to load multiple...
VB Code:
Load Label1(Label1.Count)
With Label1(Label1.Count - 1)
.Caption = "Label " & Label1.Count
.Width = 2000
.BorderStyle = 1
.Move Label1(Label1.Count - 2).Left, Label1(Label1.Count - 2).Top + Label1(Label1.Count - 2).Height
.Visible = True
End With
Last edited by Bruce Fox; Mar 2nd, 2004 at 09:07 PM.
-
Mar 3rd, 2004, 10:25 AM
#5
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
|