Menu
Search




Articles & Documents

Close Tutorials

Newsletter
To receive news about this website, consider subscribing to our Newsletter.
Subscribe
Unsubscribe
22 Subscribers
CPDB.Net

Friends News
Visits

   visitors

   visitor online

Webmaster - Infos
Post an answer

Thanks for taking the time to write this message.

Your user name :

Your e-mail :

Hide your e-mail address to visitors:      
Note: the e-mail address is protected against SPAM.

Subscribe to this thread :      

You are answering to enotar who wrote:


I use the code post here sometimes ago but it stop on compiling at the red line saying "Duplicate frmhandleevent":

Why and how can I fix it?    d

Thank you very much

{$r FirstDA.rsrc}
{$code DAcc,DA01,code,1000}
// DA01 est le CreatorID

Program FirstDA;
{$­­i PalmAPI.pas}
Const
FORM1=1000;

function FrmHandleEvent(formP:FormPtr;var event:EventType):boolean;inline(SYSTRAP,$­A17A);
procedure EvtAddEventToQueue(const event:EventType);inline(SYSTRAP,$­­A11B);

function HandleEvent(var evt:EventType):boolean;
var
frmP : FormPtr;
begin
frmP:=FrmGetActiveForm;
HandleEvent:=false;

case evt.eType of

appStopEvent:
begin
EvtAddEventToQueue(evt);
HandleEvent:=true;
end;


ctlSelectEvent:
begin
WinDrawChars('Hello World !',13,20,20);
end;

penDownEvent:
begin
if (evt.ScreenX<1) or (evt.ScreenX>100) or (evt.ScreenY<1) or (evt.ScreenY>80) then HandleEvent:=true;
end;
end;
end;

procedure AppEventLoop;
var
evt : EventType;
done : boolean;
begin
repeat
EvtGetEvent(evt,evtWaitForever);
if not SysHandleEvent(evt) then
if not FrmHandleEvent(FrmGetActiveForm,evt) then
done:=HandleEvent(evt);
until (evt.eType=appStopEvent) or (done=true);
end;

Var
form:FormPtr;
evt : EventType;
begin

form := FrmInitForm(FORM1);
FrmSetActiveForm(form);
FrmDrawForm(form);

AppEventLoop;

FrmEraseForm(form);
FrmDeleteForm(form);

end.


enotar



Help :

Code Syntax :

  • <color=CodeHexadecimal></color> enables text colouring.
    Note : Instead of the hexadecimal code (#??????), you can specify the name of the colour(red, yellow, orange, green, blue, etc...). For extra info...
  • <bgcolor=CodeHexadecimal></bgcolor> enables the colored highlighting of a text.
    Note : Instead of the hexadecimal code (#??????), you can specify the name of the colour(red, yellow, orange, green, blue, etc...). For extra info...
  • <b></b> enables the emboldening of a text.
  • <i></i> enables the italicising of a text.
  • <u></u> enables the underlining of a text.
  • <cite></cite> enables quotation inserting.
    Note : You can specify the name of the authors by typing <cite=Author>
  • <code></code> enables code inserting.
    Note : You can specify the language by typing <code=LanguageName>
  • <left></left> enables left align.
  • <center></center> enables center align.
  • <right></right> enables right align.
  • <link></link> enables link inserting.
    Note : You can specify the link URL by typing <link=URL>text</link>. If you do not specify the link URL, the URL will be the one between the two tags.<link>URL</link>
  • <img=SmileyName> enables smiley insertion.
    Note : The names of available basic smileys are : cool, wink, biggrin, smile, frown, eek, mad, confused, rolleyes, tongue, cry. For extra info...

Access keys (under Windows) :

  • Key SHIFT + arrow (right or left) enables text selection
  • Key ALT + 2 enables toolbar selection
  • Key ALT + 3 enables editing zone selection
  • Key ALT + 4 displays Help
  • Key ALT + 5 hides Help
  • Key TAB enables going from one selection to the next
  • Key SHIFT + TAB enables going from one selection to the previous
  • Key ALT + arrow (towards bottom or top) enables folding out of the selected menu
  • Key ALT + arrow (towards bottom or top) enables the folding up of a spread out menu
  • Key arrow (towards bottom or top) enables the browsing through a spread out menu
  • Key ALT + s enables form sending

   |     |  Bold  Italic  Underline  Insert a quotation    Align Left  Center justify  Align Right  Insert a link  Insert Smiley (popup)  Preview (popup)  Display Help   
smiley cool  smiley wink  smiley biggrin  smiley smile  smiley frown  smiley eek  smiley mad  smiley confused  smiley rolleyes  smiley tongue  smiley cry 
Captcha reload
Copy the text:


 

^ Top ^