- Trond
Rick Carter
cart...@despammed.com
Chair, Delphi/Paradox SIG, Cincinnati PC Users Group
--- posted by geoForum on http://delphi.newswhat.com
Yes I saw that one, but I was hoping there was something I could do to fix
this. I have made a few other test programs and they work as expected.
- Trond
There is a new property of TApplication "MainFormOnTaskBar".
This defaults to False for existing applications opened in D 2007,
but defaults to True for new applications. This may be why your
test apps behaved differently.
Try inserting in the application DPR:
(just after: Application.Initialize;)
Application.MainFormOnTaskBar := True;
This has other consequences, but give it a try.
-Jeff Hamblin
-Atle
I have a splash screen so I have..
Application.ShowMainForm := False;
<show splash>
<do stuff>
<hide splash>
frmMain.Show;
ShowWindow(frmMain.Handle,SW_SHOW);
This way the taskbar button appears and never leaves you again.
I did not see any of the mentioned problems yet.
To CodeGear:
I must say I'm getting a bit dissappointed by seeing every "fix" (in this
case the vista minimize thumbnail/screenshot thingy issue) having severe
side effects or other bugs.
I just found out this "vista ready" product doesnt support PNG compressed
vista icons as well... *sigh*
Regards,
Freddy
"Trond Grøntoft" <tr...@tiger-removethis.no> wrote in message
news:460428d1$1...@newsgroups.borland.com...
> If you dont want the trouble you run into when using
> Application.MainFormOnTaskBar you can do the following:
>
> I have a splash screen so I have..
>
> Application.ShowMainForm := False;
>
> <show splash>
> <do stuff>
> <hide splash>
>
> frmMain.Show;
> ShowWindow(frmMain.Handle,SW_SHOW);
>
> This way the taskbar button appears and never leaves you again.
So does this way:
Splash := TSplash.Create(nil);
Splash.Show;
// Do stuff
Application.CreateForm(TfrmMain, frmMain);
Splash.Close;
No need to call ShowWindow, or to have ShowMainForm as False.
--
Dave Nottage [TeamB]
Thanks.
I tested this on the VirtualListView demo, but the problem remains the same.
- Trond
"Dave Nottage [TeamB]" <dav...@radsoft.com.au> wrote in message
news:4604...@newsgroups.borland.com...
> So does this way:
>
> Splash := TSplash.Create(nil);
> Splash.Show;
> // Do stuff
> Application.CreateForm(TfrmMain, frmMain);
> Splash.Close;
> Dave Nottage [TeamB]
"Dave Nottage [TeamB]" <dav...@radsoft.com.au> wrote in message
news:4604...@newsgroups.borland.com...
I had a look at the TApplicationHelper source code and found if I put the...
Application.MainFormOnTaskBar := True;
...AFTER the Application.CreateForm statment, the button is displayed on the
statusbar. I'm not sure if there are any side effects to this, so I ended up
overrididing the CreateParams method and added WS_EX_APPWINDOW to
Params.ExStyle.
- Trond
> Eh.. will that show the taskbar button using D2007 without using
> MainFormOnTaskBar ? (I admit I didnt try)
If by "using" you mean setting it to True, yes you need to do that, but
it is a trivial thing to do.
--
Dave Nottage [TeamB]
I noticed that if I set the Visible property to True on the main form,
the taskbar button is not shown. Make sure Visible=False on the main
form.
Regards,
Hein