Jump to content
Xtreme .Net Talk

Recommended Posts

Posted (edited)

I want to work with Windows Message and I began programming, but then at runtime I got the following error:

 

"Message Queuing has not been installed on this computer"

 

What should I do about this? I've got VS 2003 Academic(Professional in some ways) edition

 

Or is this not the way to intercept WM messages?

Edited by Himo

For questions about VS .net extensibility, please fire at me! :)

For readability, please use the [ CS][/CS ] tags

Posted

I'm trying to intercept the WM messages that windows sends to my application. I thought the Messaging Queue was a good lead to begin, but it's not installed/working.

 

BTW: Messaging service is running

For questions about VS .net extensibility, please fire at me! :)

For readability, please use the [ CS][/CS ] tags

  • Administrators
Posted

In that case you can ignore System.Messaging.Dll as that is entirely to do with message queuing and not related to to windows messages; also the messaging service is not required either.

From a windows form you can override the form's WndProc method

 

Protected Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message)
   'typically something like
   Select Case m.Msg  'WM_ message
   End Select
End Sub

Posting Guidelines FAQ Post Formatting

 

Intellectuals solve problems; geniuses prevent them.

-- Albert Einstein

Posted
That sounds familiar, I already did this in Visual C++ 6 at school, but wanted to do this in .Net. Thanks :D

For questions about VS .net extensibility, please fire at me! :)

For readability, please use the [ CS][/CS ] tags

Posted
I got this to work, but now I'm wondering. In C++ you could just include windows.h to have all the WM message constants at hand. But how is this done in C# or VB for that matter? When opening windows.h I saw nothing more than a bunch of more includes, so I kinda stopped looking after searching for WinMessages and WM.

For questions about VS .net extensibility, please fire at me! :)

For readability, please use the [ CS][/CS ] tags

  • Administrators
Posted

You would have to define the constants for the relevant WM_* messages yourself. Clicky has a useful list to be getting on with.

Also it might be worth seeing if the functionality you are trying to achieve is already part of the .Net framework to begin with - could save you a lot of time and trouble.

Posting Guidelines FAQ Post Formatting

 

Intellectuals solve problems; geniuses prevent them.

-- Albert Einstein

Posted

It's just for learning, so it may be a bit working around. Thanks again :)

I was just looking for that. I put all the constants in a public class, so I can easily access them.

For questions about VS .net extensibility, please fire at me! :)

For readability, please use the [ CS][/CS ] tags

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...