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

RE: [libertybasic] multiple windows

Expand Messages
  • Moore, Brad
    This is not a nativly supported function with the LB language. There are some potential work arounds. For instance you could use a shared file that one
    Message 1 of 5 , May 1, 2002
      This is not a nativly supported function with the LB language. There are
      some potential work arounds. For instance you could use a shared file that
      one writes to and the other read and update the window. Personally I don't
      like that one too much.

      You could perhaps get the handle of the other window and use an API call to
      force text onto the window. I have seen this in LB.

      Probably the best advice is to reconsider the application structure so that
      you are not in this situation. Maybe if you can give us some idea of what
      you are try to accomplish we can make some suggestions.

      Brad Moore
      Sr. Analyst - ADS Product Tracking MES Applications
      Weyerhaeuser Company
      Voice : (541) 756-9481
      Fax: (541) 756-7612
      brad.moore@...

      > ----------
      > From: hadjara1[SMTP:geo-logic@...]
      > Reply To: libertybasic@yahoogroups.com
      > Sent: Wednesday, May 01, 2002 12:03 PM
      > To: libertybasic@yahoogroups.com
      > Subject: [libertybasic] multiple windows
      >
      > Hello all
      >
      > The situation is :
      >
      > while running prog1.tkn (that opens windows1 for graphics as #w1)
      > I use
      > run "prog2.tkn"
      >
      > now the problem is :
      >
      > how can I write print instructions in prog2.bas so that prog2.tkn is
      > able to print on #w1 (the window opened by prog1.tkn) ???
      >
      > I tried to place this in prog2.bas :
      > print #w1, "place 10 10" : print #w1, "\Print it"
      >
      > but the result is an "Invalid Handle #w1" error ...
      >
      > can anybody help please?
      >
      >
      >
      >
      > To unsubscribe from this group, send an email to:
      > libertybasic-unsubscribe@egroups.com
      >
      >
      >
      > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
      >
      >
    • hadjara1
      Hi Brad thanks for quick answer, in fact I m getting in this situation because I m trying to print a clock on the main window of a game. But: when I put the
      Message 2 of 5 , May 1, 2002
        Hi Brad
        thanks for quick answer,
        in fact I'm getting in this situation because I'm trying to print a
        clock on the main window of a game.

        But: when I put the clock printing part together with the game (inthe
        same tkn), the processing time for printing the clock alters the
        fluidity of the game, so I tried another way to have that clock
        printed on the game window.

        In fact the problem is more easy : I have to click on buttons in this
        game, and sometimes the clicks aren't performed, because,I guess, the
        clock is reactualising.

        I need top fluidity for the click on the buttons so I tried to gain
        some by printing the clock another way.

        Do you know a dll that prints a clock on a window? or another way?
        My clock is based on the demo prog clock.bas I found in the LB2
        distribution



        >This is not a nativly supported function with the LB language.
        >There are
        >some potential work arounds. For instance you could use a shared
        >file that
        >one writes to and the other read and update the window. Personally
        >I don't
        >like that one too much.
        >
        >You could perhaps get the handle of the other window and use an API
        >call to
        >force text onto the window. I have seen this in LB.

        >Probably the best advice is to reconsider the application structure
        >so that
        >you are not in this situation. Maybe if you can give us some idea
        >of what
        >you are try to accomplish we can make some suggestions.

        >Brad Moore
        >Sr. Analyst - ADS Product Tracking MES Applications
        >Weyerhaeuser Company
        >Voice : (541) 756-9481
        >Fax: (541) 756-7612
        >brad.moore@...
      • Moore, Brad
        Are you doing all your processing in a loop? How acurate does the clock have to be? Minutes or seconds? You could use a timer and you might get better
        Message 3 of 5 , May 1, 2002
          Are you doing all your processing in a loop?

          How acurate does the clock have to be? Minutes or seconds?

          You could use a timer and you might get better responce.

          Set your timer to fire every 1 second (or even 5 seconds). Each time it
          fires check to see if you need to update the clock (if you do then pause the
          timer and update the clock the reset the timer).

          When a click event happens pause the timer (set it to a time delay of 0) and
          process the events for the button click. Once you have processed the
          events, check to see if the time needs to be updated (if so - update it) and
          then set your timer back to 5 second ticks (that is Timer 5000).

          See if that helps.

          Brad Moore
          Sr. Analyst - ADS Product Tracking MES Applications
          Weyerhaeuser Company
          Voice : (541) 756-9481
          Fax: (541) 756-7612
          brad.moore@...

          > ----------
          > From: hadjara1[SMTP:geo-logic@...]
          > Reply To: libertybasic@yahoogroups.com
          > Sent: Wednesday, May 01, 2002 2:51 PM
          > To: libertybasic@yahoogroups.com
          > Subject: [libertybasic] Re: multiple windows
          >
          > Hi Brad
          > thanks for quick answer,
          > in fact I'm getting in this situation because I'm trying to print a
          > clock on the main window of a game.
          >
          > But: when I put the clock printing part together with the game (inthe
          > same tkn), the processing time for printing the clock alters the
          > fluidity of the game, so I tried another way to have that clock
          > printed on the game window.
          >
          > In fact the problem is more easy : I have to click on buttons in this
          > game, and sometimes the clicks aren't performed, because,I guess, the
          > clock is reactualising.
          >
          > I need top fluidity for the click on the buttons so I tried to gain
          > some by printing the clock another way.
          >
          > Do you know a dll that prints a clock on a window? or another way?
          > My clock is based on the demo prog clock.bas I found in the LB2
          > distribution
          >
          >
          >
          > >This is not a nativly supported function with the LB language.
          > >There are
          > >some potential work arounds. For instance you could use a shared
          > >file that
          > >one writes to and the other read and update the window. Personally
          > >I don't
          > >like that one too much.
          > >
          > >You could perhaps get the handle of the other window and use an API
          > >call to
          > >force text onto the window. I have seen this in LB.
          >
          > >Probably the best advice is to reconsider the application structure
          > >so that
          > >you are not in this situation. Maybe if you can give us some idea
          > >of what
          > >you are try to accomplish we can make some suggestions.
          >
          > >Brad Moore
          > >Sr. Analyst - ADS Product Tracking MES Applications
          > >Weyerhaeuser Company
          > >Voice : (541) 756-9481
          > >Fax: (541) 756-7612
          > >brad.moore@...
          >
          >
          >
          >
          >
          > To unsubscribe from this group, send an email to:
          > libertybasic-unsubscribe@egroups.com
          >
          >
          >
          > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
          >
          >
        Your message has been successfully submitted and would be delivered to recipients shortly.