on 11-24-2004 11:48 AM
Hi friends , i've a boring problem.
I would keep alive my application developed with MS Visual Basic.NET ,that works without any windows form.
With a windows form it works very well ,but ,without it(as I want), my application dies and doesn't catch any SBO events.
What should i do?
Thank you very much.
Bye
Giammi
Hello Giammichele,
if you want to keep your application alive, you can create the following SUb Main
Public Sub Main()
Dim m_MyAddOn as MyAddOn
m_MyAddOn = New MyAddOn(MyParameters)
System.Windows.Forms.Application.Run()
End Sub
MyAddOn would be a class that contains the Application object
System.Windows.Forms.Application.Run() will keep your application running until you have an Application.Exit
Sébastien
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
yes, it's possible to use Form.Hide )
Or you can make a cycle in startup object Sub Main() -->
'*********************************************
'this is the message loop
'we use it to catch Events and dispatch them
'don't forget to terminate the Add On by
'placing 'End' at the required spot
'*********************************************
Do While GetMessage(MessageAPIs.Msg, 0, 0, 0)
TranslateMessage(MessageAPIs.Msg)
DispatchMessage(MessageAPIs.Msg)
System.Windows.Forms.Application.DoEvents()
Loop
Good bye
Tomas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Giammichele,
Why dont you just use the form, and put a Me.Hide() in the load event?
This works for me. Regards,
Ibai Peñ
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
107 | |
12 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.