View previous topic :: View next topic |
Author |
Message |
Tdk161 Valued Contributor
Joined: 08 Feb 2005 Posts: 399 Location: ITALY
|
Posted: Wed Apr 27, 2016 10:36 am Post subject: Dialog lost focus event? [SOLVED] |
|
|
Hello to all,
you can manage as an event when a dialog loses focus?
and if you like you can do?
Thank you
Last edited by Tdk161 on Sun May 01, 2016 2:07 pm; edited 1 time in total |
|
Back to top |
|
|
uvedese Contributor
Joined: 21 Jan 2006 Posts: 169 Location: Spain
|
Posted: Wed Apr 27, 2016 3:29 pm Post subject: |
|
|
Hi Tdk161.
There is a lot of time since I don't pass by here
I use a very easy way to do that
This way:
Code: | option decimalsep,.
%%win = "Test - Focus Window"
%%sw =
DIALOG CREATE,%%win,-1,0,240,160
REM *** Modified by Dialog Designer on 27/04/2016 - 17:10 ***
DIALOG ADD,TEXT,TEXT1,71,80,,,I'm lost the focus
dialog hide,text1
DIALOG SHOW
wait
:Loop
repeat
rem This is in order to save CPU usages cicles
wait event,.01
%e = @event()
until %e
if @equal(%e,TIMER)
%%focus = @winactive()
if @unequal(%%focus,%%win)
rem Focus lost
if @null(%%sw)
%%sw = 1
rem You can manage the lost focus event here!
dialog show,text1
end
else
if %%sw
%%sw =
dialog hide,text1
end
end
else
rem Manage other events
goto %e
end
goto Loop
:Close
exit |
I hope I have helped you
Bye |
|
Back to top |
|
|
Tdk161 Valued Contributor
Joined: 08 Feb 2005 Posts: 399 Location: ITALY
|
Posted: Wed Apr 27, 2016 4:06 pm Post subject: |
|
|
Hello uvedese
I am very happy to read you.
Thank you for your suggestion, it is useful
Would you give a look at my latest project Usb Launcher to tell me what you think? Maybe you can help me in the development, being an open source project.
I await your response and thank you again
See you soon bye |
|
Back to top |
|
|
uvedese Contributor
Joined: 21 Jan 2006 Posts: 169 Location: Spain
|
Posted: Thu Apr 28, 2016 6:43 pm Post subject: |
|
|
Ok Tdk161
Of course, I'm glad to colaborate
See you soon |
|
Back to top |
|
|
Tdk161 Valued Contributor
Joined: 08 Feb 2005 Posts: 399 Location: ITALY
|
Posted: Sat Apr 30, 2016 7:15 pm Post subject: |
|
|
Hello Uvedese,
I am very grateful for your help, you can download the sources of the latest version from my post on 'usblauncher', from the link in my last msg and NOT from the first link.
I look forward to hearing from you
Thank you |
|
Back to top |
|
|
|