1. always on top

i dont know why but it seems that my "reply to" messages do not reach 
topica forum. so i will try the normal "post" button. really sorry if u 
recevie my message more then once.

i use win32lib and i want to make a window which will be always on the 
top and will not let other applications work, or least get focus. 
simply, i want to make a password window at the start up. 

i also will appreciate if u tell me how to make other kinds of always on 
top windows too. 

thank u. 
kerem

new topic     » topic index » view message » categorize

2. Re: always on top

Kerem,

Here's something that might possibly work:

-- code follows:

--------PASSWORD WINDOW EXAMPLE ---------
-- by Dan Moyer, March 27, 2002
--  adapted from someones "SPLASH" screen example

include win32lib.ew
without warning

constant
    -- Create a main window with no dimensions and out of view:
    Main       = create( Window, "Main", 0, 0, -100, 0, 0, 0 ),
    -- Create a password window that doesn't have a "close" box:
    PwrdWindow    = create(Window, "Enter Password", 0, 20,20, 200, 200,
{WS_DLGFRAME}),
    -- put a sle & button in it:
    PwrdEdit = create( EditText, "", PwrdWindow, 10, 40, 120, 20, 0 ),
    Button1 = create( PushButton, "Use Password", PwrdWindow, 10, 70, 100,
20, 0 ),
    CancelButton = create( PushButton, "Nevermind", PwrdWindow, 10, 100,
100, 20, 0 )

integer btn1, btn2
    -- some buttons in main window:
    btn1 = create(Button, "One", Main, 5, 5, 50, 50, 0)
    btn2 = create(Button, "Two", Main, 5, 65, 50, 50, 0)

procedure nevermind()
  closeWindow(PwrdWindow)
  closeWindow(Main)
end procedure
onClick[CancelButton] = routine_id("nevermind")

-- on click password button:
procedure gotPassword()
    destroy(PwrdWindow)
    -- Show the main window now.
    setRect(Main, 0, 0, 170, 350, 1)-- move it so it now shows
    moveZOrder(Main, HWND_TOP) -- make sure it starts out on top
end procedure
onClick[Button1] = routine_id("gotPassword")

procedure openPasswordWindow()
  openWindow(PwrdWindow, Modal)
  moveZOrder(PwrdWindow, HWND_TOPMOST)-- make sure nothing can cover it
end procedure
onActivate[Main] = routine_id("openPasswordWindow")

WinMain( Main, Normal )

-- code ends

Dan Moyer


----- Original Message -----
From: <xxmyt at yahoo.com>
To: "EUforum" <EUforum at topica.com>
Sent: Wednesday, March 27, 2002 2:36 PM
Subject: always on top


>
> i dont know why but it seems that my "reply to" messages do not reach
> topica forum. so i will try the normal "post" button. really sorry if u
> recevie my message more then once.
>
> i use win32lib and i want to make a window which will be always on the
> top and will not let other applications work, or least get focus.
> simply, i want to make a password window at the start up.
>
> i also will appreciate if u tell me how to make other kinds of always on
> top windows too.
>
> thank u.
> kerem
>
>
>
>

new topic     » goto parent     » topic index » view message » categorize

3. Re: always on top

On Thu, 28 Mar 2002 00:05:31 +0000, Chris Bensler <bensler at mail.com>
wrote:

I like the sticky pin in JFE. How's that done?

Pete

new topic     » goto parent     » topic index » view message » categorize

4. Re: always on top

Have you tried this one liner?

SetWindowPos (hWnd , 0, 0, 0, 0, or_all({SWP_NOACTIVATE,SWP_NOMOVE,SWP_NOSIZE}))

Euman
euman at bellsouth.net

new topic     » goto parent     » topic index » view message » categorize

5. Re: always on top

> Have you tried this one liner?
> 
> SetWindowPos (hWnd ,0, 0, 0, 0,
> or_all({SWP_NOACTIVATE,SWP_NOMOVE,SWP_NOSIZE}))
> 
> Euman
> euman at bellsouth.net


whoops, shouldve been >

SetWindowPos (hWnd , HWND_TOPMOST, 0, 0, 0, 0,
or_all({SWP_NOACTIVATE,SWP_NOMOVE,SWP_NOSIZE}))

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu