Solved

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

Posted on 2002-03-08
6
157 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
ID: 6850005
Could you please give more details about the question. Are you using control array?
0
 

Author Comment

by:cc_2000_sg
ID: 6850068
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
ID: 6850095
Can you explain your problem in detail?!!!
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Expert Comment

by:km_saran
ID: 6850145
Will u pls try with more details...
0
 
LVL 1

Accepted Solution

by:
tandrei earned 100 total points
ID: 6850563
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
ID: 6850887
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

895 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

11 Experts available now in Live!

Get 1:1 Help Now