forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Dialog lost focus event? [SOLVED]

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
Tdk161
Valued Contributor
Valued Contributor


Joined: 08 Feb 2005
Posts: 399
Location: ITALY

PostPosted: Wed Apr 27, 2016 10:36 am    Post subject: Dialog lost focus event? [SOLVED] Reply with quote

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
View user's profile Send private message Send e-mail
uvedese
Contributor
Contributor


Joined: 21 Jan 2006
Posts: 169
Location: Spain

PostPosted: Wed Apr 27, 2016 3:29 pm    Post subject: Reply with quote

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 Very Happy
Back to top
View user's profile Send private message Visit poster's website
Tdk161
Valued Contributor
Valued Contributor


Joined: 08 Feb 2005
Posts: 399
Location: ITALY

PostPosted: Wed Apr 27, 2016 4:06 pm    Post subject: Reply with quote

Hello uvedese Very Happy
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 Very Happy
Back to top
View user's profile Send private message Send e-mail
uvedese
Contributor
Contributor


Joined: 21 Jan 2006
Posts: 169
Location: Spain

PostPosted: Thu Apr 28, 2016 6:43 pm    Post subject: Reply with quote

Ok Tdk161

Of course, I'm glad to colaborate Thumbs Up

See you soon
Back to top
View user's profile Send private message Visit poster's website
Tdk161
Valued Contributor
Valued Contributor


Joined: 08 Feb 2005
Posts: 399
Location: ITALY

PostPosted: Sat Apr 30, 2016 7:15 pm    Post subject: Reply with quote

Hello Uvedese, Smile
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 Smile
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group