Forum     

Go Back   Digit Technology Discussion Forum > Portables, Peripherals and Electronics > QnA (read only)
Register FAQ Calendar Mark Forums Read

QnA (read only) Mods please help transfer the contents of this forum to proper sections. :)


 
 
LinkBack Thread Tools Search this Thread Display Modes
Old 05-12-2005, 09:05 AM   #1 (permalink)
Right Off the Assembly Line
 
Join Date: Apr 2004
Location: New Delhi
Posts: 39
Default Code to find Number of command buttons


Can any one plz help me in writing the code to find the number of command buttons in VB6.

Plz help

SID
__________________
Get In Touch With ME!!!!
SID
sid_b6505 is offline  
Advertisements. Register and be a member of the community to get rid of them.
Advertisement

Old 06-12-2005, 10:02 AM   #2 (permalink)
Broken In
 
Join Date: Mar 2005
Location: Chennai, India
Posts: 198
Default

why would you want such a code?
to find out the no. of cmd buttons in runtime?

i guess you can use command buttons as an array and find the size of the array to get the no. of cmd buttons
imported_dheeraj_kumar is offline  
Old 06-12-2005, 11:49 AM   #3 (permalink)
Wise Old Owl
 
siriusb's Avatar
 
Join Date: May 2005
Location: Chennai, India, Asia, the Earth, the Solar system, the Milky Way, the Local group, this Universe.
Posts: 1,171
Default

dim cntrl as control
dim count as integer

for each cntrl in form.controls
If TypeOf cntrl Is CommandButton Then
count = count + 1
end if
end each
__________________
http://myxp.blogspot.com
-----------------------
Winchester 3200+ @2,500MHz
LeadTek 7900GT VOLT MODDED @ 680 core, 1800 mem
2x1GB Transcend DDR400 @ DDR454 2.5,3,3,5,1T
siriusb is offline  
Old 06-12-2005, 06:19 PM   #4 (permalink)
Right Off the Assembly Line
 
Join Date: Apr 2004
Location: New Delhi
Posts: 39
Default Thanx

Hey..
Thnx for your help. The code worked.

Thnx Again
SID
__________________
Get In Touch With ME!!!!
SID
sid_b6505 is offline  
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


 
Latest Threads
- by clmlbx
- by Sujeet
- by gforz

Advertisement




All times are GMT +5.5. The time now is 03:44 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.

Search Engine Optimization by vBSEO 3.3.2