• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 133
  • Last Modified:

New Form

How do I generate a new form at runtime in an ActiveX contol?
0
thenrich
Asked:
thenrich
  • 8
  • 7
  • 2
  • +3
1 Solution
 
Richie_SimonettiIT OperationsCommented:
if i remember well you need a form already in you project to do that.
0
 
thenrichAuthor Commented:
no way to do it then ??
0
 
thenrichAuthor Commented:
How can I display a modeless message from a control?
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
Crash2100Commented:
Private Sub Command1_Click()
    Dim Form2 As New Form1
    Form2.Show
End Sub
0
 
Crash2100Commented:
msgbox "hello"
0
 
thenrichAuthor Commented:
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
 
thenrichAuthor Commented:
Crash2100,

msgbox "hello"
is quite modal
0
 
Richie_SimonettiIT OperationsCommented:
msgbox is not modeless. is it necessary a form?, could'nt be other control instead (a picture box in example)?
0
 
AzraSoundCommented:
If you need a very basic window, you may achieve what you need via API:

http://www.shrinkwrapvb.com/createw.htm
0
 
Z_BeeblebroxCommented:
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
 
alfanhendroCommented:
what is modeless?
0
 
Richie_SimonettiIT OperationsCommented:
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
 
thenrichAuthor Commented:
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
 
Richie_SimonettiIT OperationsCommented:
0
 
Richie_SimonettiIT OperationsCommented:
0
 
thenrichAuthor Commented:
I think I can do something with 1 of these examples.

thx
0
 
thenrichAuthor Commented:
I think I can do something with 1 of these examples.

thx
0
 
Richie_SimonettiIT OperationsCommented:
Thanks for "A" grade. Did you forgive me for my first contact with you?
Cheers.
0
 
thenrichAuthor Commented:
I'll let it slide ........... Just this once! thx for the help.
0
 
Richie_SimonettiIT OperationsCommented:
No, no, i was talking about VERY first one! You gave me my first experts points for a very bad ANSWER...
;)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

  • 8
  • 7
  • 2
  • +3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now