Solved

New Form

Posted on 2002-04-25
20
126 Views
Last Modified: 2010-05-02
How do I generate a new form at runtime in an ActiveX contol?
0
Comment
Question by:thenrich
[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
  • 8
  • 7
  • 2
  • +3
20 Comments
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 6969527
if i remember well you need a form already in you project to do that.
0
 
LVL 5

Author Comment

by:thenrich
ID: 6969533
no way to do it then ??
0
 
LVL 5

Author Comment

by:thenrich
ID: 6969536
How can I display a modeless message from a control?
0
Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

 
LVL 18

Expert Comment

by:Crash2100
ID: 6969543
Private Sub Command1_Click()
    Dim Form2 As New Form1
    Form2.Show
End Sub
0
 
LVL 18

Expert Comment

by:Crash2100
ID: 6969561
msgbox "hello"
0
 
LVL 5

Author Comment

by:thenrich
ID: 6969563
Crash2100, I don't have a Form1 to start with.
I'm trying to do this:


Private Sub Command1_Click()
   Dim Form2 As Form
   Set Form2 = New Form
End Sub
0
 
LVL 5

Author Comment

by:thenrich
ID: 6969570
Crash2100,

msgbox "hello"
is quite modal
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 6969651
msgbox is not modeless. is it necessary a form?, could'nt be other control instead (a picture box in example)?
0
 
LVL 28

Expert Comment

by:AzraSound
ID: 6969671
If you need a very basic window, you may achieve what you need via API:

http://www.shrinkwrapvb.com/createw.htm
0
 
LVL 7

Expert Comment

by:Z_Beeblebrox
ID: 6969704
Can't you just create the form in your project at design time, then modify the message and whatever else you want at run time, then display it modelessly?

Zaphod.
0
 
LVL 1

Expert Comment

by:alfanhendro
ID: 6970219
what is modeless?
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 6970357
vbmodeless means no modal, which is the behaviour of a window that indicates that you could continue working with other windows in the application. Just remeber that msgbox are modal, until you close it, you can't do anything else with the app that shows one of them.
0
 
LVL 5

Author Comment

by:thenrich
ID: 6971049
Ok let's try this .....
how bout some message boxes with timer's. Sites, ideas, etc.

Baiscally what I'm doing is creating a control that allows me to shut down an application on a server. The Control works just fine except for 1 sticky point. If I display a messagebox saying that the application will close in 30 seconds, the user must first hit the ok button to instantiate the timer. If I instantiate the timer before the messagebox it still waits for a response from the messagebox.

0
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 6971101
0
 
LVL 16

Accepted Solution

by:
Richie_Simonetti earned 50 total points
ID: 6971118
0
 
LVL 5

Author Comment

by:thenrich
ID: 6971167
I think I can do something with 1 of these examples.

thx
0
 
LVL 5

Author Comment

by:thenrich
ID: 6971172
I think I can do something with 1 of these examples.

thx
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 6971261
Thanks for "A" grade. Did you forgive me for my first contact with you?
Cheers.
0
 
LVL 5

Author Comment

by:thenrich
ID: 6971271
I'll let it slide ........... Just this once! thx for the help.
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 6990040
No, no, i was talking about VERY first one! You gave me my first experts points for a very bad ANSWER...
;)
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
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…
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…

738 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