English
Forum

where is my Cursor

 

Erasmus.Herold
Hallöchen ...

following question:
I have one Window opened and this find itself countless Edit-boxes.
let itself simply (and without each Edit abzufragen) detect, where the Cursor
currently blinkt?
fenster_darueber_2% = Create("Dialog",fenster_darueber%,"Fenster",28,330,1870,730)
fenster_fixieren_2& = external("USER32","GetSystemMenu",fenster_darueber_2%,0)
external("USER32","DeleteMenu",fenster_fixieren_2&,$F010,0)
ks_1_cent$ = create("Edit", fenster_darueber_2%, "", 700, 135, 100, 30)
ks_2_cent$ = create("Edit", fenster_darueber_2%, "", 700, 170, 100, 30)
ks_5_cent$ = create("Edit", fenster_darueber_2%, "", 700, 205, 100, 30)
ks_10_cent$ = create("Edit", fenster_darueber_2%, "", 700, 240, 100, 30)
ks_20_cent$ = create("Edit", fenster_darueber_2%, "", 700, 275, 100, 30)

In welchem area blinkt the Cursor?
Thank you!
 
11/20/18  
 




H.Brill
The Systemvariable %GetFocus gives you the lever the straight
active Editfeldes back.
 
Benutze XPROFAN X3 + FREEPROFAN
Wir sind die XProfaner.
Sie werden von uns assimiliert.
Widerstand ist zwecklos!
Wir werden alle ihre Funktionen und Algorithmen den unseren hinzufügen.

Was die Borg können, können wir schon lange.
11/20/18  
 




Erasmus.Herold
thanks for response. so I had the too in the Help found.

One kurzes example would cool been. therefore I had extra one
couple boxes as code enclosed.
Perhaps one kurzer Tipp, How I z.B. by the suitable request
The Info sustain: the Cursor standing in area "ks_10_cent$"

Thank you
 
11/21/18  
 




H.Brill
1. ks_1_cent$ is a Stringvariable. to that Happiness konvertiert
XProfan intern. therefore comes too no Error. Create()
supply but always a handle (number) back. means is it rather,
a Zahlenvariable (%,&, lever) To use.

2. at that create the Editfields could you one numeriches
aray use. The Variablennamen get You anyhow
not To see. One korrespondierendes String-aray could
but suitable names provide.

Meinst You about something like ?
Declare  Edits%[5], names$[], y%
Namen$[] = "1. Edit", "2. Edit", "3. Edit", "4. Edit", "5. Edit"
Window 800, 600
y% = 10

WhileLoop 0, 4

    Edits%[&LOOP] = Create("Edit", %HWnd, "", 10, y%, 120, 25)
    Inc y%, 30

EndWhile

While 1

    WaitInput

    WhileLoop 0, 4

        If %GetFocus = Edits%[&LOOP]

            Locate 15, 1
            Print names$[&LOOP], "hat whom Cursor !"

        EndIf

    EndWhile

    Case %Key = 2 : Break

EndWhile

End
 
Benutze XPROFAN X3 + FREEPROFAN
Wir sind die XProfaner.
Sie werden von uns assimiliert.
Widerstand ist zwecklos!
Wir werden alle ihre Funktionen und Algorithmen den unseren hinzufügen.

Was die Borg können, können wir schon lange.
11/21/18  
 




E.T.
Have the voriges example time to IndexOf(...  rebuilt
(only in order to aufzuzeigen, the it so too goes ).

Perhaps. isses Yes so bissel faster ...
Declare  Edits%[5], names$[], y%, EditPos%
Window 800, 600
y% = 10

WhileLoop 0, 4

    Edits%[&LOOP] = Create("Edit", %HWnd, "", 10, y%, 120, 25)
    Inc y%, 30

EndWhile

While 1

    EditPos% = IndexOf(Edits%[],%GetFocus)

    If EditPos% > -1

        Locate 15, 1
        Print "                                            "'row delete
        Locate 15, 1
        Print (EditPos%+1) + ". Edit has whom Cursor !"

    Else

        Locate 15, 1
        Print "Irgend something other has whom Focus !"

    EndIf

    WaitInput
    Case %Key = 2 : Break

EndWhile

End

With the whom expl. names for Edit's (How before described) can here nat. too use
 
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/21/18  
 




Erasmus.Herold
Thanks on you!
 
11/22/18  
 




Erasmus.Herold
Getestet - functions splendid - Thank you!
 
11/24/18  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

4.269 Views

Untitledvor 0 min.
RudiB.08/31/21
Stefan8101/01/20
RAW07/22/19
Pedro Miguel05/26/19
More...

Themeninformationen

this Topic has 3 subscriber:

Erasmus.Herold (4x)
H.Brill (2x)
E.T. (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