Jump to content
Sign in to follow this  
TomaSzz

GUI disabling

Recommended Posts

TomaSzz

hi ,im new in this forum but i can code quite good in autoit.. i came across this idea... making gui with baground picture not the windows shell ...

here is pic of wat i mean

and if any1 can tell me how to do it or give example scrit i will apreaciate it very much

Posted Image

Share this post


Link to post
Share on other sites
Melba23

TomaSzz,

Welcome to the AutoIt forum. :idea:

The easiest way to do what you want is to use the $WS_POPUP style when you create your GUI. The you can use an image to fill the GUI - I have used one that comes with AutoIt, but you can replace with your own if you wish.

However, if you remove the title bar, you can no longer move the GUI around or exit using the [X]unless you code it yourself - like this:

#include <GuiconstantsEx.au3>
#include <WindowsConstants.au3>
#include <SendMessage.au3>

Global Const $SC_DRAGMOVE = 0xF012

HotKeySet("{ESC}", "On_Exit") ; Press ESC to exit
Func On_Exit()
    Exit
EndFunc

$hGUI = GUICreate("X", 200, 200, -1, -1, BitOR($WS_POPUP,$WS_BORDER))

GUICtrlCreatePic("C:\Program Files\AutoIt3\Examples\GUI\msoobe.jpg", 0, 0, 200, 200)
GUICtrlSetState(-1, $GUI_DISABLE) ; Do not forget to disable the background

$hButton = GUICtrlCreateButton("Test", 60, 80, 80, 30)

GUISetState()

While 1

    $msg = GUIGetMsg()
    Switch $msg
        Case $GUI_EVENT_PRIMARYDOWN ; Mouse button down
            _SendMessage($hGUI, $WM_SYSCOMMAND, $SC_DRAGMOVE, 0) ; Tell GUI to drag with the mouse
        Case $hButton
            MsgBox(0, "Hi!", "You pressed the button!")
    EndSwitch
WEnd

Remember to disable the background picture, or your buttons will not work! :)

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
TomaSzz

ok so on this code.. i can now add my own picture and buttons and resize it? and just put Case's for it :idea: ? and realy big thnx for welcoming me .. :) usualy in some random forum u get lol gtfo so on... :) rly thnx .. :( i will try this and ill post feedbakc here

Share this post


Link to post
Share on other sites
Melba23

TomaSzz,

i can now add my own picture and buttons and resize it? and just put Case's for it

Yes. If you run into problems, you know where we are. :idea:

realy big thnx for welcoming me

We try to be friendly bunch - most of the time! :)

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
TomaSzz

well , if i make with photoshop pic and i delete baground, but in the window i use it and i see white .. not transperent.. any fix for this? :/

Share this post


Link to post
Share on other sites
Melba23

TomaSzz,

Try adding the $WS_EX_LAYERED extended style: :idea:

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

Global Const $SC_DRAGMOVE = 0xF012

HotKeySet("{ESC}", "On_Exit") ; Press ESC to exit
Func On_Exit()
    Exit
EndFunc

$hGUI = GUICreate("Test", 200, 200, -1, -1, $WS_POPUP, $WS_EX_LAYERED)

GUICtrlCreatePic("C:\Program Files\AutoIt3\Examples\GUI\msoobe.jpg", 0, 0, 200, 200)
GUICtrlSetState(-1, $GUI_DISABLE) ; Do not forget to disable the background

$hButton = GUICtrlCreateButton("Test", 60, 80, 80, 30)

GUISetState(@SW_SHOW)

While 1

    Switch GUIGetMsg()
        Case $GUI_EVENT_PRIMARYDOWN ; Mouse button down
            _SendMessage($hGUI, $WM_SYSCOMMAND, $SC_DRAGMOVE, 0) ; Tell GUI to drag with the mouse
        Case $hButton
            MsgBox(0, "Hi!", "You pressed the button!")
    EndSwitch

WEnd

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
TomaSzz

ok ill try now :idea:

i still have that white..

maybe im saving it wrong on photoshop? or im deleting the baground wrong? XDD

EDIT:: solved it!!! tyvm for this help ... :) autoit forum is best.. MORE POWER to AUTOIT! :(

Edited by TomaSzz

Share this post


Link to post
Share on other sites
TomaSzz

(dont see my edit button on last post so ill post new)

ok ,my other thing i wana ask is... how do i make the button like umm.. howto tell.. u know like in many games where they hav launchers.. the buttons are in graphic like an image button... i know its posible in c++ to do 100% but in autoit.. if posible how? :idea:

Share this post


Link to post
Share on other sites
Melba23

TomaSzz,

Firstly, you only get to edit your posts after 5 posts - which you now have. :idea:

Next, please explain how you solved your problem so anyone searching will know what to do if they have the same problem. :)

Finally,

buttons are in graphic like an image button

If you create a button with the $BS_BITMAP style, you can set an image on it - it is all explained in the Help file. Or do you want part of your background image to act as a button?

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
TomaSzz

TomaSzz,

Firstly, you only get to edit your posts after 5 posts - which you now have. :idea:

Next, please explain how you solved your problem so anyone searching will know what to do if they have the same problem. :(

Finally,

If you create a button with the $BS_BITMAP style, you can set an image on it - it is all explained in the Help file. Or do you want part of your background image to act as a button?

M23

no i want to put the button on the GUI picture ...like.. umm , ive made the GUI with picture and there are places that i made transparent... and in those transparent places i put buttons( images) and in 1 big area that i made transparent ill put a notice board :)

Share this post


Link to post
Share on other sites
Melba23

TomaSzz,

Then use the $BS_BITMAP style for your buttons - look in the Help file.

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
TomaSzz

TomaSzz,

Then use the $BS_BITMAP style for your buttons - look in the Help file.

M23

ok ty vm :idea:

EDIT::hmm i cant get it ... i add what i need in code but i cant make it work.. always error..

Edited by TomaSzz

Share this post


Link to post
Share on other sites
Melba23

TomaSzz,

If you post your code we can take a look at what might be going wrong. :idea:

But please use Code tags. Put [autoit ] before and [/autoit ] after your posted code (but omit the trailing space - it is only there so the tags display here). Or press the blue button just under the BOLD toolbar button.

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
TomaSzz

TomaSzz,

If you post your code we can take a look at what might be going wrong. :idea:

But please use Code tags. Put [autoit ] before and [/autoit ] after your posted code (but omit the trailing space - it is only there so the tags display here). Or press the blue button just under the BOLD toolbar button.

M23

sorry mate... i went to my uncles and he had problems with his net so i couldnt get online, and at his comp i solved the problem... i was thinking of anything for it and i made the buttons with pics!! :):( now i just gotta make graphics with photoshop :( and done.. and btw i once tryed to make like a button for update.. but what i couldnt get to do is the hard part with including in it the progress bar... maybe u can make me a code? so ill know next time :) and maybe teach others hehe .. afterall we lear and teach.. :) and thnx for all ur help man :)

Share this post


Link to post
Share on other sites
Melba23

TomaSzz,

a button for update.. but what i couldnt get to do is the hard part with including in it the progress bar

I do not understand what you want here. Can you explain more clearly?

maybe u can make me a code?

No! Not until you have tried something yourself and posted it. :idea:

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
TomaSzz

TomaSzz,

I do not understand what you want here. Can you explain more clearly?

No! Not until you have tried something yourself and posted it. :)

M23

example buttons ;===> update[downloading the files for update]

download file types ;===> winrar compressed .sfx archive as .exe

eh ok ill go try ,but (more clear explaining) ;===> when person presses button update a progress bar will pop up of how much download is done ( and i rly dunno how to do the counting for seconds and size ROFL XD ) and when the download is finished it will extract that .exe automaticly without poping up on desktop. i had made once the download only and the extracting(but the extract thing came on desktop...i didnt know how to make it not pop up)

so,get me ? :idea:

Share this post


Link to post
Share on other sites
GEOSoft

We got you the first time but we don't write code for people. We will attempt to help them with problems they run into with the code they have written. If everything was written for you then you would learn very little about how to use the AutoIt functionality and it would be a never ending cycle of "Can you write this for me?".


George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Share this post


Link to post
Share on other sites
TomaSzz

We got you the first time but we don't write code for people. We will attempt to help them with problems they run into with the code they have written. If everything was written for you then you would learn very little about how to use the AutoIt functionality and it would be a never ending cycle of "Can you write this for me?".

ye :) but can u tell me at least how to do the part with the count... for progress.. like for example file size that is being downloaded will be 312MB (this is example) and the progress bar would show the line of how much done.. and maybe tell at bottom of line the % thats done.. i never found this in the ... Autoit help thing.. :idea:

Share this post


Link to post
Share on other sites
Melba23

TomaSzz,

i never found this in the ... Autoit help thing..

Are you referring to our wonderful Help file - shame on you! :idea:

Try looking at InetGetInfo - that will tell you what you need. :)

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
TomaSzz

TomaSzz,

Are you referring to our wonderful Help file - shame on you! :idea:

Try looking at InetGetInfo - that will tell you what you need. :)

M23

owrit ill look now :)

ok i found the progress set but not download ini get progress set.. and ill try now to put something together .. :(

Edited by TomaSzz

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  

×