Solved

Add a new Frame control with VB6 at run - time

Posted on 2011-09-23
5
245 Views
Last Modified: 2012-05-12
Dear experts!

I still use classic VB6, it works very fine in hand which know it very good.

I have a frame fraSavePic(0) – control array. Is there a way to add in run time fraSavePic(1) which will have exactly same properties and event handle for Click event? I’m sure I can do this, could you please help me with code?

 More detailed, I the new one Frame to be same size, colour and event for Click as fraSavePic(0) .
0
Comment
Question by:dvplayltd
  • 3
  • 2
5 Comments
 
LVL 46

Expert Comment

by:Martin Liss
ID: 36587243
Load fraSavePic(1)

or for more flexibility

Load fraSavePic(Ubound(fraSavePic))
0
 
LVL 46

Accepted Solution

by:
Martin Liss earned 500 total points
ID: 36587554
Correction on the second part of my answer. It should be

Load fraSavePic(fraSavePic.Count)

'and to see it add something like this.
fraSavePic(fraSavePic.Count - 1).Visible = True
fraSavePic(fraSavePic.Count - 1).Left = 2500

Open in new window

0
 

Author Comment

by:dvplayltd
ID: 36587606
Well, I try it, it do not produce error, but I almost was ready to write you that do not work.

Why you do not tell me that I need to put here  ??? :-)

fraSavePic(1).Visible=true

P.S: I can't belive that it is so simple. VB is great ..last months I do a project in C++ and it is really really AWFUL!

0
 

Author Closing Comment

by:dvplayltd
ID: 36587611
10x.
0
 
LVL 46

Expert Comment

by:Martin Liss
ID: 36587627
Your welcome and I apologize for not including the complete code in my first answer.
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

Title # Comments Views Activity
Write data from SQL to CSV file - position 1 52
VBA color chart bars 12 77
Visual Basic Excel Formatting error 4 83
passing parameter in sql procedure 9 56
Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
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…

910 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

22 Experts available now in Live!

Get 1:1 Help Now