Solved

Add a new Frame control with VB6 at run - time

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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

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 …
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
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…
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…

813 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

8 Experts available now in Live!

Get 1:1 Help Now