Adding code to form using code

Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
Thread Solved

Join Date: Aug 2009
Posts: 30
Reputation: drabsch is an unknown quantity at this point 
Solved Threads: 0
drabsch drabsch is offline Offline
Light Poster

Adding code to form using code

 
0
  #1
Nov 10th, 2009
i need to add code to the form using code like the
Controls.Add().

but to add code not a control.

any ideas.
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 487
Reputation: abu taher is an unknown quantity at this point 
Solved Threads: 25
abu taher's Avatar
abu taher abu taher is offline Offline
Posting Pro in Training
 
0
  #2
Nov 10th, 2009
plz more clear.
I like sword. Attack or Defense.
Reply With Quote Quick reply to this message  
Join Date: Aug 2009
Posts: 30
Reputation: drabsch is an unknown quantity at this point 
Solved Threads: 0
drabsch drabsch is offline Offline
Light Poster
 
0
  #3
Nov 11th, 2009
ok well i am making a loop that gets all the drives in a drive box and inserts a picbox and a label for each one.

because there can be a different a number of drives i want to add some code that will insert code (for when the label or picbox is clicked) in the loop
Last edited by drabsch; Nov 11th, 2009 at 12:06 am.
Reply With Quote Quick reply to this message  
Join Date: Jul 2007
Posts: 300
Reputation: jireh is an unknown quantity at this point 
Solved Threads: 43
jireh's Avatar
jireh jireh is offline Offline
Posting Whiz
 
0
  #4
Nov 11th, 2009
you will add a code during runtime? I don't know it its possible but to make a work around on that... make a code/function that will be soon called of the control you will be going to add. You can try the AddHandler() method. Well I don't know it there's a AddHandler() method in VB6.
Reply With Quote Quick reply to this message  
Join Date: Aug 2009
Posts: 30
Reputation: drabsch is an unknown quantity at this point 
Solved Threads: 0
drabsch drabsch is offline Offline
Light Poster
 
0
  #5
Nov 11th, 2009
ok thanks ill have a look at that

if there are any other ideas let me know
Reply With Quote Quick reply to this message  
Join Date: Mar 2009
Posts: 889
Reputation: vb5prgrmr will become famous soon enough vb5prgrmr will become famous soon enough 
Solved Threads: 167
vb5prgrmr vb5prgrmr is offline Offline
Practically a Posting Shark
 
0
  #6
Nov 11th, 2009
Why not just use the DriveListBox???
If anyone has helped you solve your problem, please mark your thread as solved.

Thanks
Reply With Quote Quick reply to this message  
Join Date: Aug 2009
Posts: 30
Reputation: drabsch is an unknown quantity at this point 
Solved Threads: 0
drabsch drabsch is offline Offline
Light Poster
 
0
  #7
34 Days Ago
because the program im making is to be like a sidebar but with all the drives instead of the gadgets.

and the list box is at the top and already opens the drive when i select one
Reply With Quote Quick reply to this message  
Join Date: Mar 2009
Posts: 889
Reputation: vb5prgrmr will become famous soon enough vb5prgrmr will become famous soon enough 
Solved Threads: 167
vb5prgrmr vb5prgrmr is offline Offline
Practically a Posting Shark
 
0
  #8
34 Days Ago
And??? I'm still not understanding but good luck anyways...
If anyone has helped you solve your problem, please mark your thread as solved.

Thanks
Reply With Quote Quick reply to this message  
Join Date: Sep 2008
Posts: 34
Reputation: crackerjacker is an unknown quantity at this point 
Solved Threads: 2
crackerjacker crackerjacker is offline Offline
Light Poster
 
0
  #9
31 Days Ago
ok i think i get it: make your picture box as an array, picture1(0), picture1(1) etc., then use this code
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1. Load picture1(index)
then you can specify the location with
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1. picture1(index).top = ...
i hope this helps!
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



Tag cloud for Visual Basic 4 / 5 / 6
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC