| |
|
|
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!! |
|
|
| |
|
|
|
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 |
|
|
| |
|
|
|
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( ... |
|
|
| |
|
|
|
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 |
|
|
| |
|
|
|
| too with Keys The with addHotKey laid out go? |
|
|
| |
|
|
|
| |
|
| |
|
|