Re: Where is TApplication located?
- From: Nicholas Sherlock <n_sherlock@xxxxxxxxxxx>
- Date: Fri, 30 Sep 2005 12:57:32 +1200
Adam Sandler wrote:
I'm trying to correct some buggy mouse wheel behavior in the DBGrid... A colleague told me how to fix it and sent me this URL... http://delphi.about.com/cs/adptips2002/a/bltip1102_3.htm
Whoever wrote that article is a little weird. Use the routine given, but make it a method of your form:
procedure TForm1.OnMessage
(var Msg: TMsg; var Handled: Boolean) ;
var
i: SmallInt;
begin
if Msg.message = WM_MOUSEWHEEL then
begin
Msg.message := WM_KEYDOWN;
Msg.lParam := 0;
i := HiWord(Msg.wParam) ;
if i > 0 then
Msg.wParam := VK_UP
else
Msg.wParam := VK_DOWN;Handled := False; end; end;
Then in your form's oncreate:
application.onmessage:=onmessage;
Cheers, Nicholas Sherlock .
- Follow-Ups:
- Re: Where is TApplication located?
- From: Ante Smolcic
- Re: Where is TApplication located?
- From: Maarten Wiltink
- Re: Where is TApplication located?
- References:
- Where is TApplication located?
- From: Adam Sandler
- Re: Where is TApplication located?
- From: Maarten Wiltink
- Re: Where is TApplication located?
- From: Adam Sandler
- Where is TApplication located?
- Prev by Date: Re: Where is TApplication located?
- Next by Date: Re: WaveIn Problem in XP
- Previous by thread: Re: Where is TApplication located?
- Next by thread: Re: Where is TApplication located?
- Index(es):
Relevant Pages
|
|