English
Forum

Tastenabfrage in new erzeugtem Fernster...

 

Michael
Axtmann
...will not klappen!??

Hi,
to ewiger rumprobiererrei and Search over The XProfan Help, come I now still with this banalen thing here since:
If I from the Mainwindow out one new Window beget, becomes my waitinput only with Clicks on dei there located Buttons leave, however not by Tastendruck! What do I do wrong????? Have I what forget from scratch Window umzuleiten??
Greeting
PS:in the attachment one small example! The button ought to with the "Space" Button bedient go can! In both Windows!!

1 kB
Kurzbeschreibung: Testprogramm
Hochgeladen:09/24/12
Downloadcounter111
Download
 
09/24/12  
 




E.T.

...

PROC FENSTER2

    HWND% = create("window",%hwnd,"FENSTER2", 100,100, 640,480)
    setactivewindow(HWND%)
    button2& = Create("Button",HWND%,"Schließen",50,50,100,50)
    'Through tab-Button first on the Button2 focusieren or
    SetFocus(Button2&)'Focus immediate on the Button

    while xe%=1

        ...

the 2. Window would I but on none drop HWND% name...
 
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...
09/24/12  
 




Michael
Axtmann
Hi,
thanks, functions of course, but I think the trouble becomes "nur umschifft", because if I in the 2.Window to control to waitinput one print %scankey installation, then writes it me "0" !!
After waitinput in the Mainwindow writes it whom right Scancode....
see Bsp.
Regards

1 kB
Kurzbeschreibung: Test 2
Hochgeladen:09/24/12
Downloadcounter116
Download
 
09/24/12  
 




E.T.
Jo, have right with the "umschiffen": with the settle the Focus on the Button becomes then selbiger with the Leertaste "betätigt" - fallacy.
Have now time 'ne while probiert and check must, the well in another (focusiertem) Window as How in the Mainwindow most System-Variables (wozu Yes scankey heard) the waitinput not durchbrechen. proof: make in your Bsp. the Mainwindow active, then reacted your Window2 on The Leertaste and becomes closed.
the must we well Roland time as "Bug or vermeintlicher" near lay  

Have now time on The speedy everything so "umgebastelt", the it with the Window2 functions: the Zauberwort (or Nothilfe): SubClassing !!

Have simply time your Window2 "gesubclasst" and the Message 257 (release the Leertaste)  abgefangen, already functions it.

have though whom appeal the 2. Fensters by Leertaste time rausgenommen:
at that Call reacted scankey the pressing the Button (and opens the "Fenster2),the release would then of 2. Window immediate again Closing  receipting.

means best with SubClassing  keep busy and Roland whom Error search let, Why only Mainwindow on The keyboard reacted becomes

alas Yes, the on The speedy "umgeschraubte" View source:
declare e%,xe%,Key%
declare button1&,button2&
declare HWND%
cls
e% = 1
xe%=1
button1& = Create("Button",%HWND,"Start",50,50,50,50)

PROC FENSTER2

    HWND% = create("window",%hwnd,"FENSTER2", 100,100, 640,480)
    setactivewindow(HWND%)
    button2& = Create("Button",HWND%,"Schließen",50,50,100,50)
    SubClass HWND% , 1

    while xe%=1

        waitinput

        if clicked(button2&)

            print "Fenster2 through Button closed closed!!"
            xe% = 0
            destroywindow(HWND%)

        endif

    endwhile

ENDPROC

SubClassProc

    If SubClassMessage(HWND%, 257)'Leertaste release

        print "Fenster2 in SubClassProc through Message 257 (Leertaste losgelassen) closed!!"
        xe% = 0
        destroywindow(HWND%)

    endif

endproc

while e%=1

    waitinput

    if clicked (button1&)

        xe% = 1
        FENSTER2

    endif

endwhile

end

good night !!!
 
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...
09/25/12  
 



... or simply HotKeys by addHotKey( ...
 
09/25/12  
 




Michael
Axtmann
Hi,
thanks, that your you the time angeschaut have! having already öfters so fought and just virtual i'm To thick, but the waitinput becomes definitiv sometimes simply not leave!!
Regards
 
09/25/12  
 



too with Keys The with addHotKey laid out go?
 
09/25/12  
 



Huhuh?
 
10/11/12  
 



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.673 Views

Untitledvor 0 min.
Mindanao06/06/17
GDL09/08/14
Heinz Bernhard08/28/13
holmol9306/13/13
More...

Themeninformationen

this Topic has 3 subscriber:

Michael Axtmann (3x)
iF (3x)
E.T. (2x)


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