Jump to content
MyEarth

_ChooseColor blocking function?

Recommended Posts

MyEarth

Hello, there is a valid "technical reason" behind the choice to make a Color dialog box a blocking function? I can understand for MsgBox but i don't see any reason, except for a techincal one, for make that dialog a blocking function. Is possible to "remove" this limitation from that UDF?

Thanks

Share this post


Link to post
Share on other sites
Melba23

MyEarth,

The function calls the standard Windows colour chooser dialog using comdlg32.dll and the resulting dialog is blocking. So how do you suggest the "limitation" is removed?

And why do you want to keep the dialog visible anyway?

M23


Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see 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
MyEarth

The only thing i'd like is when i call that dialog don't stop the entire main loop until it will be closed, like a normal GUI and not like a MsgBox. If behind there is a technical reason we can do nothing, but if is a choice of the author of the UDF is different for this reason i'm ask if is possible to not make the dialog a blocking one. 

Edited by MyEarth

Share this post


Link to post
Share on other sites
LarsJ
MikahS

I don't think it's blocking if you set $hWndOwnder = 0.

It will still have the same affect.


Snips & Scripts


My Snips: graphCPUTemp ~ getENVvars
My Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4

Feel free to use any of my code for your own use.                                                                                                                                                           Forum FAQ

 

Share this post


Link to post
Share on other sites
LarsJ
MikahS

@LarsJ No worries, I think the only way you can truly make it non blocking is if you made the color picker GUI yourself.

EDIT: I would think the reason it is made as blocking is that you would want to use the color you chose, before moving on in your script, just like you would wait for a user to make an interaction with a MsgBox, before moving on. So, I'm with @Melba23 on this one.

Edited by MikahS

Snips & Scripts


My Snips: graphCPUTemp ~ getENVvars
My Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4

Feel free to use any of my code for your own use.                                                                                                                                                           Forum FAQ

 

Share this post


Link to post
Share on other sites
LarsJ

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

×