Solved

Add a new Frame control with VB6 at run - time

Posted on 2011-09-23
5
243 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 45

Expert Comment

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

or for more flexibility

Load fraSavePic(Ubound(fraSavePic))
0
 
LVL 45

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 45

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

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 In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
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…
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…

705 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

18 Experts available now in Live!

Get 1:1 Help Now