Вниз
Скачать: CL | DM;

mbLeft or mbRight?   Найти похожие ветки 

 
stals ©   (2006-07-29 09:57) [0]

Давненько я на KOL ничего не писал...
Почему-то не работает нижеследущее, в watch"e пишет "a: (out of bound) 8".
Что делаю не так? :-/
------------------------------------------------------------
program Project1;
uses
 KOL, windows, messages;
var
 form , button :PControl;

procedure ButtonDown( Sender: PControl; var Mouse: TMouseEventData );
var a : TMouseButton;
begin
 a:=Mouse.Button;
 if Mouse.Button=mbright then MsgOK("Right");
 if Mouse.Button=mbleft then MsgOK("Left");
end;

begin
 form := NewForm(Applet,"Window");
 Button := NewButton(Form, "Button");
 Button.OnMouseDown := TOnMouse( MakeMethod( nil, @ButtonDown ) );
 run(form);
end.
------------------------------------------------------------

И в догонку: что-то не могу свой курсор из res-файла достать,
киньте строчку, блин... :)


 
thaddy   (2006-07-29 13:01) [1]

procedure ButtonDown( Dummy:pointer;Sender: PControl; var Mouse: TMouseEventData );
And makemethod!!!

remember?


 
Stals ©   (2006-07-30 12:29) [2]

:p Thanks...



Страницы: 1 вся ветка

Скачать: CL | DM;



Память: 0.45 MB
Время: 0.027 c
15-1173612964
Kerk
2007-03-11 14:36
2007.04.01
Знатокам линукса


2-1173596714
_uw_
2007-03-11 10:05
2007.04.01
Курсы валют


3-1168691845
SerJaNT
2007-01-13 15:37
2007.04.01
Can not open a result set


9-1145972892
KiberKot
2006-04-25 17:48
2007.04.01
Нажатие двух клавиш


15-1173276490
Sam Stone
2007-03-07 17:08
2007.04.01
Miranda 0.6.7




   Наверх