Jump to content
Sign in to follow this  
Kiti

Always on top GUI

Recommended Posts

Kiti
rudi

Hi.

look at the help file:

WinSetOnTop

--------------------------------------------------------------------------------

Change a window's "Always On Top" attribute.

WinSetOnTop ( "title", "text", flag )

regards, Rudi.


Earth is flat, pigs can fly, and Nuclear Power is SAFE!

Share this post


Link to post
Share on other sites
nobbe

you mean your gui window should stay on top of all others ?

WinSetOnTop

--------------------------------------------------------------------------------

Change a window's "Always On Top" attribute.

WinSetOnTop ( "title", "text", flag )

for title use your own window title of your gui

Share this post


Link to post
Share on other sites
d4rk

How can I make a GUI label that always stays on top of other windows?

If that's only a GUI label, it's impossible, look at the two above posts


[quote]Don't expect for a perfect life ... Expect a least troubles ones[/quote]Contact me : ass@kiss.toWhat I Have Done :Favorites Manager Mangage your favorite's folder, that's coolPC Waker For those who want to save stickersWebScipts Supporter For those who've just started with Web and WebScriptsTemporary Looker Simple but powerful to manage your Temporary folder, you know what you downloaded[UDF] _NumberFormat() Better performance on number display[UDF] _DirGet() What a folder contain [how many (hidden,normal,...) files], with one line of code[UDF] _IsPressEs() Just like _IsPress() but for a group of keys

Share this post


Link to post
Share on other sites
rudi

How can I make a GUI label that always stays on top of other windows?

If that's only a GUI label, it's impossible, look at the two above posts

I don't think, that it's possible to push a GUI's element "topmost": This would have to be a GUI with layers..

So I'd create a separate GUI for just that label :)

Regards, Rudi.


Earth is flat, pigs can fly, and Nuclear Power is SAFE!

Share this post


Link to post
Share on other sites
JailDoctor

How would I make a msgbox stay on top?

Share this post


Link to post
Share on other sites
d4rk

that's the trick, i firstly want to tell him that but that's cost much time


[quote]Don't expect for a perfect life ... Expect a least troubles ones[/quote]Contact me : ass@kiss.toWhat I Have Done :Favorites Manager Mangage your favorite's folder, that's coolPC Waker For those who want to save stickersWebScipts Supporter For those who've just started with Web and WebScriptsTemporary Looker Simple but powerful to manage your Temporary folder, you know what you downloaded[UDF] _NumberFormat() Better performance on number display[UDF] _DirGet() What a folder contain [how many (hidden,normal,...) files], with one line of code[UDF] _IsPressEs() Just like _IsPress() but for a group of keys

Share this post


Link to post
Share on other sites
d4rk

How would I make a msgbox stay on top?

Msgbox(64,"Hello","")

WinSetOnTop("Hello","");


[quote]Don't expect for a perfect life ... Expect a least troubles ones[/quote]Contact me : ass@kiss.toWhat I Have Done :Favorites Manager Mangage your favorite's folder, that's coolPC Waker For those who want to save stickersWebScipts Supporter For those who've just started with Web and WebScriptsTemporary Looker Simple but powerful to manage your Temporary folder, you know what you downloaded[UDF] _NumberFormat() Better performance on number display[UDF] _DirGet() What a folder contain [how many (hidden,normal,...) files], with one line of code[UDF] _IsPressEs() Just like _IsPress() but for a group of keys

Share this post


Link to post
Share on other sites
JailDoctor

[WinSetOnTop("Hello","");

Thanks, we just need to add the number one at the end to make it stay on top.

WinSetOnTop("Hello","",1);

Share this post


Link to post
Share on other sites
d4rk

yes, that's my fault


[quote]Don't expect for a perfect life ... Expect a least troubles ones[/quote]Contact me : ass@kiss.toWhat I Have Done :Favorites Manager Mangage your favorite's folder, that's coolPC Waker For those who want to save stickersWebScipts Supporter For those who've just started with Web and WebScriptsTemporary Looker Simple but powerful to manage your Temporary folder, you know what you downloaded[UDF] _NumberFormat() Better performance on number display[UDF] _DirGet() What a folder contain [how many (hidden,normal,...) files], with one line of code[UDF] _IsPressEs() Just like _IsPress() but for a group of keys

Share this post


Link to post
Share on other sites
JailDoctor

How would I make a msgbox stay on top?

Msgbox(64,"Hello","")

WinSetOnTop("Hello","");

It would need a number one at the end to stay on top.

WinSetOnTop("Hello","",1)

But still doesn't work for MsgBox

Share this post


Link to post
Share on other sites
d4rk

ah, my fault agains, the script won't work unless the message box get replied ...

so you'll see this work

WinSetOnTop("Untitle - Notepad","",1)

[quote]Don't expect for a perfect life ... Expect a least troubles ones[/quote]Contact me : ass@kiss.toWhat I Have Done :Favorites Manager Mangage your favorite's folder, that's coolPC Waker For those who want to save stickersWebScipts Supporter For those who've just started with Web and WebScriptsTemporary Looker Simple but powerful to manage your Temporary folder, you know what you downloaded[UDF] _NumberFormat() Better performance on number display[UDF] _DirGet() What a folder contain [how many (hidden,normal,...) files], with one line of code[UDF] _IsPressEs() Just like _IsPress() but for a group of keys

Share this post


Link to post
Share on other sites
JailDoctor

Yes, that is the proper way to use the set on top command, with a 'real" window.

I need to keep a MsgBox visible while the user interacts with another application.

Perhaps moving the MsBox to a specified place.

Can MsgBoxes be moved?

Share this post


Link to post
Share on other sites
JailDoctor

I need to keep a MsgBox visible while the user interacts with another application.

Perhaps moving the MsBox to a specified place.

Can MsgBoxes be moved?

:)

Ok, so they can't be moved. The MsbBox is centered so I move the user's application with WinMove ("YourWindow","", 540, 500) after the users do what the do and then the MsgBox (well, half of it) can be seen and they can click it to continue with the next instance of the original loop.

Perhaps a "Rambo" approach but it works for now until I figure out how to position a MsgBox out of the way.

Edited by JailDoctor

Share this post


Link to post
Share on other sites
Kiti

Thank you Rudi, Nobbe and D4rk!

JailDoctor, for Msgboxes, you can use msgboxwizard which can be found on the folowing location : C:\Program Files\AutoIt3\Examples\GUI\Advanced . It has an option to make it "always on top" without need of WinSetOnTop, as well as other useful options.

Ok, so they can't be moved. The MsbBox is centered so I move the user's application with WinMove ("YourWindow","", 540, 500) after the users do what the do and then the MsgBox (well, half of it) can be seen and they can click it to continue with the next instance of the original loop.

Perhaps a "Rambo" approach but it works for now until I figure out how to position a MsgBox out of the way.

But isn't this the only approach possible? :) Edited by Kiti

Share this post


Link to post
Share on other sites
rudi

@d4rk: What does your signature tell us? :)

Regards, Rudi.


Earth is flat, pigs can fly, and Nuclear Power is SAFE!

Share this post


Link to post
Share on other sites
d4rk

I don't know, i found it on another forum ... don't have a clue what it is


[quote]Don't expect for a perfect life ... Expect a least troubles ones[/quote]Contact me : ass@kiss.toWhat I Have Done :Favorites Manager Mangage your favorite's folder, that's coolPC Waker For those who want to save stickersWebScipts Supporter For those who've just started with Web and WebScriptsTemporary Looker Simple but powerful to manage your Temporary folder, you know what you downloaded[UDF] _NumberFormat() Better performance on number display[UDF] _DirGet() What a folder contain [how many (hidden,normal,...) files], with one line of code[UDF] _IsPressEs() Just like _IsPress() but for a group of keys

Share this post


Link to post
Share on other sites
MrCreatoR

To set a GUI on top you can use $WS_EX_TOPMOST style:

#include <GuiConstantsEx.au3>
#include <WindowsConstants.au3>

$GUI = GUICreate("Test Script", 300, 200, -1, -1, -1, $WS_EX_TOPMOST)

GUICtrlCreateButton("Button", 20, 40, 60, 20)

GUISetState(@SW_SHOW, $GUI)

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
    EndSwitch
WEndoÝ÷ Ù:,zÖ¦zËæèÆí¢¬{n¶×¨ºÚ"µÍÙÐÞ
M
    ][ÝÕ]I][ÝË  ][ÝÕ^ ][ÝÊ

After MsgBox shown the script is paused, therefore WinSetOnTop (or any other function that goes after) can't work on it.


 

Spoiler

Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1

AutoIt_Rus_Community.png AutoIt Russian Community

My Work...

Spoiler

AutoIt_Icon_small.pngProjects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize Program

AutoIt_Icon_small.pngUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF
 
AutoIt_Icon_small.pngExamples: 
ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo

Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating AutoIt_Rating.gif)

* === My topics === *

==================================================
My_Userbar.gif
==================================================

 

 

 

AutoIt is simple, subtle, elegant. © AutoIt Team

Share this post


Link to post
Share on other sites
rudi

I don't know, i found it on another forum ... don't have a clue what it is

:)

This makes me remembering a Paris couturier: Years ago he designed a bathing costume. The design was some arabic words he had taken a photo of, from some painting he saw on holidays.

The result was, that he got several death threats, as these "some words" were a very important sentence form the Koran, absolutely missplaced on that bathing cloth.

:P So: Never spread stuff you even don't know what it's about :P it might be badly insulting or even worse ...

Regards, Rudi.


Earth is flat, pigs can fly, and Nuclear Power is SAFE!

Share this post


Link to post
Share on other sites
d4rk

i asked some of my friend about it , but they say that it's innoncent, there's no meanting ... and till that, i'll keep it unless i find some better one

any way, thx for remind ...


[quote]Don't expect for a perfect life ... Expect a least troubles ones[/quote]Contact me : ass@kiss.toWhat I Have Done :Favorites Manager Mangage your favorite's folder, that's coolPC Waker For those who want to save stickersWebScipts Supporter For those who've just started with Web and WebScriptsTemporary Looker Simple but powerful to manage your Temporary folder, you know what you downloaded[UDF] _NumberFormat() Better performance on number display[UDF] _DirGet() What a folder contain [how many (hidden,normal,...) files], with one line of code[UDF] _IsPressEs() Just like _IsPress() but for a group of keys

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×