Solved

i want to add some controls onto every picturebox  in the contral array, how?

Posted on 2002-03-08
6
156 Views
Last Modified: 2010-08-05
for example,

i want every picturebox in the array will show one or two buttons, how to do that?



thanks


cc
0
Comment
Question by:cc_2000_sg
6 Comments
 
LVL 2

Expert Comment

by:tppradeep18
Comment Utility
Could you please give more details about the question. Are you using control array?
0
 

Author Comment

by:cc_2000_sg
Comment Utility
yes,

i am using control array.

and i want all picture box in the array will contain other controls, such as some command buttons, some lines, even other control arrays.


cc
0
 

Expert Comment

by:segan
Comment Utility
Can you explain your problem in detail?!!!
0
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 

Expert Comment

by:km_saran
Comment Utility
Will u pls try with more details...
0
 
LVL 1

Accepted Solution

by:
tandrei earned 100 total points
Comment Utility
At design time put a picture box say it pic(0). There, load another array of controls say but(0).
Define all your arrays of controls with a maximum dimension. Be careful, cause you cannot delete a position from a control array, if you use unload pic(i) it will remain a gap in the array.
 Use Load pic(i) for the container, and then Load but(i) for the components you want to load.
 To determin if a control is loaded or not use the VarType function (if, say pic(1) is loaded, then VarType(pic(1))<>9, so this is the condition
0
 
LVL 22

Expert Comment

by:rspahitz
Comment Utility
Dynamically load the buttons, then set them into the desired containers:

' Load an OK and Cancel button into ten pictureboxes
for i=1 to 10
Load cmdOK(i)
Set cmdOK(i).Container = picSomething(i)
cmdOK(i).move 0,100
cmdOK(i).Visible=true

Load cmdCancel(i)
Set cmdCancel(i).Container = picSomething(i)
cmdCancel(i).move 0,500
cmdCancel(i).Visible=true
next i
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Suggested Solutions

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now