Loading ...
Sorry, an error occurred while loading the content.

getting hndles of controls

Expand Messages
  • sirrab2000
    Hi All, Is there a way of getting control handles without have many hwnd (#handle) commands if you have the handle names in an array? Thanks Craig
    Message 1 of 3 , Aug 2, 2004
    • 0 Attachment
      Hi All,
      Is there a way of getting control handles without have many hwnd
      (#handle) commands if you have the handle names in an array?

      Thanks
      Craig
    • pendl2megabit
      Craig, the following code should be helpfull ;-) ---start create a window with a bunch of statictext controls displaying their handles nomainwin statictext
      Message 2 of 3 , Aug 2, 2004
      • 0 Attachment
        Craig,
        the following code should be helpfull ;-)

        '---start
        'create a window with a bunch of statictext controls
        'displaying their handles
        nomainwin
        statictext #win.1, "", 10, 10, 100, 24
        statictext #win.2, "", 10, 35, 100, 24
        statictext #win.3, "", 10, 60, 100, 24
        statictext #win.4, "", 10, 85, 100, 24
        statictext #win.5, "", 10, 110, 100, 24
        open "The new handle variable" for window as #win
        #win, "trapclose [quit]"

        'display each handle
        for x = 1 to 5
        var$ = "#win."; x
        #var$, hwnd(#var$)
        next x
        wait

        [quit]
        close #win
        end
        '---end

        ---
        Stefan Pendl


        > -----Urspr√ľngliche Nachricht-----
        > Von: sirrab2000 [mailto:sirrab2000@...]
        > Gesendet: Dienstag, 03. August 2004 01:03
        > An: libertybasic@yahoogroups.com
        > Betreff: [libertybasic] getting hndles of controls
        >
        >
        > Hi All,
        > Is there a way of getting control handles without have many hwnd
        > (#handle) commands if you have the handle names in an array?
        >
        > Thanks
        > Craig
        >
        >
        >
        >
        >
        >
        > Yahoo! Groups Links
        >
        >
        >
        >
        >
      • sirrab2000
        Thanks Stefan, You found my problem, I didn t put the # before the handle string in hwnd. hwnd(#string$) So I have learned something today !! Craig
        Message 3 of 3 , Aug 2, 2004
        • 0 Attachment
          Thanks Stefan,

          You found my problem, I didn't put the # before the handle string in
          hwnd.

          hwnd(#string$)

          So I have learned something today !!

          Craig

          --- In libertybasic@yahoogroups.com, "pendl2megabit"
          <pendl2megabit@y...> wrote:
          > Craig,
          > the following code should be helpfull ;-)
          >
          > '---start
          > 'create a window with a bunch of statictext controls
          > 'displaying their handles
          > nomainwin
          > statictext #win.1, "", 10, 10, 100, 24
          > statictext #win.2, "", 10, 35, 100, 24
          > statictext #win.3, "", 10, 60, 100, 24
          > statictext #win.4, "", 10, 85, 100, 24
          > statictext #win.5, "", 10, 110, 100, 24
          > open "The new handle variable" for window as #win
          > #win, "trapclose [quit]"
          >
          > 'display each handle
          > for x = 1 to 5
          > var$ = "#win."; x
          > #var$, hwnd(#var$)
          > next x
          > wait
          >
          > [quit]
          > close #win
          > end
          > '---end
          >
          > ---
          > Stefan Pendl
          >
          >
          > > -----Urspr√ľngliche Nachricht-----
          > > Von: sirrab2000 [mailto:sirrab2000@y...]
          > > Gesendet: Dienstag, 03. August 2004 01:03
          > > An: libertybasic@yahoogroups.com
          > > Betreff: [libertybasic] getting hndles of controls
          > >
          > >
          > > Hi All,
          > > Is there a way of getting control handles without have many hwnd
          > > (#handle) commands if you have the handle names in an array?
          > >
          > > Thanks
          > > Craig
          > >
          > >
          > >
          > >
          > >
          > >
          > > Yahoo! Groups Links
          > >
          > >
          > >
          > >
          > >
        Your message has been successfully submitted and would be delivered to recipients shortly.