Цитата:
Сообщение от Erilar
Где в реестре записал? дай этот кусок кода пожалуйста 
|
В реестре \HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon и параметру Shell присвоил значение c:\MyProgram.exe
Кусок кода
Код:
procedure TFormMain.MsgEvent(Sender: TObject; WP, LP: Integer);
var
Event, PMUnit: Integer;
ID, Cnt: Integer;
S: string;
begin
Event := (WP shr 4) and $000F;
PMUnit := WP and $000F;
case Event of
// STATUS OF PAYMENT UNIT
msgStatus:
begin
case PMUnit of
msgDevPaymentManagerDLL:
ShowEvent(Format('PaymentManager Status: %d', [LP]));
msgDevCoinChangerValidator:
begin
case LP of
msgStatusFound:
begin
ShowEvent('Coin validator connected');
end;
// Accepted cash item routed to
$00000010..$0000001F:
begin
case (WP and $0F) of
1:
begin
showmessage('WP');
if (LP) = $10 then
begin
ShowEvent('Coin routed to box');
ShowMessage('Coin routed to box');
end
else
begin
ShowMessage('Coin routed to cassette');
end;
end;
end;
end;
Если приложение запускать из под Виндоус, то сообщение показывается ShowMessage('Coin routed to box');
А если запускать при старте компьютера, то не показывается...