473,320 Members | 1,974 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.

Creating/Using a messageloop without a form

Plater
7,872 Expert 4TB
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 that you can use Application.Run() without an argument to create a loop without a form, but I have no way of sending messages to that loop (that i have figured out)
I've tried using:
Expand|Select|Wrap|Line Numbers
  1. Application.AddMessageFilter(ft);
  2. Application.MessageLoopCallback mlc = new Application.MessageLoopCallback(mlc_target);
  3. Application.RegisterMessageLoop(mlc);
  4.  
And that messageFilter *DOES* catch a single WM_CLOSE message when I close the entire application, but I cannot seem to get any other messages through there.

I have even tried with creating a form and then hiding it (it flashes on screen, not a big deal), but it doesn't not register itself as the "MainWindowHandle" if its hidden, so I cannot use a Process call to get it.

I was just looking for a way to interact back and forth with a service (I set it to have access to the desktop or nothing worked at all) and I didn't like the custom command as it was only a one way street. (Fun for triggering things, but not much else)
I guess my real goal was to have a "front end" software to a service, that can be run without having to talk via sockets or etc.

Am I missing a fundamental communication possibility here?
Oct 12 '09 #1
0 2045

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Matthew Clubb | last post by:
Hi, I need help developing an expanding form I've decided that a use of PHP, Mysql and Javascript is the best platform for creating a selection of database interfaces which I'm trying to build...
1
by: JosR | last post by:
Using: VB.Net, Framework 1.1, Windows XP SP2 Hardware: Pentium IV 3,1 GHz, 1 Gb RAM memory The VB.Net application opens a child form as follows: Private Sub OpenChildForm() dim frm as new...
2
by: Iain Miller | last post by:
Now this shouldn't be hard but I've been struggling on the best way as to how to do this one for a day or 3 so I thought I'd ask the assembled company..... I'm writing an application that tracks...
8
by: Nanda | last post by:
hi, I am trying to generate parameters for the updatecommand at runtime. this.oleDbDeleteCommand1.CommandText=cmdtext; this.oleDbDeleteCommand1.Connection =this.oleDbConnection1;...
4
by: guy | last post by:
i am trying to create a custom Combobox from scratch. this requires that i create the list that the combobox opens. i've used the ListBox control to do this. my problem is that i don't know how...
1
by: Marcel Hug | last post by:
Hi NG ! I have already written a task about MVC and I tried to get the best informations together. I would like to implement the MVC pattern and it work on the way I did it. At first i know the...
2
by: RottNKorpse | last post by:
Well I am trying to make an admin section to allow my other admins of my site able to add content to my mysql database without giving them phpmyadmin access and without teaching them out to use it as...
8
by: redeagle | last post by:
I'm wondering what the best practice is for creating a WinApp "wizard" that contains 4 or 5 "steps". Options so far are 1) Single WinForm making various controls visible/non visible at the...
5
by: dk60 | last post by:
Here is a problem I encountered concerning threads: Here is the code in Form1 button click handler: AddForm addForm = new AddForm(booksDataSet.Titles); Thread addTitleThread=new Thread(new...
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...
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: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
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)...
0
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: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
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

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.