Hi,
I'd like to introduce some corrections
>        
>       var
>     h : pWINDOWPLACEMENT;
>     begin
>        getmem(h,sizeof(h));
Well, you might get memory of the size of a pointer, which is 4! better write
         GetMem(k,SizeOf(h^));
The following call *NEEDS* that the Structure is initialized with the correct 
length so
         h^.length := SizeOf(h^); // here we might ommit the first ^
>        if GetWindowPlacement(application.Handle,h) then // don't give form's 
> handle rather give application handle.
>          if h.showCmd = SW_SHOWMINIMIZED then
>            showmessage('timer');
>         freemem(h,sizeof(h));
same here, better write
          freemem(h,SizeOf(h^));
>     end;
have fun, happy de-bugging
Bob

>     



-----------------------------------------------------
Home page: http://groups.yahoo.com/group/delphi-en/
To unsubscribe: [EMAIL PROTECTED] 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/delphi-en/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to