English
Forum

Window-Focus

 

E.T.
its again so far, be on the verzweifeln:

gives it it a Possibility (in XProfan) to ascertain, if one (master-) Window whom Focus lose, z.B. on the aufrufende (not-profane-) Program or whom Desktop ??
my (einziges) Program-Window is Top-Most, but nevertheless would like I gladly know, if the window leave becomes.

Habs now in the momentum so, the by waitinput 2000  examined becomes, which Window whom Focus has, gefällt me but not really ...

yet rather would nat., The ID the aufrufenden Programm's To kennen,
then could I gezielter hereon react ...

...or there a Message in XProfan, if the window leave becomes ? Dös wär's naturally
 
Grüße aus Sachsen... Mario
WinXP, Win7 (64 Bit),Win8(.1),Win10, Win 11, Profan 6 - X4, XPSE, und 'nen schwarzes, blinkendes Dingens, wo ich das alles reinschütte...
11/06/14  
 



On each drop become You a UserMessage need because too the in XProfan installed SubClassing not so reliably is as an XProfan UserMessage. Try time wm_activate but vlt. tuts too wm_killfocus.
 
11/06/14  
 




E.T.
remaining but the question the request: would a Message, which one waitinput  durchbricht, appropriate or. necessary, circa not irgendeinen Timer in the Prog rödeln To let
 
XProfan X2
Grüße aus Sachsen... Mario
WinXP, Win7 (64 Bit),Win8(.1),Win10, Win 11, Profan 6 - X4, XPSE, und 'nen schwarzes, blinkendes Dingens, wo ich das alles reinschütte...
11/06/14  
 



i see The question not.

The User Message durchbricht waitinput and would this sinnvoller as one Timer.
 
11/06/14  
 




E.T.
Habs now time by User Message made:
CompileMarkSeparation
 {$IQ}
Declare ProgEnde%

Proc BlinkWindow

    Parameters Fenster&

    WhileLoop 3

        ~FlashWindow(Fenster&, 1)
        sleep 50

    EndWhile

    ~SetActiveWindow(Fenster&)

    If GetFocus(%HWnd)

        print "Wieder aktiviert..." + Time$(0)

    EndIf

EndProc

WindowStyle 8+512+16
WindowTitle "Testfenster"
Window 800,600
SetWindowPos %HWnd = %WinLeft,%WinTop - 800,600;-1
CLS GetSysColor(15)
UserMessages ~wm_killfocus

WhileNot ProgEnde%

    Waitinput
    Case %UMessage : BlinkWindow(%HWnd)

    If %Key = 2

        ProgEnde% = 1

    EndIf

EndWhile

end

now only The question: Why working ~SetActiveWindow(Fenster&)  only 1x (Window blinkt and becomes activate, Taskbar short there and again ausgeblendet), thereafter becomes something "verschluckt":
my (ausgeblendete) Taskbar ploppt high and shows me The Aktivierung of "Testfenster" on (means something arrives), but the window won't activate (becomes still not...ne...on the SetActiveWindow  liegen...)

somewhere i was there already time drüber stumbled...
...and somewhere here in the Nity gives 'nen code, circa Window "sicher" To enable, same time search...

...was still "nur " into Vordergrund:  [...] 
 
Grüße aus Sachsen... Mario
WinXP, Win7 (64 Bit),Win8(.1),Win10, Win 11, Profan 6 - X4, XPSE, und 'nen schwarzes, blinkendes Dingens, wo ich das alles reinschütte...
11/06/14  
 



Why always sleep, this is kontraproduktiv:
CompileMarkSeparation
WhileLoop 3

    ~FlashWindow(Fenster&, 1)
    sleep 50

EndWhi

there standing to German: make FlashWindow but gives the Process no Time for FlashWindow. becomes means windows-Version-tributary his when and how and whether the working. No good Solution! sooner yet WaitInput 50 as long as How Time-X not access is z.B. by getTickCount.

the into Vordergrundsetzen is neither so slight windowsversionenübergreifend because sometime (ex Vista?) meant MSDN that this only yet the Own Process for Own Window do should if one Window the Process self but already already whom Fokus has. went one So one bisl lane of it the one Process the Window has The any no Focus having itself self into Vordergrund bring should. somehow helped there always only Herumprobiere so it on all windows-versions gleichermassen functions. onerous! but first by API a Fensteranweisung and give then by SLEEP The Thread quasi "stoppen" isn't in the senses the Erfinders.
 
11/06/14  
 




E.T.
Yes, sleep avoid so did i, is hold in this Bsp. reingeraten (with z.Bsp. waitinput 500  happens but the same)

is only thick, the there couple Win-Progger my, that I not self to determine must, the my Window activate and is only yet z.B. by Taskbar hereon "hingewiesen" becomes, the well time one (wichtiges ??) Program The heed wish.

i will again 3.11, the best Win, what it apiece given

Nachtrag: is now time so 'ne question: can there Roland what on The (sometimes dümmliche) development of Win adjust, or How high would the hoisted?
Perhaps. is it still rather, The W-Version auszulesen and then the Prog anzupassen (XProfan-intern or API benefit).

or differently around: how far proggt one "abwärts-kompatibel",
and where are since the border ??
XP is Yes yet far common and becomes it well too yet 'ne while stay, there would it too pity, if this not any more by XProfan supported would.
 
Grüße aus Sachsen... Mario
WinXP, Win7 (64 Bit),Win8(.1),Win10, Win 11, Profan 6 - X4, XPSE, und 'nen schwarzes, blinkendes Dingens, wo ich das alles reinschütte...
11/06/14  
 



simply one new Window, new Process or new windows produce!?!
 
11/07/14  
 




GDL
Hallöle,

this here :


is only thick, the there couple Win-Progger my, that I not self to determine must


fuming me too. only yet Multimedia boxes.

we using for Steuerungsaufgaben still WInME and Win98.
there was one with the Hardwarezugriffen not so limited.

Grüßle
Georg
 
XProfan X3
Windows7 Xprofan 8,9,10 [...]  [...] 
11/07/14  
 



Since windows develops can Yes not everything at middle-aged stay.

we Holzfäller having it too with increasingly axe-resistenten Bäumen To do.

take we hold The Kettensäge.

One new Window erstellten, that then supra lying, goes still?
 
11/09/14  
 




E.T.
so, habs time with 'nem new Window probiert,
still somehow the same behaviour:
correctly. activate becomes the HWnd only at first Durchlauf
CompileMarkSeparation
 {$IQ}
Declare ProgEnde%, HelpWindow&

Proc BlinkWindow

    Parameters Fenster&

    WhileLoop 3

        ~FlashWindow(Fenster&, 1)
        Waitinput 50'man soll ja keine Zeit stehlen !!

    EndWhile

    ~SetActiveWindow(Fenster&)

EndProc

WindowStyle 8+512+16
WindowTitle "Testfenster"
Window 800,600
SetWindowPos %HWnd = %WinLeft,%WinTop - 800,600;-1
CLS GetSysColor(15)

WhileNot ProgEnde%

    UserMessages ~wm_killfocus'Message setzen
    Waitinput

    If %UMessage = ~wm_killfocus

        Usermessages 0'sonst Endlos-Schleife !!
        HelpWindow& = Create("Window",%HWnd,"",0,0,10,10)
        Case GetFocus(HelpWindow&) : Print "Hilfsfenster hat Focus"
        BlinkWindow(%HWnd)
        destroywindow(HelpWindow&)
        Case GetFocus(%HWnd) : Print "Hauptfenster hat Focus"

    ElseIf %Key = 2

        ProgEnde% = 1

    EndIf

EndWhile

end
 
Grüße aus Sachsen... Mario
WinXP, Win7 (64 Bit),Win8(.1),Win10, Win 11, Profan 6 - X4, XPSE, und 'nen schwarzes, blinkendes Dingens, wo ich das alles reinschütte...
11/10/14  
 



And if You time in your BlinkWindow first thing setforegroundwindow hwnd and thereafter(!) setactivewindow hwnd make?

stand here  [...]  Reasons for this behaviour?
 
11/10/14  
 




Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

9.344 Views

Untitledvor 0 min.
E.T. vor 14 Tagen
maroro07/01/16
Ernst04/14/16
ByteAttack08/09/15
More...

Themeninformationen

this Topic has 3 subscriber:

iF (6x)
E.T. (6x)
GDL (1x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie