Sign in to follow this  
Followers 0
James

GUI Questions

36 posts in this topic

Hey,

I would like to know how you remove the title bar, so you just have the GUI. I would also like to know if it is possible to create an input without a GUI. And my last question, how do you put a input into the Title Bar?

Thanks,

Secure

Share this post


Link to post
Share on other sites



Removing title bar, try using the style $WS_POPUP. Note that this removes the close/minimize buttons too

To make only an input show up, you can use the $WS_EX_TRANSPARENT..,. im not to sure on it though, it would be easier to just make the input be the same size as the window and use the $WS_POPUP style, along with the $WS_EX_TOOLWINDOW which removes it from the taskbar as well

For the third question... I dont know... I dont think its possible to put one on the actual windows title bar, if thats what you mean. You can improvise this a few ways but you would need a system for moving it and stuff. Why would you want one in the title bar?

Share this post


Link to post
Share on other sites

Granted I don't know how it's done, but have you tried setting it up like you can do with the addressbar ?

Right-click Toolbars - addressbar


A decision is a powerful thing

Share this post


Link to post
Share on other sites

I've attached a screenshot. Granted I don't know how to get autoit to do this, but GoogleDesktop also has this feature. It's possible for sure - seems so at least.

post-19850-1171998744_thumb.jpg


A decision is a powerful thing

Share this post


Link to post
Share on other sites

Hmm.. Well I have this:

#include <GuiConstants.au3>

$DeskHeight = @DesktopHeight / 170
$DeskWidth = @DesktopWidth / 2 + 320

GuiCreate("Test", 100, 20, $DeskWidth, $DeskHeight, BitOR($WS_POPUP, $WS_EX_TOPMOST))
GUICtrlCreateInput("Search", -1, -1, 100, 20)
GuiSetState(@SW_SHOW)

While 1
    Sleep(100)
Wend

I dont know how to keep it on top all the time. And I cant make it stay in the same place on different resolutions. I need it to be near the buttons on the right of a window.

Share this post


Link to post
Share on other sites

OH! my bad I totally misunderstood. Have you tried to do a child window of sorts?


A decision is a powerful thing

Share this post


Link to post
Share on other sites

Yes, I am trying to add it into BetaPad so that you can type help and it will bring up the help. I cant remove the taskbar icon. Not #NoTrayIcon

I have:

#include <GuiConstants.au3>
#NoTrayIcon

$DeskHeight = @DesktopHeight / 170
$DeskWidth = @DesktopWidth / 2 + 320

$sGUI = GuiCreate("Test", 100, 20, $DeskWidth, $DeskHeight, BitOR($WS_POPUP, $WS_EX_TRANSPARENT, $WS_EX_TOOLWINDOW))
$sInput = GUICtrlCreateInput("", -1, -1, 102, 22)

GuiSetState()

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $sInput
            $sRead = GuiCtrlRead($sInput)
            If $sRead = GuiCtrlRead("help") Then MsgBox(0, "Help", "You need help?")
            ;
            If $sRead = GuiCtrlRead("lol") Then MsgBox(0, "Lol?", "Why are you laughing?")
    EndSwitch
Wend

As a test.

What I need to do now is:

  • Make it fit on all resolutions
  • Answer to the correct word and not go through all of them
  • Embed into a main GUI
Secure

Share this post


Link to post
Share on other sites

$WS_EX_TOOLWINDOW is your answer for sure. However, it needs to be after your BitOr

GuiCreate("Test", 100, 20, $DeskWidth, $DeskHeight, BitOR($WS_POPUP, $WS_EX_TOPMOST),$WS_EX_TOOLWINDOW)


A decision is a powerful thing

Share this post


Link to post
Share on other sites

Have you tried setting the search to be a child Window?


A decision is a powerful thing

Share this post


Link to post
Share on other sites

Finally, I have made the GUI always on top but so you can still use your other applications.

#include <GuiConstants.au3>
#NoTrayIcon

$DeskHeight = @DesktopHeight / 170
$DeskWidth = @DesktopWidth / 2 + 320

$sGUI = GuiCreate("Test", 100, 20, $DeskWidth, $DeskHeight, BitOR($WS_POPUP, $WS_EX_TOPMOST),$WS_EX_TOOLWINDOW)
$sInput = GUICtrlCreateInput("", -1, -1, 102, 22)

GuiSetState()
WinSetOnTop($sGUI, "", 1)

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $sInput
            $sRead = GuiCtrlRead($sInput)
            If $sRead = GuiCtrlRead("help") Then MsgBox(0, "Help", "You need help?")
            If $sRead = GuiCtrlRead("lol") Then MsgBox(0, "Lol?", "Why are you laughing?")
    EndSwitch
Wend

No I only need to do:

  • Auto-Adjust (So it places it self on the top right about 100px away from the, minimize, maximise and exit button.
  • Make the $sRead work. So you type in a command and it will do something.
Secure

Share this post


Link to post
Share on other sites

#15 ·  Posted (edited)

Ok, I have done the Input problem:

#include <GuiConstants.au3>
#NoTrayIcon

$sGUI = GuiCreate("WinBar App", 100, 20, 100, 100, BitOR($WS_POPUP, $WS_EX_TOPMOST),$WS_EX_TOOLWINDOW)
$sInput = GUICtrlCreateInput("", -1, -1, 102, 22)

GuiSetState()
WinSetOnTop($sGUI, "", 1)

While 1
    WinFix()
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $sInput
            $sRead = GuiCtrlRead($sInput)
            ToDo()
    EndSwitch
Wend

Func WinFix()
    If @DesktopHeight = 1024 Then WinMove($sGUI, "", @DesktopHeight / 170, @DesktopWidth / 2 + 320)
    EndFunc
    
Func ToDo()
    If $sRead = "help" Then MsgBox(0, "Help", "You need help?")
    If $sRead = "lol" Then MsgBox(0, "Lol?", "Why are you laughing")
EndFunc

Now I need the Auto Placement, but that is hard.

Edit: Minor spelling mistake.

Edited by Secure_ICT

Share this post


Link to post
Share on other sites

Just read your posts. Great job! That's exciting~

Note: on my system it places the search bar ontop of my startBar. Is this what you wanted? I just thought I'd let you know how it looks on my system.

Great job! I'm looking forward to more from it and I've thought of some wonderful applications of this. Thanks


A decision is a powerful thing

Share this post


Link to post
Share on other sites

I'm running dual monitors (1280x1024). If I can today, I'll take a look at it on my system and do some testing. If not today, soon :whistle: You'll probably bet me to it :)


A decision is a powerful thing

Share this post


Link to post
Share on other sites

#20 ·  Posted (edited)

haha, that's pretty much what I was going to test :whistle: What part are you fuzzy on? Not for sure it will work, but that's where I was thinking of starting.

Edit: screw it I'll try some stuff for a few mins :) haha

Edited by JohnBailey

A decision is a powerful thing

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  
Followers 0