Главная страница
    Top.Mail.Ru    Яндекс.Метрика
Форум: "Основная";
Текущий архив: 2004.07.04;
Скачать: [xml.tar.bz2];

Вниз

PopupMenu на иконке в трее.   Найти похожие ветки 

 
vajo   (2004-06-15 19:32) [0]

Создаю так.

procedure TfmMain.WndProc(var Msg : TMessage);
var  p : TPoint;
begin
 case Msg.Msg of
   WM_USER + 1:
   case Msg.lParam of
     WM_RBUTTONDOWN:
     begin
       GetCursorPos(p);
       PopupMenu1.Popup(p.x, p.y);
     end
   end;
 end;
 inherited;
end;


При работе программы PopupMenu всплывает, но при переходе в др. программу она не убирается
пока не ткнешь в окно моей пронраммы..
Подскажите, как сделать чтобы PopupMenu убиралась.


 
grom   (2004-06-16 10:54) [1]

http://www.zdima-iv.nm.ru/delphi.html
пример Color Choose v1.2


 
grom   (2004-06-16 10:57) [2]

http://www.zdima-iv.nm.ru/delphi.html
пример ICON


 
nikkie ©   (2004-06-16 14:57) [3]

To display a context menu for a notification icon, the current window must be the foreground window before the application calls TrackPopupMenu or TrackPopupMenuEx. Otherwise, the menu will not disappear when the user clicks outside of the menu or the window that created the menu (if it is visible). However, when the current window is the foreground window, the second time this menu is displayed, it displays and then immediately disappears. To correct this, you must force a task switch to the application that called TrackPopupMenu at some time in the near future. This is done by posting a benign message to the window or thread, as shown in the following code sample:

  SetForegroundWindow(hDlg);

  // Display the menu
  TrackPopupMenu(   hSubMenu,
                    TPM_RIGHTBUTTON,
                    pt.x,
                    pt.y,
                    0,
                    hDlg,
                    NULL);

  PostMessage(hDlg, WM_NULL, 0, 0);


http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/resources/menus/menure ference/menufunctions/trackpopupmenu.asp


 
Michael   (2004-06-16 19:39) [4]

procedure TForm1.PopupMenu1Popup(Sender: TObject);
begin
SetForegroundWindow(Handle);
end;


 
grom   (2004-06-16 21:11) [5]

http://www.delphiworld.ru/index.php?stat&page=2
---------------------
Секреты иконки в системной трее. Часть 1
Автор: Рустик, Просмотров: 234
Этой статьей я начну свой расскаж о секретах работы с иконкой приложения в системной трее. Эта часть расскажет вам о самом самом начальном: как добавлять/изменять/удалять иконку в трей. А также менять ее параметры во время работы приложения.
---------------------------
Секреты иконки в системной трее. Часть 2
Автор: Рустик, Просмотров: 242
Логическое продолжение предыдущей статьи.



Страницы: 1 вся ветка

Форум: "Основная";
Текущий архив: 2004.07.04;
Скачать: [xml.tar.bz2];

Наверх





Память: 0.45 MB
Время: 0.036 c
14-1086971417
cyborg
2004-06-11 20:30
2004.07.04
По телеку идёт финальный концерт "Фабрика звёзд"


6-1084265625
empty
2004-05-11 12:53
2004.07.04
Асинхронная передача данных в Delphi по сети. Поможите кто можите


3-1086783370
Лера
2004-06-09 16:16
2004.07.04
Direct Oracle Access


6-1083668390
Checist [root]
2004-05-04 14:59
2004.07.04
Как вытащить Url-адресс из файла типа Ярлык Интернета?


14-1087186912
X9
2004-06-14 08:21
2004.07.04
Новый проц





Afrikaans Albanian Arabic Armenian Azerbaijani Basque Belarusian Bulgarian Catalan Chinese (Simplified) Chinese (Traditional) Croatian Czech Danish Dutch English Estonian Filipino Finnish French
Galician Georgian German Greek Haitian Creole Hebrew Hindi Hungarian Icelandic Indonesian Irish Italian Japanese Korean Latvian Lithuanian Macedonian Malay Maltese Norwegian
Persian Polish Portuguese Romanian Russian Serbian Slovak Slovenian Spanish Swahili Swedish Thai Turkish Ukrainian Urdu Vietnamese Welsh Yiddish Bengali Bosnian
Cebuano Esperanto Gujarati Hausa Hmong Igbo Javanese Kannada Khmer Lao Latin Maori Marathi Mongolian Nepali Punjabi Somali Tamil Telugu Yoruba
Zulu
Английский Французский Немецкий Итальянский Португальский Русский Испанский