Thema: Delphi Schnellstartleiste

Einzelnen Beitrag anzeigen

rayjray

Registriert seit: 14. Sep 2004
29 Beiträge
 
#3

Re: Schnellstartleiste

  Alt 21. Sep 2004, 22:26
HEHE Danke alcaeus....so langsam mauserst du dich zu meinem Helden...schoon das 2te mal das du mir heute hilfst!

aber das einzige was ich finde ist das man das in den tray versteckt?!..nunja wenn ich das versuche ( den code ) dann verschwindet das auch in den tray..aber ich sehe dann nichts mehr zum anklicken!!!

und mal davon abgesehen will ich es nicht verstecken...also suchte ich weiter bis ich zu diesem angekommen bin...

Delphi-Quellcode:
procedure Taskbar_on(Icontitle : string);
procedure Taskbar_off;
procedure TaskbarEvent(var Msg: TMessage); Message WM_TASKABAREVENT;

...

procedure Taskbar_on (Icontitle : String);
var NotifyIconData: TNotifyIconData;
    a : integer;
begin
Fillchar(NotifyIconData,Sizeof(NotifyIconData),0);
   NotifyIconData.cbSize := Sizeof(NotifyIconData);
   NotifyIconData.Wnd := Handle;
   NotifyIconData.uFlags := NIF_MESSAGE or NIF_ICON or NIF_TIP;
   NotifyIconData.uCallbackMessage := WM_TASKABAREVENT;
   NotifyIconData.hIcon := Application.Icon.Handle;

   for a := 0 to 63 do
   NotifyIconData.szTip[a] := IconTitle[a+1]; //warum hab ich das denn gemacht? :gruebel:

   Shell_NotifyIcon(NIM_ADD, @NotifyIconData);
end;


procedure Taskbar_off;
var NotifyIconData : TNotifyIconData;
begin
FillChar(NotifyIconData,Sizeof(NotifyIconData),0);
   NotifyIconData.cbSize := Sizeof(NotifyIconData);
   NotifyIconData.Wnd := self.Handle;
   NotifyIconData.uFlags := NIF_MESSAGE or NIF_ICON or NIF_TIP;
   NotifyIconData.uCallbackMessage := WM_TASKABAREVENT;
   NotifyIconData.hIcon := Application.Icon.Handle;
   NotifyIconData.szTip := 'Punkt';
   Shell_NotifyIcon(NIM_DELETE, @NotifyIconData);
end;


procedure TForm1.TaskbarEvent(var Msg: TMessage);
begin
if Msg.LParam = wm_LButtonDblClk then begin
                                      Application.restore;
                                      Application.bringtofront;
                                      Form1.activate;
                                      end;

if Msg.LParam = wm_RButtonDown then popupmenu1.popup(Mouse.CursorPos.X,Mouse.CursorPos.Y);
end;
was mach ich falsch?
denn das mit dem notify versteh ich nicht...den hab ich in meinem objextinspektor nicht?!
  Mit Zitat antworten Zitat