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

tying ENTER with a button / LB 3.03 release

Expand Messages
  • dbwisc@yahoo
    It seems to me that there was some talk about tying the enter key to a button. Is that only if the button is given focus or can I have an ENTER button that
    Message 1 of 11 , Aug 4, 2003
    • 0 Attachment
      It seems to me that there was some talk about tying the enter key to a
      button. Is that only if the button is given focus or can I have an ENTER
      button that will be "pressed" when the enter key is?

      Also, I am still working with 3.03 beta 2 is there a more recent release
      of 3.03 and how do I get it? I thought people were having problems with
      the final version.

      Q: can anyone really get along without LBW? I can't!

      --- DB <yahoo@...>


      On Sun, 3 Aug 2003 07:54:55 -0700
      "Justin" <gsi@...> wrote:

      >Gordon, I had that happen as well, when
      >I was flushing inside a loop by error (ignorance?).
      >Have you read this in the helpfile?
      >
      >(I am pretty sure this was written by Alyce...)
      >
      >+++++++++++++++++++++++++
      >WARNING ! ! ! ! ! ! !
      >
      >Read this warning, which is copied from the Liberty BASIC Helpfile/graphics
      >commands:
      >
      >Important: When drawing to a graphics window or graphic box, the operations
      >that are performed are remembered by Liberty BASIC so that lightning fast
      >redraws can be performed. This remembering consumes memory. If you write
      >an application which continually draws graphics, you will eventually run out
      >of memory (this can potentially crash your computer). To prevent this, your
      >application should only remember those drawing operations which are needed
      >to display the current state of your application. Pay special attention to
      >the cls, delsegment, discard and flush commands.
      >
      >This translates to: DON'T FLUSH EVERY FRAME OF A SPRITE ANIMATION!
      >
      >The graphicbox can be updated easily when needed with the DRAWSPRITES
      >command. You may safely flush the sprite graphics if they are drawn on the
      >screen only one time. If the sprites are part of an animated display, each
      >frame of animation may be flushed, but it is important to remove old
      >segments from memory. It will rarely be necessary to flush animated
      >graphics, because the display can be refreshed easily, and the operations to
      >flush and delete segments will slow down the animation.
      >
      >It might be necessary to control the speed of sprite animation. For
      >information, read Pauses and Timing.
      >++++++++++++++++++++
      >
      >HTH,
      >Justin.
      >
      >
      >----- Original Message -----
      >From: "Gordon Sweet" <gordon@...>
      >To: <libertybasic@yahoogroups.com>
      >Sent: Sunday, August 03, 2003 6:22 AM
      >Subject: [libertybasic] JPEG.DLL
      >
      >
      >> REF TO
      >> Message: 7
      >> Date: Sat, 02 Aug 2003 06:34:29 -0500
      >> From: Alyce Watson <alycewatson@...>
      >> Subject: Re: JPEG.DLL
      >>
      >> Thanks again Alyce. I will have a look at the information on your site.
      >The crude method I have been using so far to fill the whole screen, whatever
      >the size is below, but no matter if I use JPEG.DLL or NViewLib.dll my system
      >crashes out of memory, as I try to display a list of up to 100 images
      >consecutively , even though I now have 512 Mb RAM installed !!
      >Gordon
      >>
      >> 'call DLL to load image
      >> hPic=LoadImageFile(hW,jname$)
      >> if hPic=0 then
      >> notice "Image failed."
      >> end if
      >>
      >> 'clear old graphics
      >> #v "cls;fill lightgray"
      >>
      >> 'unload previous bmp, if there is one
      >> if hDemo<>0 then unloadbmp "demo"
      >>
      >> ' 'load image with LOADBMP
      >> ' loadbmp "demo",hPic
      >> ' hDemo=hbmp("demo")
      >>
      >> ' 'display with DRAWBMP
      >> ' #1 "drawbmp demo 0 0 ;flush"
      >>
      >> loadbmp "landscape", hPic
      >> #1 "background landscape";
      >> #1 "drawsprites";
      >>
      >>
      >>
      >> [Non-text portions of this message have been removed]
      >>
      >>
      >>
      >> 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/
      >>
      >
      >
      >
      >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/
      >
    • Gordon Sweet
      REF TO Message: 2 Date: Sun, 3 Aug 2003 07:54:55 -0700 From: Justin Subject: Re: JPEG.DLL Thanks Justin, I will try again, and let all Know
      Message 2 of 11 , Aug 4, 2003
      • 0 Attachment
        REF TO
        Message: 2
        Date: Sun, 3 Aug 2003 07:54:55 -0700
        From: "Justin" <gsi@...>
        Subject: Re: JPEG.DLL

        Thanks Justin,

        I will try again, and let all Know if I succeed. Trouble is the system does not complain until several minutes have elapsed. Gordon

        [Non-text portions of this message have been removed]
      • Justin
        yep, that is what mine did as well. took a while to fill up 512mb, but it will do it! :o) I only found the problem days after I made the routine, when I
        Message 3 of 11 , Aug 4, 2003
        • 0 Attachment
          yep, that is what mine did as well.
          took a while to fill up 512mb, but it will
          do it! :o)

          I only found the problem days after I made the
          routine, when I finally had an out of memory error.
          That was when I caught a few redundant "flush" commands
          and one within a loop.

          Oops! :o)

          HTH,

          Justin.


          ----- Original Message -----
          From: "Gordon Sweet" <gordon@...>
          To: <libertybasic@yahoogroups.com>
          Sent: Monday, August 04, 2003 10:31 AM
          Subject: [libertybasic] JPEG.DLL


          > REF TO
          > Message: 2
          > Date: Sun, 3 Aug 2003 07:54:55 -0700
          > From: "Justin" <gsi@...>
          > Subject: Re: JPEG.DLL
          >
          > Thanks Justin,
          >
          > I will try again, and let all Know if I succeed. Trouble is the system
          does not complain until several minutes have elapsed. Gordon
          >
        • J. Brossman
          Below is the code that appeared either here or in a newsletter for a hidden enter key button. It must be labeled .default. In this code it shifts the focus
          Message 4 of 11 , Aug 4, 2003
          • 0 Attachment
            Below is the code that appeared either here or in a newsletter for a
            hidden enter key button. It must be labeled .default. In this code it
            shifts the focus to the next line. I use it in a program to emulate a
            bitmap button. On different windows, that bitmap button may perform
            different tasks but the hidden enter always uses the same branch as the
            bitmap button and therefore also completes the task.

            jim

            '---- Code
            'Form created with the help of Freeform 3 v03-25-02
            'Generated on May 21, 2003 at 11:32:39
            [setup.1.Window]

            '-----Begin code for #1

            nomainwin
            WindowWidth = 285
            WindowHeight = 300
            UpperLeftX=int((DisplayWidth-WindowWidth)/2)
            UpperLeftY=int((DisplayHeight-WindowHeight)/2)


            '-----Begin GUI objects code

            button #1.default,"&Enter",[nextClick],UL,-400,-400, 36, 25
            button #1.b1,"&Next",[nextClick], UL, 91, 100, 80, 25
            button #1.b2,"&Back",[button3Click], UL, 8, 100, 80, 25
            button #1.b3,"&Cancel",[quit.1], UL, 175, 100, 75, 25
            textbox #1.tex1, 8, 21, 242, 26
            textbox #1.tex2, 8, 51, 242, 26
            textbox #1.tex3, 8,81,242,26


            open "untitled" for dialog_modal as #1
            print #1, "font ms_sans_serif 8"
            print #1, "trapclose [quit.1]"
            print #1.tex1,"!setfocus"
            h1=hwnd(#1.tex1)
            h2=hwnd(#1.tex2)
            h3=hwnd(#1.tex3)

            [1.inputLoop]
            calldll #user32, "GetFocus",testFocus as long
            wait

            [nextClick]

            select case testFocus
            case h1
            print #1.tex2,"!setfocus"
            case h2
            print #1.tex3,"!setfocus"
            case h3
            print #1.tex3, "!setfocus"

            end select
            goto [1.inputLoop]

            [button3Click]
            wait

            [quit.1] 'End the program
            close #1
            end

            '---- End Code


            dbwisc@yahoo wrote:

            >It seems to me that there was some talk about tying the enter key to a
            >button. Is that only if the button is given focus or can I have an ENTER
            >button that will be "pressed" when the enter key is?
            >
            >Also, I am still working with 3.03 beta 2 is there a more recent release
            >of 3.03 and how do I get it? I thought people were having problems with
            >the final version.
            >

            Go to Carl's web site where you can download 3.03 in it's final version.

            --
            Jim & Jan Brossman - Sno-Dragon Siberians - Durango, Colorado
            Show Secretary Web Site - http://users.sisna.com/jbross/showsec.html
            Brossman Family Tree Web Site - http://users.sisna.com/jbross
          • carlgundel
            ... to a ... ENTER ... You can set a button to respond to the Enter key if you use a dialog window. Here is a little snip from the help file. Default Button
            Message 5 of 11 , Aug 4, 2003
            • 0 Attachment
              --- In libertybasic@yahoogroups.com, "dbwisc@y..." <yahoo@n...>
              wrote:
              > It seems to me that there was some talk about tying the enter key
              to a
              > button. Is that only if the button is given focus or can I have an
              ENTER
              > button that will be "pressed" when the enter key is?

              You can set a button to respond to the Enter key if you use a dialog
              window. Here is a little snip from the help file.

              Default Button
              In a dialog window, you may give a button the extension "default".
              If the user presses the ENTER key while in the dialog window, it
              will be the same as if the button whose extension is "default" is
              pressed and program execution will continue at the event handler
              [branchLabel] for that button. In the example below, the program
              will branch to the [okay] routine when the user presses ENTER.

              button #win.default, "Okay",[okay],UL,200,100
              open "Test" for dialog as #win

              > Also, I am still working with 3.03 beta 2 is there a more recent
              release
              > of 3.03 and how do I get it? I thought people were having problems
              with
              > the final version.

              I can't think of any good reason for you to not get the latest and
              greatest from our download page here
              http://www.libertybasic.com/download.html

              Does anyone know offhand if there are any especially bad bugs that
              are in the release version that aren't in beta 2?

              > Q: can anyone really get along without LBW? I can't!

              LBW should work just fine with the released version of v3.03 as far
              as I know.

              -Carl
            Your message has been successfully submitted and would be delivered to recipients shortly.