 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
John Ullom Guest
|
Posted: Tue Mar 13, 2007 1:49 am Post subject: Minimize Modal Forms with Task Bar Button |
|
|
Hi All,
I came across an article about making Delphi applications Vista
friendly. It showed techniques for minimizing an application to
the task bar. Everything works swell. Except! If I have the Main
form showing and then click on the application button that is on
the task bar, the application minimizes to the task bar, as it
should. If I have a Modal form open, on top of the Main form,
the modal window disappears and the application locks up.
I am using this code:
{I override the CreatParams}
procedure TfrmMain.CreateParams(var Params: TCreateParams);
begin
inherited CreateParams(Params);
Params.ExStyle := WS_EX_APPWINDOW;
end;
{I have tried with and with out the following procedure}
procedure TfrmMain.WMSyscommand(var Message: TWmSysCommand);
begin
case (Message.CmdType and $FFF0) of
SC_MINIMIZE:
begin
ShowWindow(Handle, SW_MINIMIZE);
Message.Result := 0;
end;
SC_RESTORE:
begin
ShowWindow(Handle, SW_RESTORE);
Message.Result := 0;
end;
else
inherited;
end;
end;
What I want is for all the forms that are open to minimize to the
task bar when I click on the application, task bar icon. And when
this happens I want only ONE icon on the task bar for my
application.
The Main Form is set to ShowModal on start up. Is that a problem?
All other forms in the application, maintenance, reports, and such,
are modal.
The article referred to at the beginning of my post, mentions
PopUpParent which appears not to apply to my problem.
Using Delphi 6 and XP;
Thanks!
Enjoy your day!
John |
|
| Back to top |
|
 |
Marc Rohloff [TeamB] Guest
|
Posted: Tue Mar 13, 2007 5:06 am Post subject: Re: Minimize Modal Forms with Task Bar Button |
|
|
On 12 Mar 2007 12:49:51 -0800, John Ullom wrote:
John,
Please don't multi-post.
--
Marc Rohloff [TeamB]
marc -at- marc rohloff -dot- com |
|
| Back to top |
|
 |
John Ullom Guest
|
Posted: Tue Mar 13, 2007 7:23 am Post subject: Re: Minimize Modal Forms with Task Bar Button |
|
|
Hi Marc,
Sorry if I broke the rules. I have asked this question three other times in a the borland.public.delphi.language.delphi.general
group. On the 7th, 8th and 10th. I only recieved one reply on the 7th and it didn't help though it was apprecieated.
Minimize all forms to task bar - "John Ullom" , 10 Mar 2007
Minimize to Task Bar Rephrased - "John Ullom" , 8 Mar 2007
Minimize to Task Bar - "Jon Ullom" , 7 Mar 2007
Re: Minimize to Task Bar - "JD" , 7 Mar 2007
My view is that once per day and only if my post is not visible on the first page is good newsgroup etiquette. Am I mistaken?
Either way, I apologize if I crossed the line. I'll post once and if I don't get a helpful reply, I'll wait a week before I post it again.
Thanks for pointing out my bad form!
John Ullom
PS
You'll never see this post again if you could point me towards the answer! :} |
|
| Back to top |
|
 |
Marc Rohloff [TeamB] Guest
|
Posted: Wed Mar 14, 2007 12:59 am Post subject: Re: Minimize Modal Forms with Task Bar Button |
|
|
On 12 Mar 2007 18:23:41 -0800, John Ullom wrote:
| Quote: | PS
You'll never see this post again if you could point me towards the answer! :}
|
If you aren't getting an answer it usually means that nobody has the
answer.
--
Marc Rohloff [TeamB]
marc -at- marc rohloff -dot- com |
|
| Back to top |
|
 |
Marc Rohloff [TeamB] Guest
|
|
| Back to top |
|
 |
John Ullom Guest
|
Posted: Thu Mar 15, 2007 7:26 am Post subject: Re: Minimize Modal Forms with Task Bar Button |
|
|
Hi Marc,
Can I ask this question again in another group? Since I am just starting out as a programmer, I find hard to believe that I
could ask a question that nobody in the Delphi Universe has the
answer to. No college, no skill sets, and just a painter of
bath tubs be I!:)
Enjoy your day!
John
"Marc Rohloff [TeamB]" <"on request"> wrote:
| Quote: | On 12 Mar 2007 18:23:41 -0800, John Ullom wrote:
PS
You'll never see this post again if you could point me towards the answer! :}
If you aren't getting an answer it usually means that nobody has the
answer.
--
Marc Rohloff [TeamB]
marc -at- marc rohloff -dot- com |
|
|
| Back to top |
|
 |
John Ullom Guest
|
Posted: Thu Mar 15, 2007 8:13 am Post subject: Re: Minimize Modal Forms with Task Bar Button Thanks! |
|
|
Hi Marc,
The Vista Ready article is what sent me down this path. I tried some of the links and found out:
A: This problem has been fixed in newer versions of Delphi. I use 6. Some sort of Gates inspired Z order problem.
B: A solution was found at:
http://groups.google.com/group/borland.public.delphi.language.delphi.general/browse_thread/thread/d9db6992e6c1b230/4399899088eca641%234399899088eca641
I also found that what I wanted to do, minimize a modal form was
cross purpose to the idea of a modal form! Except for the modal form disappearing behind the main form, I was getting what I should have wanted. The link above, in fact, fixed it. Thanks
pointing me in the right direction!
Enjoy your day!
John Ullom
"Marc Rohloff [TeamB]" <"on request"> wrote:
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|