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

Re: Check if window is open

Expand Messages
  • michael617522
    I m using Liberty v4.03 I ve put lines of checking code all over the program and, as far as I can tell, it does close the text window. However, when I come to
    Message 1 of 5 , Jul 4, 2006
      I'm using Liberty v4.03

      I've put lines of checking code all over the program and, as far as I
      can tell, it does close the text window. However, when I come to open
      the window for a second time, I get the 'window is already open' error
      message.

      Which leads me to suspect that I don't properly understand text
      windows....








      --- In libertybasic@yahoogroups.com, "pendl2megabit"
      <pendl2megabit@...> wrote:
      >
      > > Firstly, how can I force a window to close (and I have already
      > > liberally scattered "close #room.dets" commands throughout my code
      >
      > Which LB version do you use? L4.03 has some fixes for leftover LB
      processes
      > and windows.
      > I would use a flag variable that is set to 1 when the window is
      opened and
      > reset to 0 when it is closed.
      > I would then close the window based n the flag in the following
      locations:
      > 1) closing routine for the window itself
      > this should be executed when you do a File=>Exit or use the X
      >
      > 2) closing routine for the main window
      >
      > 3) errorhandler
      >
      > Did you already run your program in debug mode to verify that File=>Exit
      > executes the closing routine?
      >
      > > Secondly, is there a way that I check whether a window is open
      >
      > This can be done with the EnumWindows API function, a sample can be
      found in
      > the description of the CALLBACK command in the helpfile.
      >
      > ---
      > Stefan Pendl
      >
      >
      >
      > ___________________________________________________________
      > Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de
      >
    • Stefan Pendl
      ... I m using Liberty v4.03 I ve put lines of checking code all over the program and, as far as I can tell, it does close the text window. However, when I come
      Message 2 of 5 , Jul 4, 2006
        >>
        I'm using Liberty v4.03

        I've put lines of checking code all over the program and, as far as I
        can tell, it does close the text window. However, when I come to open
        the window for a second time, I get the 'window is already open' error
        message.

        Which leads me to suspect that I don't properly understand text
        windows....

        <<

        How about hiding the window instead of closing it, since it will be reused afterwards?
        If need is you can show it and hide it again.

        You then need to close it only at the end of the program.

        ---
        Stefan Pendl






        [Non-text portions of this message have been removed]
      • mike wakefield
        Thank you, that s an excellent suggestion. Mike Wakefield ... From: Stefan Pendl To: libertybasic@yahoogroups.com Sent: Tuesday, July 04, 2006 4:04 PM Subject:
        Message 3 of 5 , Jul 4, 2006
          Thank you, that's an excellent suggestion.

          Mike Wakefield
          ----- Original Message -----
          From: Stefan Pendl
          To: libertybasic@yahoogroups.com
          Sent: Tuesday, July 04, 2006 4:04 PM
          Subject: AW: [libertybasic] Check if window is open


          >>
          I'm using Liberty v4.03

          I've put lines of checking code all over the program and, as far as I
          can tell, it does close the text window. However, when I come to open
          the window for a second time, I get the 'window is already open' error
          message.

          Which leads me to suspect that I don't properly understand text
          windows....

          <<

          How about hiding the window instead of closing it, since it will be reused afterwards?
          If need is you can show it and hide it again.

          You then need to close it only at the end of the program.

          ---
          Stefan Pendl

          [Non-text portions of this message have been removed]






          ------------------------------------------------------------------------------


          No virus found in this incoming message.
          Checked by AVG Free Edition.
          Version: 7.1.394 / Virus Database: 268.9.8/381 - Release Date: 03/07/2006

          ----------

          No virus found in this outgoing message.
          Checked by AVG Free Edition.
          Version: 7.1.394 / Virus Database: 268.9.8/381 - Release Date: 03/07/2006


          [Non-text portions of this message have been removed]
        Your message has been successfully submitted and would be delivered to recipients shortly.