tying ENTER with a button / LB 3.03 release
- 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
>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.
>----- Original Message -----
>From: "Gordon Sweet" <gordon@...>
>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 !!
>> 'call DLL to load image
>> 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:
>> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>To unsubscribe from this group, send an email to:
>Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
- REF TO
Date: Sun, 3 Aug 2003 07:54:55 -0700
From: "Justin" <gsi@...>
Subject: Re: JPEG.DLL
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]
- 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.
----- Original Message -----
From: "Gordon Sweet" <gordon@...>
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
- 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.
'Form created with the help of Freeform 3 v03-25-02
'Generated on May 21, 2003 at 11:32:39
'-----Begin code for #1
WindowWidth = 285
WindowHeight = 300
'-----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]"
calldll #user32, "GetFocus",testFocus as long
select case testFocus
print #1.tex3, "!setfocus"
[quit.1] 'End the program
'---- End Code
>It seems to me that there was some talk about tying the enter key to aGo to Carl's web site where you can download 3.03 in it's final version.
>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.
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
- --- In email@example.com, "dbwisc@y..." <yahoo@n...>
> It seems to me that there was some talk about tying the enter keyto a
> button. Is that only if the button is given focus or can I have anENTER
> 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.
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 recentrelease
> of 3.03 and how do I get it? I thought people were having problemswith
> 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
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.