|
-
September 9th, 2001, 01:57 AM
#1
Create Buttons on RunTime(Not Design Time)
Could it be possible to create buttons at runtime and not in design time? and also please explain the uses of commands being used ...
i will appreciate it very much ....thanks
-
September 9th, 2001, 02:52 AM
#2
Re: Create Buttons on RunTime(Not Design Time)
Dim cmd As CommandButton
Set cmd = Controls.Add("vb.commandbutton", "Name")
cmd.Visible = True
Then u can set its left and right as u want
Best of luck
-
September 9th, 2001, 04:14 AM
#3
Re: Create Buttons on RunTime(Not Design Time)
take a command button command1 at design time and set it's index property to 0.this will create a control array with the first item as command1(0).set it's visible property to false.now type this code in the event procedure.
load command1(1)
command1(1).visible=true
command1(1).left=1000
command1(1).top=1000
if you want to create more than one command buttons then use this code
static i as integer
i=i+1
load command1(i)
command1(i).visible=true
command1(i).left=1000
command1(i).top=1000
hope it helps you.
-
September 10th, 2001, 02:24 AM
#4
Re: Create Buttons on RunTime(Not Design Time)
Have also a look here:
http://codeguru.com/cgi-bin/bbs/wt/s...age=&view=&sb=
Special thanks to Lothar "the Great" Haensler, Tom Archer, Chris Eastwood, TCartwright, Bruno Paris, Dr_Micahel
and all the other wonderful people who made and make Codeguru a great place.
Come back soon, you Gurus.
The Rater
...at present time, using mainly Net 4.0, Vs 2010
Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael, ClearCode, Iouri and
all the other wonderful people who made and make Codeguru a great place.
Come back soon, you Gurus.
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
|