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

41587RE: [libertybasic] SIMPLE

Expand Messages
  • Henrik
    Oct 2, 2010
    • 0 Attachment
      Thank you Stefan, but may I ask you why the value of timer is 100?
      I change it for trial to 1 and to1000 to see the effect, with 1 the paste will be faster in compression with 1000. But the results are correct by the two values.
      Could we have your comment please.

      --- On Sat, 10/2/10, Stefan Pendl <pendl2megabit@...> wrote:

      From: Stefan Pendl <pendl2megabit@...>
      Subject: RE: [libertybasic] SIMPLE
      To: libertybasic@yahoogroups.com
      Date: Saturday, October 2, 2010, 7:25 AM


      > Ok Stefan, if it is wrong from a GUI point of view, then can
      > we use copy and paste for the following values inside the two
      > txtboxs just by one step, i.e. to put the curser on the upper
      > txtbox and past two variables, the first one would be in the
      > upper txtbox and the second would be in the lower
      > txtbox."just by one step"
      > There are some serials of some software accept this way
      > although the boxes are arranged horizontally in this case.
      > Thank you
      > The variables are:
      > 7
      > 11

      Please test the following example:

      '---code start (watch for line wraps)
      WindowWidth = 400
      WindowHeight = 300
      TEXTBOX #A.txtbox1, 100,140,60,25
      TEXTBOX #A.txtbox2, 100,170,60,25
      STATICTEXT #A "Input 1=", 30, 140, 60, 25
      STATICTEXT #A "Input 2=", 30, 165, 60, 25
      GRAPHICBOX #A.textresult, 100, 40, 160, 80
      BUTTON #A.Default, "Calculate",[enter],UL, 100, 230,70 , 25
      #A "trapclose [quit]"
      #A "font Times_New_Roman 12"

      #A.txtbox1 "!contents? OldEntry$"
      #A.txtbox1 "!setfocus"

      timer 100, [IsChanged]

      #A.txtbox1 "!contents? Entry$"

      if Entry$ <> OldEntry$ then
      #A.txtbox1 word$(Entry$, 1)
      #A.txtbox2 word$(Entry$, 2)
      #A.txtbox1 "!contents? OldEntry$"
      end if

      PRINT #A.txtbox1, "!contents? a"
      PRINT #A.txtbox2, "!contents? b"
      #A.textresult "place 5 25"
      #A.textresult "\Input 1= "; a;
      #A.textresult "\Input 2= "; b;
      #A.textresult "\Multiplication= ";a*b;

      CLOSE #A
      '---code end

      Stefan Pendl

      Liberty BASIC 4.04 Pro ... http://www.libertybasic.com/assist.html
      Liberty BASIC 4.04 ....... http://www.libertybasic.com/lb404setup.exe

      Liberty BASIC Bug Tracker ... http://libertybasicbugs.wikispaces.com/

      Books at http://www.lulu.com/ and http://www.amazon.com/
      Alyce Watson ... APIs for Liberty BASIC
      Carl Gundel .... Beginning Programming with Liberty BASIC

      Windows 7 Home Premium 64-bit RTM
      AMD Turion X2 RM-70 2GHz, 4GB RAM

      [Non-text portions of this message have been removed]
    • Show all 17 messages in this topic