List Info

Thread: Solved: How can I make a form globally "topmost" without having a taskbar button




Solved: How can I make a form globally "topmost" without having a taskbar button
country flaguser name
United States
2007-09-26 15:06:59

Many thanks Vladimir. That solved my task. Great!!!

However, I have one more related problem left:

My application may create several child forms in runtime. I want to
make them topmost too.
Setting WndParent:=0 displays a button for the child form which I
don't want.
Making the child form a ToolWindow causes a thinner caption bar which
I don't want neither.

By setting WndParent:=MainForm.Handle I can almost make it work, but
the child forms do not minimize when the mainform is minimized.

Is there any simple solution to this or do I have to iterate through
the child windows in the WMSysCommand message handler and use
ShowWindow() in a similar way as for the mainForm?

BR,
Lars

--- In delphi-en%40yahoogroups.com">delphi-enyahoogroups.com, "Vladimir Yushko&quot; <yahoo...> wrote:
&gt;
> Hi,
> You should override following methods:
>
> procedure WMSysCommand(var Message: TWMSysCommand); message
> WM_SYSCOMMAND;
>
> procedure TTaskForm.WMSysCommand(var Message: TWMSysCommand);
&gt; begin
&gt; case (Message.cmdtype and $FFF0) of
> SC_MINIMIZE:
> begin
&gt; ShowWindow(handle, SW_MINIMIZE);
> Message.result := 0;
> end;
>; SC_RESTORE:
> begin
&gt; ShowWindow(handle, SW_RESTORE);
> Message.result := 0;
> end;
>; else
>; inherited;
> end;
>; end;
>;
> procedure TTaskForm.CreateParams(var Params: TCreateParams);
&gt; begin
&gt; inherited CreateParams(Params);
> //Show a button for the main form
>; with Params do begin
&gt; ExStyle := ExStyle or WS_EX_APPWINDOW and not WS_EX_TOOLWINDOW;
&gt; WndParent := 0;
> end;
>; end;
>;
> procedure TTaskForm.DoClose(var Action: TCloseAction);
>; begin
&gt; inherited;
> Action := caFree;
> end;
>;
> --
> Vladimir Yushko
&gt; http://yarrowsoft.com/ solutions for Outlook Express
>
> ----- Original Message -----
&gt; From: "lars_stahre&quot; <lst...>
> To: < delphi-en%40yahoogroups.com">delphi-enyahoogroups.com>
> Sent: Tuesday, September 25, 2007 1:37 AM
> Subject: [delphi-en] Re: How can I make a form globally "topmost"
without
> having a taskbar button
&gt;
>
> > Hello my friends and thank you for your quick suggestions.
> > My appologize for responding slowly. -I have been unavailable for
> > some while.
&gt; >
>; > Vladimir - Your suggestions definitely makes the window topmost
if I
> > also set the desktop as the window owner (instead of the
application).
&gt; > However, when I hide the extra button the button that is left
still
> > does not work properly. The maximize and minimize choices doesn't
> > work.
&gt; > Does anyone know how to correct this?
&gt; >
>; > BR,
> > Lars
>; >
>; >
>; >
>; > --- In delphi-en%40yahoogroups.com">delphi-enyahoogroups.com, "Vladimir Yushko&quot; <yahoo>
>; > wrote:
&gt; > >
>; > > Hi!
> > > First hide the button created by Delphi for the Application:
> > >
>; > > ShowWindow(Application.Handle, SW_HIDE);
> > > SetWindowLong(Application.Handle, GWL_EXSTYLE,
> > > GetWindowLong(Application.Handle, GWL_EXSTYLE) or
> > > WS_EX_TOOLWINDOW and not WS_EX_APPWINDOW);
> > > ShowWindow(Application.Handle, SW_SHOW);
> > >
>; > > --
> > > Vladimir Yushko
&gt; > > http://yarrowsoft.com/
> > >
>; > > ---
> > >
>; >
>; >
>; >
>; >
>; > -----------------------------------------------------
> > Home page: http://groups.yahoo.com/group/delphi-en/
> > To unsubscribe: delphi-en-unsubscribe%40yahoogroups.com">delphi-en-unsubscribeyahoogroups.com
&gt; > Yahoo! Groups Links
&gt; >
>; >
>; >
>; >
>; >
>;

__._,_.___
.

__,_._,___
Can i Acess Recordset with index Value .
country flaguser name
United States
2007-09-26 23:49:49

Can i access _recordset with index value ..
i dont wanted to reach index value by using Recordset.movenext
i want to access it like an array .. pass an index and access it .. is this possible in _recordset.

-------------------------------------------------------
Summit Information Technologies Limited, Gurgaon, India

[Non-text portions of this message have been removed]

__._,_.___
.

__,_._,___
Re: Solved: How can I make a form globally "topmost" without having a taskbar button
user name
2007-09-26 23:28:46

Oh Lars, what do you think about:
for i := 0 to ChildForms.Count - 1 do
ShowWindow(ChildsForms[i].Handle, SW_MINIMIZE);

--
Vladimir Yushko
http://yarrowsoft.com/ applications for Outlook Express

----- Original Message -----
From: "lars_stahre&quot; < lst%40lse.se">lstlse.se>;
To: < delphi-en%40yahoogroups.com">delphi-enyahoogroups.com>
Sent: Thursday, September 27, 2007 12:06 AM
Subject: [delphi-en] Solved: How can I make a form globally "topmost"
without having a taskbar button

> Many thanks Vladimir. That solved my task. Great!!!
>
>; However, I have one more related problem left:
&gt;
> My application may create several child forms in runtime. I want to
> make them topmost too.
>; Setting WndParent:=0 displays a button for the child form which I
> don't want.
&gt; Making the child form a ToolWindow causes a thinner caption bar which
&gt; I don't want neither.
>
>; By setting WndParent:=MainForm.Handle I can almost make it work, but
> the child forms do not minimize when the mainform is minimized.
>
&gt; Is there any simple solution to this or do I have to iterate through
> the child windows in the WMSysCommand message handler and use
> ShowWindow() in a similar way as for the mainForm?
>
&gt; BR,
> Lars
>;
>
> --- In delphi-en%40yahoogroups.com">delphi-enyahoogroups.com, "Vladimir Yushko&quot; <yahoo...> wrote:
&gt; >
>; > Hi,
> > You should override following methods:
> >
>; > procedure WMSysCommand(var Message: TWMSysCommand); message
> > WM_SYSCOMMAND;
> >
>; > procedure TTaskForm.WMSysCommand(var Message: TWMSysCommand);
&gt; > begin
&gt; > case (Message.cmdtype and $FFF0) of
> > SC_MINIMIZE:
> > begin
&gt; > ShowWindow(handle, SW_MINIMIZE);
> > Message.result := 0;
> > end;
>; > SC_RESTORE:
> > begin
&gt; > ShowWindow(handle, SW_RESTORE);
> > Message.result := 0;
> > end;
>; > else
>; > inherited;
> > end;
>; > end;
>; >
>; > procedure TTaskForm.CreateParams(var Params: TCreateParams);
&gt; > begin
&gt; > inherited CreateParams(Params);
> > //Show a button for the main form
>; > with Params do begin
&gt; > ExStyle := ExStyle or WS_EX_APPWINDOW and not WS_EX_TOOLWINDOW;
&gt; > WndParent := 0;
> > end;
>; > end;
>; >
>; > procedure TTaskForm.DoClose(var Action: TCloseAction);
>; > begin
&gt; > inherited;
> > Action := caFree;
> > end;
>; >
>; > --
> > Vladimir Yushko
&gt; > http://yarrowsoft.com/ solutions for Outlook Express
> >
>; > ----- Original Message -----
&gt; > From: "lars_stahre&quot; <lst...>
> > To: < delphi-en%40yahoogroups.com">delphi-enyahoogroups.com>
> > Sent: Tuesday, September 25, 2007 1:37 AM
> > Subject: [delphi-en] Re: How can I make a form globally "topmost"
> without
> > having a taskbar button
&gt; >
>; >
>; > > Hello my friends and thank you for your quick suggestions.
> > > My appologize for responding slowly. -I have been unavailable for
> > > some while.
&gt; > >
>; > > Vladimir - Your suggestions definitely makes the window topmost
> if I
> > > also set the desktop as the window owner (instead of the
> application).
> > > However, when I hide the extra button the button that is left
>; still
&gt; > > does not work properly. The maximize and minimize choices doesn't
> > > work.
&gt; > > Does anyone know how to correct this?
&gt; > >
>; > > BR,
> > > Lars
>; > >
>; > >
>; > >
>; > > --- In delphi-en%40yahoogroups.com">delphi-enyahoogroups.com, "Vladimir Yushko&quot; <yahoo>
>; > > wrote:
&gt; > > >
>; > > > Hi!
> > > > First hide the button created by Delphi for the Application:
> > > >
>; > > > ShowWindow(Application.Handle, SW_HIDE);
> > > > SetWindowLong(Application.Handle, GWL_EXSTYLE,
> > > > GetWindowLong(Application.Handle, GWL_EXSTYLE) or
> > > > WS_EX_TOOLWINDOW and not WS_EX_APPWINDOW);
> > > > ShowWindow(Application.Handle, SW_SHOW);
> > > >
>; > > > --
> > > > Vladimir Yushko
&gt; > > > http://yarrowsoft.com/
> > > >
>; > > > ---
> > > >
>; > >
>; > >
>; > >
>; > >
>; > > -----------------------------------------------------
> > > Home page: http://groups.yahoo.com/group/delphi-en/
> > > To unsubscribe: delphi-en-unsubscribe%40yahoogroups.com">delphi-en-unsubscribeyahoogroups.com
&gt; > > Yahoo! Groups Links
&gt; > >
>; > >
>; > >
>; > >
>; > >
>; >
>;
>
>
>
> -----------------------------------------------------
> Home page: http://groups.yahoo.com/group/delphi-en/
> To unsubscribe: delphi-en-unsubscribe%40yahoogroups.com">delphi-en-unsubscribeyahoogroups.com
&gt; Yahoo! Groups Links
&gt;
>
>
>;
>

__._,_.___
.

__,_._,___
[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )