Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   GUI-Design mit VCL / FireMonkey / Common Controls (https://www.delphipraxis.net/18-gui-design-mit-vcl-firemonkey-common-controls/)
-   -   Delphi TForm2.Create(application) taskbar problem (https://www.delphipraxis.net/96646-tform2-create-application-taskbar-problem.html)

trolojik2 28. Jul 2007 00:47


TForm2.Create(application) taskbar problem
 
Hi all ;

I have two form
Form1 and form2

This project is client chat project.

if i want to talk with somebody i create a form like

frm := TForm2.Create(application);

When i created tform2 as frm i want to show this window in taskbar and i used this procedure

Delphi-Quellcode:
procedure TForm2.CreateParams(var Params: TCreateParams);
begin
 inherited CreateParams(params);
 with Params do
 begin
  ExStyle:= ExStyle or WS_EX_APPWINDOW;
  WndParent:= GetDesktopWindow;
 end;
end;
But there is a problem. When i right click (mouse) form2 on taskbar i cant see original popup
Close , Minimize , Maximize etc..

How can i see this menu ?

Regards;

Jelly 28. Jul 2007 08:47

Re: TForm2.Create(application) taskbar problem
 
If you use a recent version of Delphi (2006 or 2007), you have a component called TTrayIcon.
If not, use the CoolTrayIcon component.

Luckie 28. Jul 2007 08:56

Re: TForm2.Create(application) taskbar problem
 
I don't thimk that's his problem. He doesn't want an icon in the TNA. He is missing the system menu items of the taskbar button of his window like "Minimze" or "Move".

Jelly 28. Jul 2007 09:09

Re: TForm2.Create(application) taskbar problem
 
My fault, sorry.

For me, the code is working :gruebel:

trolojik2 28. Jul 2007 14:10

Re: TForm2.Create(application) taskbar problem
 
Zitat:

Zitat von Luckie
I don't thimk that's his problem. He doesn't want an icon in the TNA. He is missing the system menu items of the taskbar button of his window like "Minimze" or "Move".

Yes my problem is that. missing system menu items on the taskbar button.

Regards

Prototypjack 28. Jul 2007 16:02

Re: TForm2.Create(application) taskbar problem
 
Moin,

If I may ask: Which Delphi-Version do you use?

Edit: Another thing which might cause such a problem is that you've changed somewhere window-specific properties, like setting the window-style to a Dialog-one. Such things might change the window's behavior especially concerning the system-menu (which is the name of the menu you have problems with ;) )

Regards,
Max

Die Muhkuh 28. Jul 2007 16:07

Re: TForm2.Create(application) taskbar problem
 
Same to me: Code is working right.

trolojik2 28. Jul 2007 16:20

Re: TForm2.Create(application) taskbar problem
 
Code is working i dont have problem about this code
But i cant see system menu on taskbar (form2)
Version of delphi : Delphi 7 Enterprise

borderstyle bssizeable
formstyle fsnormal

Die Muhkuh 28. Jul 2007 16:23

Re: TForm2.Create(application) taskbar problem
 
ok. You have a mainmenu on Form2 and you want that mainmenu on the taskbar?

trolojik2 28. Jul 2007 16:28

Re: TForm2.Create(application) taskbar problem
 
Zitat:

Zitat von Luckie
I don't thimk that's his problem. He doesn't want an icon in the TNA. He is missing the system menu items of the taskbar button of his window like "Minimze" or "Move".

No i dont have a mainmenu. The original menu (system menu) i cant see

Like luckie's said

I have only this problem

trolojik2 28. Jul 2007 16:34

Re: TForm2.Create(application) taskbar problem
 
Very interesting :S

Now i tested this code in new application it works well but i dont understand why not working my other application :S

Die Muhkuh 28. Jul 2007 16:35

Re: TForm2.Create(application) taskbar problem
 
Hi,

maybe you have got code, whichs blocks the system menu?

trolojik2 28. Jul 2007 16:44

Re: TForm2.Create(application) taskbar problem
 
May be ..
Im looking now that..

So if i want change system menu with which i created popup menu is possible ?

Prototypjack 28. Jul 2007 17:38

Re: TForm2.Create(application) taskbar problem
 
Zitat:

Zitat von trolojik2
So if i want change system menu with which i created popup menu is possible ?

Excuse me?

Anyway, if I've got you meant, you can change the system menu of course. But the only way I know is pure API code, which means you create a menu item (all non vcl, so it's going to be pure code) and then attach it to the system menu. There are ways to do that(but I don't remember the exact commands) so a little search on google (it's API-Code so there aren't too much differences between delphi or c++ for example, so: No matter which language you find the solution in, it should be easy to translate, and if not there should be someone around here who can ;) ) or in this forum should help you.

Regards,
Max

trolojik2 28. Jul 2007 17:42

Re: TForm2.Create(application) taskbar problem
 
I Found my problem..

I used Tskinstore and Tskindata components
when i deleted this components on form
The code is exactly working.

Now how can i solve this problem i dont know...

trolojik2 28. Jul 2007 18:56

Re: TForm2.Create(application) taskbar problem
 
I Found TTaskBarMenu component

http://delphi.about.com/od/vclwritee...askbarmenu.htm

It looks funny


Alle Zeitangaben in WEZ +1. Es ist jetzt 15:10 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz