Autor Beitrag
†halia
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 24

WIN XP
Delphi 7 Enterprise, C++
BeitragVerfasst: Di 04.03.08 14:20 
Ich habe mit Delphi 7 ein Programm geschrieben, von dem ich gern möchte, dass es auf dem Screen erscheint, allerdings ohne in der Taskleiste angezeigt zu werden.

Ich weiß, das wurde hier schon oft genug gefragt und ich will ja auch keinem auf den Keks gehen, aber ich weiß immer noch net wie ich's lösen kann. Hab auch brav die Suche bedient und trotzdem nichts gefunden, was bei mir funktioniert hat ... *verzweifeltsei* Die einen Codes waren laut Compilermeldung überhaupt nicht vorhanden, und die anderen haben das Formular an sich gleich mit unsichtbar gemacht.
Kann mir bitte irgendwer helfen? :flehan:

_________________
"Fehler 5400 bedeutet, dass Ihr Computer Sie für einen Trottel hält und in Zukunft nichts mehr mit Ihnen zu tun haben will."
Martin1966
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1068

Win 2000, Win XP
Delphi 7, Delphi 2005
BeitragVerfasst: Di 04.03.08 14:27 
Zeig doch mal welchen Sourcecode du ausprobiert hast und was genau daran dann nicht funktioniert bzw. der Compiler meckert.

Lg, Martin

_________________
Ein Nutzer der Ecke ;-)
†halia Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 24

WIN XP
Delphi 7 Enterprise, C++
BeitragVerfasst: Di 04.03.08 14:41 
z.B. den
ShowWindow(Handle,sw_hide)
kennt er nicht, obwohl das laut user profile iconWotan89 hätte funtionieren sollen

und der
Application.ShowMainForm:=False
enfernt das Programm zwar aus der Taskleiste, aber macht es auch gleich ganz unsichtbar

Und nachdem ich nach 2 Stunden Suche nur Sachen in der Richtung gefunden hab, weiß ich immer noch nicht weiter :bawling:

Gruß,
†halia

_________________
"Fehler 5400 bedeutet, dass Ihr Computer Sie für einen Trottel hält und in Zukunft nichts mehr mit Ihnen zu tun haben will."
†halia Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 24

WIN XP
Delphi 7 Enterprise, C++
BeitragVerfasst: Mi 05.03.08 16:42 
...

Brauche immer noch dringend Hilfe. :|

Also, wenn irgendwer eine Idee hat, dann sagt es mir bitte, möchte das Programm langsam fertig kriegen.

Danke schon mal,
†halia

_________________
"Fehler 5400 bedeutet, dass Ihr Computer Sie für einen Trottel hält und in Zukunft nichts mehr mit Ihnen zu tun haben will."
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Mi 05.03.08 16:44 
Zitat:
kennt er nicht

Die Fehlermeldung des Compilers wäre hilfreicher.
†halia Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 24

WIN XP
Delphi 7 Enterprise, C++
BeitragVerfasst: Mi 05.03.08 16:55 
Ach ja, ShowWindow(Handle,sw_hide) ist dem Compiler doch bekannt, sry, mein Fehler ... aber das macht das Formular unsichtbar (was es ja nicht soll) und entfernt es nicht aus der Taskleiste. :(

_________________
"Fehler 5400 bedeutet, dass Ihr Computer Sie für einen Trottel hält und in Zukunft nichts mehr mit Ihnen zu tun haben will."
jakobwenzel
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1889
Erhaltene Danke: 1

XP home, ubuntu
BDS 2006 Prof
BeitragVerfasst: Mi 05.03.08 16:59 
Probiers mit Application.Handle anstatt von Handle.

_________________
I thought what I'd do was, I'd pretend I was one of those deaf-mutes.
†halia Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 24

WIN XP
Delphi 7 Enterprise, C++
BeitragVerfasst: Mi 05.03.08 17:08 
Super! Danke user profile iconjakobwenzel, jetzt geht's!

:D:D:D:D:D:D:D

†halia

_________________
"Fehler 5400 bedeutet, dass Ihr Computer Sie für einen Trottel hält und in Zukunft nichts mehr mit Ihnen zu tun haben will."
CarpeDiem
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 128

WIN XP
Borland C++ 2002, CodeGear C++ 2007, C# (VS 2008)
BeitragVerfasst: So 30.03.08 09:49 
Hallo, ich arbeite mit CodeGear 2007, allerdings mit C++.
Ich habe es auch schon mit ShowWindow(Application->Handle,SW_HIDE) probiert, funktionierte dann nicht. Dann habe ich es probiert mit:
ausblenden C#-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
....
WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
{
  // Dabei wird dem System erklärt, dass es sich um ein
  // Tool-Window handelt
  DWORD dwExStyle=GetWindowLong(Application->Handle,GWL_EXSTYLE);
      dwExStyle |= WS_EX_TOOLWINDOW;
      SetWindowLong(Application->Handle,GWL_EXSTYLE,dwExStyle);
  //-------------------------------------------------------------------------
  try
  {
    Application->Initialize();
//    SetApplicationMainFormOnTaskBar(Application, true);
    Application->CreateForm(__classid(TForm4), &Form4);
    Application->Run();
  }
  catch (Exception &exception)
....
funktioniert aber nur unter BCB 2006. Hab auch schon die gesamten Projekteigenschaften durchgeforstet. Vielleicht weiß von Euch noch einer was.

_________________
Stefan - Carpe Diem
Es ist keine Schande zu fallen, eine Schande ist nur nicht wieder aufzustehen
Silas
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 478

Windows XP Home
Delphi 2005, RAD Studio 2007, MASM32, FASM, SharpDevelop 3.0
BeitragVerfasst: So 30.03.08 10:09 
AFAIK muss die ShowWindow-Zeile nach Application->Initialize() stehen, weil vorher das Handle noch 0 ist.

Ansonsten versuch's mal mit
ausblenden C#-Quelltext
1:
ShowWindow(GetWindow(Handle, GW_OWNER), SW_HIDE);					
in FormCreate. Ich hoffe da ist jetzt kein Fehler drin, ich programmiere unter C++ sonst nie mit der VCL.

_________________
Religionskriege sind nur Streitigkeiten darüber, wer den cooleren imaginären Freund hat ;-)
CarpeDiem
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 128

WIN XP
Borland C++ 2002, CodeGear C++ 2007, C# (VS 2008)
BeitragVerfasst: So 30.03.08 10:17 
Hab ich leider schon beides probiert, und funktioniert nicht.

_________________
Stefan - Carpe Diem
Es ist keine Schande zu fallen, eine Schande ist nur nicht wieder aufzustehen
Silas
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 478

Windows XP Home
Delphi 2005, RAD Studio 2007, MASM32, FASM, SharpDevelop 3.0
BeitragVerfasst: So 30.03.08 10:42 
Ich habe gerade mein RAD Studio angeworfen und ein bisschen experimentiert, in OnShow funktioniert es, wenn du ShowMainFormOnTaskBar auskommentiert lässt. Das ist zwar nicht ganz optimal, da die Form beim Anzeigen kurz in der Taskleiste erscheint, aber etwas besseres ist mir nicht eingefallen.

_________________
Religionskriege sind nur Streitigkeiten darüber, wer den cooleren imaginären Freund hat ;-)
CarpeDiem
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 128

WIN XP
Borland C++ 2002, CodeGear C++ 2007, C# (VS 2008)
BeitragVerfasst: So 30.03.08 10:56 
Ok, danke. So könnte man es fürs erste lassen, schaut halt nicht ganz optimal aus, da muß ich Dir recht geben.

_________________
Stefan - Carpe Diem
Es ist keine Schande zu fallen, eine Schande ist nur nicht wieder aufzustehen