Solved

New Form

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

Expert Comment

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

Author Comment

by:thenrich
Comment Utility
no way to do it then ??
0
 
LVL 5

Author Comment

by:thenrich
Comment Utility
How can I display a modeless message from a control?
0
 
LVL 18

Expert Comment

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

Expert Comment

by:Crash2100
Comment Utility
msgbox "hello"
0
 
LVL 5

Author Comment

by:thenrich
Comment Utility
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
Comment Utility
Crash2100,

msgbox "hello"
is quite modal
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
Comment Utility
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
Comment Utility
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
Comment Utility
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 1

Expert Comment

by:alfanhendro
Comment Utility
what is modeless?
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
Comment Utility
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
Comment Utility
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
Comment Utility
0
 
LVL 16

Accepted Solution

by:
Richie_Simonetti earned 50 total points
Comment Utility
0
 
LVL 5

Author Comment

by:thenrich
Comment Utility
I think I can do something with 1 of these examples.

thx
0
 
LVL 5

Author Comment

by:thenrich
Comment Utility
I think I can do something with 1 of these examples.

thx
0
 
LVL 16

Expert Comment

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

Author Comment

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

Expert Comment

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

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
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…

728 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

13 Experts available now in Live!

Get 1:1 Help Now