Jump to content

lock gui


Recommended Posts

when cursor on centre of gui so its equal to 1. and on titlebar equal to 2. otherwise out of gui it value equal to 18.

OK, thanks, so I assume my code worked for you.

I just need to get the values from someone who finds it doesn't work on their PC.

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

OK, thanks, so I assume my code worked for you.

I just need to get the values from someone who finds it doesn't work on their PC.

Could anyone else try the code in post #19? I'm interested to find why it doesn't always work, and if anyone finds it doesn't work for them then the numbers would help me.

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

Code works for me BUT

at start the value is 99 until I mouse over the GUI

also if you left click the gui icon and select "move" you can still move the window this way (maybe a check while in "freeze" mode would put the window back if this method is used?)

A quick fix would be to use $WS_EX_TOOLWINDOW

Link to comment
Share on other sites

I get (on Vista Business, no weird themes applied)-

1 = client area

2 = top half of the title bar when moving the cursor up, but entire title bar when moving back down (when I'm moving from the client area to the title bar, it doesn't change from 1 to 2 until I'm halfway up the titlebar, but coming back down it stays on 2 until I'm fully in the client area again).

-menu icon in title = exactly the same as the title bar (above)

-minimise, maximise (which is disabled) and close button - no change (1 if I'm going straight up from client area, since they're taller than half the title bar, 2 if I've already gone into the top half of the title bar, then go over to the buttons).

18 = a border (side or bottom)

Fix and free buttons make no difference - that is, the GUI is always movable.

Edited by james3mg
"There are 10 types of people in this world - those who can read binary, and those who can't.""We've heard that a million monkeys at a million keyboards could produce the complete works of Shakespeare; now, thanks to the Internet, we know that is not true." ~Robert Wilensky0101101 1001010 1100001 1101101 1100101 1110011 0110011 1001101 10001110000101 0000111 0001000 0001110 0001101 0010010 1010110 0100001 1101110
Link to comment
Share on other sites

I get (on Vista Business, no weird themes applied)-

1 = client area

2 = top half of the title bar when moving the cursor up, but entire title bar when moving back down (when I'm moving from the client area to the title bar, it doesn't change from 1 to 2 until I'm halfway up the titlebar, but coming back down it stays on 2 until I'm fully in the client area again).

-menu icon in title = exactly the same as the title bar (above)

-minimise, maximise (which is disabled) and close button - no change (1 if I'm going straight up from client area, since they're taller than half the title bar, 2 if I've already gone into the top half of the title bar, then go over to the buttons).

18 = a border (side or bottom)

Fix and free buttons make no difference - that is, the GUI is always movable.

Thanks, the problem must be to do with Vista, I'l play with that.

@danwilli. Thanks for your reply. I'd forgotten about using the menu to move.

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

Thanx to all for helping me.

can u tell me one more thing that how to lock minimize function in this titlebar that can't minimize

Edited by L3G3NdKillEr

i'm very responsible, when ever something goes wrong they always say I'm responsible.Life is like an Adventure... BUT COOL GRAPHICS<====================----=LEGEND KILLER=----=========================>

Link to comment
Share on other sites

Don't include $WS_MINIMIZEBOX in your style parameters when you create the GUI.

IE Dev ToolbarMSDN: InternetExplorer ObjectMSDN: HTML/DHTML Reference Guide[quote]It is surprising what a man can do when he has to, and how little most men will do when they don't have to. - Walter Linn[/quote]--------------------[font="Franklin Gothic Medium"]Post a reproducer with less than 100 lines of code.[/font]
Link to comment
Share on other sites

i remove $ws_minimize but it also minimize from taskbar. i also want to lock from taskbar that user can't Minimize script from taskbar.

i'm very responsible, when ever something goes wrong they always say I'm responsible.Life is like an Adventure... BUT COOL GRAPHICS<====================----=LEGEND KILLER=----=========================>

Link to comment
Share on other sites

#include <GuiConstants.au3>

Opt("GUIOnEventMode", 1)

$testGUI = GUICreate("Test - Stuck Window", 400, 400, -1, -1, BitOR($WS_SYSMENU, $WS_MAXIMIZEBOX))
GUISetOnEvent($GUI_EVENT_CLOSE, "Terminate")

GUISetState()

While 1
    Sleep(10)
WEnd

Func Terminate()
    Exit 0
EndFunc

IE Dev ToolbarMSDN: InternetExplorer ObjectMSDN: HTML/DHTML Reference Guide[quote]It is surprising what a man can do when he has to, and how little most men will do when they don't have to. - Walter Linn[/quote]--------------------[font="Franklin Gothic Medium"]Post a reproducer with less than 100 lines of code.[/font]
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...