Вопрос о работе с прозрачными окнами?

Программирование на Visual Basic, главный форум. Обсуждение тем программирования на VB 1—6.
Даже если вы плохо разбираетесь в VB и программировании вообще — тут вам помогут. В разумных пределах, конечно.
Правила форума
Темы, в которых будет сначала написано «что нужно сделать», а затем просьба «помогите», будут закрыты.
Читайте требования к создаваемым темам.
Myxa
Обычный пользователь
Обычный пользователь
 
Сообщения: 63
Зарегистрирован: 04.10.2002 (Пт) 14:36
Откуда: Kazakhstan

Вопрос о работе с прозрачными окнами?

Сообщение Myxa » 19.08.2003 (Вт) 12:44

Собственно вопрос такой, окна получились замечательно и даже полупрозрачные :lol: (спасибо ALX_2002 за его топик относительно АПИ функций), а можно ли передавать события под форму, например если под окном видно рабочий стол, то двойным щелчком выделить и запустить какую нибудь иконку, желательно чтобы перетаскивание не работало?

GSerg
Шаман
Шаман
 
Сообщения: 14286
Зарегистрирован: 14.12.2002 (Сб) 5:25
Откуда: Магадан

Сообщение GSerg » 19.08.2003 (Вт) 16:24

Визуальная прозрачность не нарушает целостности окна как единой сущности! :) И пофигу, что там видно под ним. Единственный способ - получить экранные координаты клика, позырить, какие там окна под данным окном (есть апишка, не помню...), и переслать им клик через sendmessage, но не изврат ли это? :)
Как только вы переберёте все варианты решения и не найдёте нужного, тут же обнаружится решение, простое и очевидное для всех, кроме вас

Myxa
Обычный пользователь
Обычный пользователь
 
Сообщения: 63
Зарегистрирован: 04.10.2002 (Пт) 14:36
Откуда: Kazakhstan

Сообщение Myxa » 20.08.2003 (Ср) 4:49

Нет это не изврат, а очень красивая вещь. И если ты вспомнишь ту АПИ-шку я буду премного благодарен.

GSerg
Шаман
Шаман
 
Сообщения: 14286
Зарегистрирован: 14.12.2002 (Сб) 5:25
Откуда: Магадан

Сообщение GSerg » 20.08.2003 (Ср) 16:10

Код: Выделить всё
Declare Function GetWindow Lib "user32" Alias "GetWindow" (ByVal hwnd As Long, ByVal wCmd As Long) As Long

hWnd
Identifies a window. The window handle retrieved is relative to this window, based on the value of the uCmd parameter.

uCmd
Specifies the relationship between the specified window and the window whose handle is to be retrieved. This parameter can be one of the following values:
  • GW_CHILD
    The retrieved handle identifies the child window at the top of the Z order, if the specified window is a parent window; otherwise, the retrieved handle is NULL. The function examines only child windows of the specified window. It does not examine descendant windows.
  • GW_HWNDFIRST
    The retrieved handle identifies the window of the same type that is highest in the Z order. If the specified window is a topmost window, the handle identifies the topmost window that is highest in the Z order. If the specified window is a top-level window, the handle identifies the top-level window that is highest in the Z order. If the specified window is a child window, the handle identifies the sibling window that is highest in the Z order.
  • GW_HWNDLAST
    The retrieved handle identifies the window of the same type that is lowest in the Z order. If the specified window is a topmost window, the handle identifies the topmost window that is lowest in the Z order. If the specified window is a top-level window, the handle identifies the top-level window that is lowest in the Z order. If the specified window is a child window, the handle identifies the sibling window that is lowest in the Z order.
  • GW_HWNDNEXT
    The retrieved handle identifies the window below the specified window in the Z order. If the specified window is a topmost window, the handle identifies the topmost window below the specified window. If the specified window is a top-level window, the handle identifies the top-level window below the specified window. If the specified window is a child window, the handle identifies the sibling window below the specified window.
  • GW_HWNDPREV
    The retrieved handle identifies the window above the specified window in the Z order. If the specified window is a topmost window, the handle identifies the topmost window above the specified window. If the specified window is a top-level window, the handle identifies the top-level window above the specified window. If the specified window is a child window, the handle identifies the sibling window above the specified window.
  • GW_OWNER
    The retrieved handle identifies the specified window’s owner window, if any.
Как только вы переберёте все варианты решения и не найдёте нужного, тут же обнаружится решение, простое и очевидное для всех, кроме вас


Вернуться в Visual Basic 1–6

Кто сейчас на конференции

Сейчас этот форум просматривают: AhrefsBot и гости: 5

    TopList