Jump to content

GUI with no borders ?


Recommended Posts

You may take a look here:

http://www.autoitscript.com/forum/index.ph...hl=windowstyles

And here is one of CyberSlugs snapshots:

http://www.autoitscript.com/fileman/users/public/CyberSlug/WindowStyles.png

Here's the au3-file from CyberSlug with the values:

http://www.autoitscript.com/fileman/users/public/CyberSlug/WindowStyles.au3

Thanks to CyberSlug :ph34r: and hope that helps...

Edit: himself was faster :(

Edited by Holger
Link to comment
Share on other sites

By the way, I could sworn there was a style that gave you a completely border-free window (not even the 3-d raised edge); but I can't find it now...

:ph34r:

$WS_POPUP = 0x80000000

GuiCreate("foo",100,100,100,100, $WS_POPUP)

GuiShow()

GuiWaitClose()

Edited by CyberSlug
Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
Link to comment
Share on other sites

I think styles only add things, I can't think of any off the top of my head that actually take things away. I'm sure that if (And I probably am) wrong about that, somebody will point out 421 examples.

Link to comment
Share on other sites

I can't get away from this error ?

---------------------------
AutoIt Error
---------------------------
Line 23  (File "E:\Programs\AutoIt3\Include\mini manager2.au3"):

GUICreate("Example",757,41,0,0,BitOr($DS_MODALFRAME,$WS_CAPTION))
GUICreate("Example",757,41,0,0,BitOr(^ ERROR

Error: Variable used without being declared.
---------------------------
OK   
---------------------------

#cs - ### Generated by AutoBuilder 0.4 -- do not modify ###
759 46
0   11  0   0   0   0   0   0   0   0   0   0   0   0   0   0   
button  $button_1   snapit  10  10  50  20  0   0   
button  $button_2   Button 2    70  10  60  20  0   0   
button  $button_3   Button 3    140 10  60  20  0   0   
button  $button_4   Button 4    210 10  60  20  0   0   
button  $button_5   Button 5    280 10  60  20  0   0   
button  $button_6   Button 6    350 10  60  20  0   0   
button  $button_7   Button 7    420 10  50  20  0   0   
button  $button_8   Button 8    480 10  50  20  0   0   
button  $button_9   Button 9    540 10  50  20  0   0   
button  $button_10  Button 10   600 10  50  20  0   0   
button  $button_11  Button 11   670 10  50  20  0   0   
#ce - ### End of Dump ###
#include "GUIConstants.au3"
;Script generated by AutoBuilder 0.4


Opt("GUICoordMode", 1)
Opt("GUINotifyMode", 1)

GUICreate("Example",757,41,0,0,BitOr($DS_MODALFRAME,$WS_CAPTION))
;;GuiCreate("MyGUI", 757,41,0,0, BitOr(BitOr(BitOr($DS_MODALFRAME,$WS_POPUP),$WS_CAPTION),$WS_SYSMENU),$WS_EX_TOOLWINDOW)
$button_1 = GUISetControl("button", "snapit", 10, 10, 50, 20)
$button_2 = GUISetControl("button", "Office", 70, 10, 60, 20)
$button_3 = GUISetControl("button", "MMB", 140, 10, 60, 20)
$button_4 = GUISetControl("button", "BatchC", 210, 10, 60, 20)
$button_5 = GUISetControl("button", "Uninstaller", 280, 10, 60, 20)
$button_6 = GUISetControl("button", "OneClickM", 350, 10, 60, 20)
$button_7 = GUISetControl("button", "basic4gl", 420, 10, 50, 20)
$button_8 = GUISetControl("button", "recycle", 480, 10, 50, 20)
$button_9 = GUISetControl("button", "IconCool", 540, 10, 50, 20)
$button_10 = GUISetControl("button", "Trillian", 600, 10, 50, 20)
$button_11 = GUISetControl("button", "SciTE", 670, 10, 50, 20)

GuiShow()

While 1
    sleep(100)
    $msg = GuiMsg(0)
    Select
    Case $msg = -3
        Exit
    Case $msg = 11
       ;;;
    Case $msg = $button_1
    run("E:\Programs\MWSnap\MWSnap.exe")
       ;;;
     Case $msg = $button_2
   run("C:\batch files\runopen office.exe")
       ;;;
     Case $msg = $button_3
        run("C:\Program Files\Multimedia Builder495\MMBuilder.exe")
       ;;;
     Case $msg = $button_4
        run("E:\Programss\BatchCompiler\Batch Compiler.exe")
       ;;;
     Case $msg = $button_5
        run("E:\Programss\cleanup\UninstallManager.exe")
       ;;;
     Case $msg = $button_6
        run("E:\Programss\cleanup\OneClickMaintenance.exe")
       ;;;
     Case $msg = $button_7
        run("E:\Programss\Basic4GL\basic4gl.exe")
       ;;;
     Case $msg = $button_8
        run("C:\Documents and Settings\Candles\Desktop\run_empty recycle bin.brs")
       ;;;
     Case $msg = $button_9
        run("C:\Program Files\IconCoolEditor\IconCooleditor.exe")
       ;;;
     Case $msg = $button_10
        run("C:\Documents and Settings\Candles\Desktop\Trillian.lnk")
       ;;;
     Case $msg = $button_11
        run("E:\Programs\AutoIt3\SciTe\SciTE.exe")
       ;;;
    EndSelect
WEnd
Exit
Link to comment
Share on other sites

In my code of a stopped project(for now): PixelFinder, I used this values:

Sorry, for the "number magic"(Hex. values). (For this moment, I'm not sure what values(styles mixed) are...) :ph34r:

But, test it... :(

GUICreate("Splash window example", 100, 100, -1, -1, 0x80080040)
Edited by josbe
Link to comment
Share on other sites

  • Administrators

I think styles only add things, I can't think of any off the top of my head that actually take things away.  I'm sure that if (And I probably am) wrong about that, somebody will point out 421 examples.

Yeah, the default styles give a bordered window but if you specify you own style then you are starting from 0 again so you can get the right style to work. I think CS posted the code above.
Link to comment
Share on other sites

In my code of a stopped project(for now): PixelFinder, I used this values:

Sorry, for the "number magic"(Hex. values). (For this moment, I'm not sure what values(styles mixed) are...)  :ph34r:

But, test it... :(

GUICreate("Splash window example", 100, 100, -1, -1, 0x80080040)
So what changed the style to no borders ? this (0x80080040)?
Link to comment
Share on other sites

So what changed the style to no borders ? this (0x80080040)?

$WS_POPUP = 0x80000000

I had thought that 0x0 would erase all styles, but I think the AutoIt-GUI code is setup to ignore a style == 0 and still provide the defaults.

Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
Link to comment
Share on other sites

$WS_POPUP = 0x80000000

I had thought that 0x0 would erase all styles, but I think the AutoIt-GUI code is setup to ignore a style == 0 and still provide the defaults.

I just used this 0x80080040 and it gave me what I wanted to do .

Only thing you can't drag it around but I want it at the top so thats fine .

Posted Image

Link to comment
Share on other sites

  • 2 weeks later...

I want a similar window but it would be nice if I could drag it, possible?

Oh and while I am here, can you "dock" a window to say the bottom of the screen? I searched but didn't return too muchie.

:ph34r:

Edited by Hooch
Link to comment
Share on other sites

Click on the window background, then mouse the mouse, then click again :ph34r:

Notes: There is probably a better way to handle the overlapping controls so that the screen repaints the buttons on top of the background label......

EDIT on Sept 14: Opt("WinWaitDelay", 10)

; CREATE GUI WITH BORDERLESS STYLE

Global $title = "ExampleGUI"
Global $MOVE_MODE = 0, $OFFSET
Opt("WinWaitDelay", 10)
Opt("GUINotifyMode", 1)
GuiCreate($title, 200, 100, 10, 10, 0x80000000)


; CREATE ALL CONTROLS BEFORE THE BACKGROUND

$hello = GuiSetControl("button","Hello", 10, 10, 30, 20)
$close = GuiSetControl("button","Close", 140, 60, 30, 20)

$background = GuiSetControl("label","", 0, 0, 200, 100)
GuiShow()
WinSetOnTop($title, "", 1)

; SET CONTROL STATES TO SHOW... IN ORDER FOR THE WINDOW TO REPAINT

GUISetControlEx($hello, 16);show
GUISetControlEx($close, 16);show

While 1
   sleep(10);just some extra sleep...
   
 ; IF IN MOVE MODE, THEN MOVE THE WINDOW RELATIVE TO THE MOUSE
   
   If $MOVE_MODE Then
      $mouse = MouseGetPos()
      WinMove($title,"", $mouse[0] + $x_offset, $mouse[1] + $y_offset)
   EndIf
   
   $msg = GuiMsg(0)
   If $msg = $hello Then MsgBox(4096,"Hi","Test message")
   If $msg = $close Then Exit
   If $msg = $background Then
      $MOVE_MODE = Not $MOVE_MODE;toggle mode
      
    ;CALCULATE RELATIVE OFFSET BETWEEN WINDOW AND MOUSE
      If $MOVE_MODE Then
         $mouse = MouseGetPos()
         $window = WinGetPos($title)
         $x_offset = $window[0] - $mouse[0]
         $y_offset = $window[1] - $mouse[1]
      EndIf
   EndIf
WEnd
Edited by CyberSlug
Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
Link to comment
Share on other sites

  • 8 years later...

Necroing a 9 year old thread? Seriously?

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

Example()

; example 1
Func Example()
    Local $msg

    GUICreate("My GUI", Default, Default, Default, Default, $WS_POPUP) ; $WS_POPUP makes a GUI with no borders
    GUISetState(@SW_SHOW) ; will display an empty dialog box

    ; Run the GUI until user hits esc.
    While 1
        $msg = GUIGetMsg()

        If $msg = $GUI_EVENT_CLOSE Then ExitLoop
    WEnd
    GUIDelete()
EndFunc   ;==>Example1

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...