|
-
Oct 18th, 2000, 09:51 PM
#1
Thread Starter
New Member
I have created an ODBC connection, and need to create a button for each record. Any ideas??
The amount of records varies drasticly form say 1 to 1000, so its not feasible to have buttons hidden.....
Thanks in advance,
--Don
-
Oct 18th, 2000, 09:56 PM
#2
Hyperactive Member
just out of curiosity why do you need a button for every record?
VB6.0 SP4
Windows 2000
I'm thinking of a number between
-
Oct 18th, 2000, 10:08 PM
#3
I agree with PJB there must a more efficient way of doing this without the need of 1000 buttons !!
But if you want to know how to create buttons at runtime, here is how u can do this
Code:
'Make a control array of a command button
'eg set the Property "Index" of Command1 to 0
'and paste the code
Dim iCount As Integer
Private Sub Command1_Click(Index As Integer)
Load Command1(iCount)
Command1(iCount).Visible = True
Command1(iCount).Left = Command1(iCount - 1).Left + Command1(iCount - 1).Width
iCount = iCount + 1
End Sub
Private Sub Form_Load()
iCount = 1
End Sub
[VBF RSS Feed]
There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.
If I have been helpful, Please Rate my Post. Thanks.
This post was powered by : 
-
Oct 19th, 2000, 04:59 PM
#4
Thread Starter
New Member
THANKS GENTLEMEN
Thank you sirs this is what I needed :-)
--Don
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
|