wenn ich mein prog in den tNA (symbol neben der uhr) verschiebe, das dann öffne, funktioniert das genau einmal, also wenn ich es dann wieder in den tna schieben will zeigt es mir nur noch das symbol im tray an was ich dann aber nicht mehr öffnen kann
hier ein wenig code
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56:
| procedure TaskBarAddIcon; var tnid: TNotifyIconData; Owner: HWnd; begin with tnid do begin cbSize := SizeOf(TNotifyIconData); Wnd := Form1.Handle; uID := 1; uFlags := NIF_MESSAGE or NIF_ICON or NIF_TIP; uCallbackMessage := WM_TASKBAREVENT; hIcon := Application.Icon.Handle; end; StrCopy(tnid.szTip, 'Tooltipp'); Shell_NotifyIcon(NIM_ADD, @tnid);
Owner:=GetWindow(Form1.Handle,GW_OWNER); If Owner<>0 Then ShowWindow(Owner,SW_HIDE); end;
procedure TaskBarRemoveIcon; var tnid: TNotifyIconData; Owner: HWnd; begin tnid.cbSize := SizeOf(TNotifyIconData); tnid.Wnd := Form1.Handle; tnid.uID := 1; Shell_NotifyIcon(NIM_DELETE, @tnid); Owner:=GetWindow(Form1.Handle,GW_OWNER); If Owner<>0 Then Begin ShowWindow(Owner,SW_Show); ShowWindow(Owner,SW_Normal); End; end;
procedure TForm1.WMTaskbarEvent(var Message: TMessage); var Point: TPoint; begin case Message.LParamLo of WM_LBUTTONDOWN: ; WM_RBUTTONDOWN: begin SetForegroundWindow(Handle); GetCursorPos(point); popupmenu1.popup(point.x,point.y); end; end; end;
procedure TForm1.AppMinimize(Sender: TObject); begin Form1.Hide; end; |
hoffe mir kann jemand helfen