home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
magazine
/
pctchnqs
/
1990
/
number4
/
hwmain.pas
< prev
next >
Wrap
Pascal/Delphi Source File
|
1990-06-20
|
975b
|
49 lines
{$S-,I-,R-}
unit HWmain;
interface
uses
OpSwap1;
procedure HelloWorldMain;
implementation
const
HotKey = $080F; {code for Alt-Tab}
Swap1 = 'HELLO1.SWP';
Swap2 = 'HELLO2.SWP';
{$F+}
procedure PopupEntryPoint;
{-Routine called when our hotkey is pressed}
begin
WriteLn('Hello world!');
end;
{$F-}
procedure HelloWorldMain;
{-Define a popup and go resident}
begin
{disable swapping message if swapping to EMS}
SetSwapMsgOn( not WillSwapUseEms(ParagraphsToKeep) );
{define the popup}
if DefinePop(HotKey, PopupEntryPoint, Ptr(SSeg,SPtr)) then begin
WriteLn('TSR loaded, press <Alt><Tab> to activate.');
{Make popup routines active.}
PopupsOn;
{try to go resident}
StayResSwap(ParagraphsToKeep, 0, Swap1, Swap2, True);
end;
{if we get here we failed to go resident}
WriteLn('Unable to go resident.');
end;
end.