473,320 Members | 2,080 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Using Application.Run() without a form

Is it possible to put a VB.NET application in a message loop without a form?
From what I've read the method Application.Run() (parameterless) allows for
this...but how do you define the message loop handler that's the equivalent
of WndProc for an application that does not have a form? Unfortunately
Application.Run(new form()) makes the form visible so using a dummy form
doesn't work here. Thanks in advance for any help.

-Mike

Nov 21 '05 #1
4 5471
"mike2036" <mi******@discussions.microsoft.com> schrieb:
Is it possible to put a VB.NET application in a message loop without a
form?
From what I've read the method Application.Run() (parameterless) allows
for
this...but how do you define the message loop handler that's the
equivalent
of WndProc for an application that does not have a form? Unfortunately
Application.Run(new form()) makes the form visible so using a dummy form
doesn't work here. Thanks in advance for any help.


Check out 'Application.AddMessageFilter' in the documentation.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #2
Hi Herfried,

Thanks for the reply. Do I still need a hidden form using a message filter,
since I need to pass a handle to external app's to be signaled with messages?
Or can I get the application handle somehow from a formless app?

-Mike

"Herfried K. Wagner [MVP]" wrote:
"mike2036" <mi******@discussions.microsoft.com> schrieb:
Is it possible to put a VB.NET application in a message loop without a
form?
From what I've read the method Application.Run() (parameterless) allows
for
this...but how do you define the message loop handler that's the
equivalent
of WndProc for an application that does not have a form? Unfortunately
Application.Run(new form()) makes the form visible so using a dummy form
doesn't work here. Thanks in advance for any help.


Check out 'Application.AddMessageFilter' in the documentation.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #3
"mike2036" <mi******@discussions.microsoft.com> schrieb:
Thanks for the reply. Do I still need a hidden form using a message
filter,
since I need to pass a handle to external app's to be signaled with
messages?
Or can I get the application handle somehow from a formless app?


If the other application requires a window handle, you'll have to create a
window.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #4
Addendum:

Background information:

<URL:http://msdn.microsoft.com/library/en-us/winui/winui/windowsuserinterface/windowing/windows/windowfeatures.asp?frame=true#message_only>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: joseph | last post by:
Hi, I would like to run a windows application without the user interface. Console application is not a choice because it does not allow to use ADO controls. When I start the Windows Application I...
1
by: Erik Jensen | last post by:
I am interested in calling Application.Run() without passing a first form as the argument to the Run method. Reason being is that i would like to instantiate some helper or foundation classes...
13
by: Andrew | last post by:
I use conditional compiler constants, set through the VBA IDE in Tools, <projectname> Properties, that I refer to throughout my code to control which code is used during development, and which...
11
by: Grasshopper | last post by:
Hi, I am automating Access reports to PDF using PDF Writer 6.0. I've created a DTS package to run the reports and schedule a job to run this DTS package. If I PC Anywhere into the server on...
7
by: Zeke | last post by:
I'm using the following code to create word document but the problem is if you go to task manager you'll see a WINWORD.EXE process is running but not the application, here is the code: ...
2
by: Phuff | last post by:
I have an application that should run in the system tray while open. It is supposed to be open at all times and I need it to dissapear when the "X" button is pushed on the form...but without...
8
by: mike2036 | last post by:
I have an application (that has unmanaged code) and when I launch it without 'FullTrust' permissions (LocalIntranet_Zone), it crashes. When I set 'FullTrust' permissions, it launches fine. Is...
0
by: jan.loucka | last post by:
We're running Windows Forms application written in .NET 2.0 (c#). The application is single threaded app - it starts without any form (Application.run()). After that we start another application...
0
Plater
by: Plater | last post by:
I have been trying to access a messageloop without opening a form. That is, I want to be able to receive messages from other applications through the message loop without having a form. I've read...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.