Solved

Add a new Frame control with VB6 at run - time

Posted on 2011-09-23
5
256 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 47

Expert Comment

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

or for more flexibility

Load fraSavePic(Ubound(fraSavePic))
0
 
LVL 47

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 47

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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
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 process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

734 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