473,461 Members | 1,361 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

PreProcessMessage

Hi All
i am trying to override the PreProcessMessage for the form
and i am using this code

public override bool PreProcessMessage(ref Message msg)
{
switch (msg.Msg)
{
case WM_RBUTTONDOWN: return true;
default: return base.PreProcessMessage(ref msg);
}
}

but this code never been called
i am wondering, why ?
Dec 24 '07 #1
1 8565
PreProcessMessage is used for keyboard or input messages before they are
dispatched. This is used for things like accelerator keys and the like, not
for mouse clicks.

You should override WndProc if you want to process this message.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Just close your eyes and see"
<Ju*********************@discussions.microsoft.com wrote in message
news:69**********************************@microsof t.com...
Hi All
i am trying to override the PreProcessMessage for the form
and i am using this code

public override bool PreProcessMessage(ref Message msg)
{
switch (msg.Msg)
{
case WM_RBUTTONDOWN: return true;
default: return base.PreProcessMessage(ref msg);
}
}

but this code never been called
i am wondering, why ?

Dec 24 '07 #2

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

Similar topics

0
by: Koert | last post by:
Hi, In the NumericUpDown control I have to detect that Tab was pressed so I have overroden the PreProcessMessage function. In for example the DateTimePicker this works fine but not in the...
0
by: sbdsolna | last post by:
Hi -- I've a inherited DataGrid and a public override PreProcessMessage The problem is that the method PreProcessMessage is not fired for the last row on the DataGrid. public class...
2
by: Benny Raymond | last post by:
I need to be able to process the message WM_MOVING and WM_MOVE, however I noticed that the following breakpoint in PreProcessMessage isn't hit on move (it does get hit when I press alt for instance...
1
by: mike | last post by:
I posted before and got the reply below, which really doesn't help me at all. I really didn't understand what the responder was talking about I'd like someone who is a microsoft expert to help...
0
by: Koert | last post by:
Hi In the NumericUpDown control I have to detect that Tab was pressed so I have inherited the NumericUpDown and overroden the PreProcessMessage function. In the DateTimePicker (for example) this...
3
by: Carmen de Lara | last post by:
hello to all, I found in Internet the following code that is very usefull to me. The code detects any character that is entered to datagrid, I am interested in the control key F2 but I don't know...
6
by: Geoff Jones | last post by:
Hiya Can anybody help me with the following? I'm overriding PreProcessMessage on a DataGrid in order to capture keys. However, the function is only called sometimes i.e. there doesn't seem to...
0
by: John Smith | last post by:
Hi All; I have implemented Syncfusion's suggested code sample to verify the deletion of DataGrid rows as follows: Public Overrides Function PreProcessMessage(ByRef msg As...
19
by: M. Posseth | last post by:
Hi ,, i live in Europe in Europe the decimal seperator is , not a . why is it so that if i press on my numeric keypad the . a . appears ?? in my opinion it should be a , ( sounds odd but...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.