Solved

New Form

Posted on 2002-04-25
20
125 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
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!

 
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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
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…
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…

735 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