|
Post by Rod on Apr 15, 2023 15:07:02 GMT
Thank you all for the valuable feedback. I am sorry the .ffu has caused so much bother. I think I have it right now. However .bmp resources will need to be in the projects directory since I just remove the path. I have added the texteditor in, fixed menuset and added the trapclose. I also tweaked how statictext was positioned for the .bas.
I have had a couple of failed attempts to reduce the flicker. It was redraw, redrawing all the dots that took time.(redraw simply repeats all drawing actions in the segment, it does not just blip in a bmp.) I tried bmp block drawing 100,100 but that did not help. One big bmp redraw might help but probably not enough and it limits us to the screen dimension. I am going to see if "over" style drawing just a single control instead of drawing the background and every control every time might help. That way I just draw the background and all controls once, before moving and redrawing a single control. Has more promise. I will wait till I have the drawing fixed before I post another version.
I do like the jump to .bas and the automatic closure, that's working now thanks to xxgeek. However I am less sure about windowtypes, The only window type you really need for a form is window or window_nf. If you need a dialog window it is a simple change. Perhaps window type choice is for a similar application to freeform that sketches out program by style, game,chat,chart,paged text,list print, photoview.....
oh, color, oh joy!
|
|
|
Post by Rod on Apr 15, 2023 18:35:05 GMT
Re the point about favourite subs and functions, while I like the idea, and a must have for me is delays encapsulated in a sub it is probably for the “free program” app.
So click on a program type and get a .bas outline gui with appropriate gui controls and subs. But we really are in write my program territory which Freeform ultra may assist if it can load and adjust .bas
|
|
|
Post by xxgeek on Apr 15, 2023 19:49:33 GMT
No worries Rod. I've been editing too. Still undecided on options.
Changed the functions combobox to user functions
Added support for multiple JB functions via checkboxes. I'll use FolderDialog to choose a folder with properly prepared "User Functions/Subs" of my own to populate the user function combobox, and work out adding multiple functions somehow. Also I put .ffu filename back at the top (there is room now)
For my own version I see no need for having a visible grid either. Removing it should reduce flicker even more.
You don't need to implement the extra things I want Rod. I can use your code as the core and edit in a few things I would like to have.
There can be a "Lite", and a "Not so Lite" version.
|
|
|
Post by Rod on Apr 16, 2023 14:29:29 GMT
Ok, with some trepidation, this version has xor drawing. It also handles the bmp loading better. I have not tested large forms yet only playing with 800x600.
One other issue that has surfaced is that the autorun of the .bas file will not work unless you start Just BASIC normally and then navigate to the fful.bas. If you have associations set and double click on the .bas StartupDir$ will not have the info needed to get to the jbasic.exe.
I need to find a better way to know what version is in play and get to the correct.exe. Also, it is a limitation that all resources must be in the project directory. But for beginners this simplifies things a lot.
see first or last post for link
|
|
|
Post by xxgeek on Apr 16, 2023 18:10:58 GMT
Excellent Rod!! Flicker problem is no more.
Issue - could cause problems for Liberty(non Pro users) case instr(StartupDir$,"BASIC v",1)>1 'could be mistaken for JB change to case instr(StartupDir$,"Liberty BASIC v",1)>1
I noticed the issue with StartupDir$ you mentioned when I made an EXE. Fixed it by adding: Hardcoded jbPath$ = "c:\Program Files (86)\Just Basic v2.0) case instr(DefaultDir$,"Temp\IXP",1)>1 run chr$(34);jbPath$;chr$(34);" -R -A ";DefaultDir$;"\";filename$ Works if JB is installed to default install Dir.
Since playing around with adding functions and subs I found that I would NOT like the functions/subs added to the temp.bas re-written when loading the temp.bas, or a "saved as" .bas. I just want the code (once) but keep the form intact.(working well) I'll be adding a hidden texeditor to copy the temp.bas to as it is created, and then copied to clipboard with a "!selectall", "!copy" so I can paste it wherever I want it.
Adding multiple functions\subs using checkboxes will be easy, however adding them using a combobox or listbox will be a challenge. If users can choose a Dir with their own functions, all of the functions will have to be formatted in the same way the jb functions are.
This new code works very well Rod, but if I come across anything out of wack as I play around with it, I'll let you know.
edit - btw - At 1900x100 all seems well.
|
|
|
Post by Rod on Apr 16, 2023 18:45:55 GMT
The StartupDir$ tests are in a specific order so that the correct version is reacted to. I can’t code hard paths because I don’t know which IDE is being used. StartupDir$ was my first solution but I will need to look at something else. Perhaps file exists.
At least we don’t have .ffu issues!
|
|
|
Post by Rod on Apr 16, 2023 18:47:18 GMT
The StartupDir$ tests are in a specific order so that the correct version is reacted to. I can’t code hard paths because I don’t know which IDE is being used. StartupDir$ was my first solution but I will need to look at something else. Perhaps file exists.
At least we don’t have .ffu issues!
|
|
|
Post by tsh73 on Apr 16, 2023 18:49:11 GMT
Yes flicker problem is fixed, even on slow computer. Great job.
|
|
|
Post by tsh73 on Apr 16, 2023 19:01:10 GMT
Re paths I suggest making INI file so one could put path-to-basic there (and then forget about that issue)
Like, on Win 10 32 bit I have JB at "C:\Program Files\Just BASIC v2.0\jbasic.exe"
but StartUpDir for me returns C:\WRK\JB\_others\Freeform Ultra Lite v1.0 by Rod
(and I also have JB 1 and that another BASIC, and resuling test.bas happily runs in all versions)
|
|
|
Post by Rod on Apr 16, 2023 19:48:29 GMT
Now that we have it actually running the bug reports and feedback can be as picky as you like. Just keep in mind the lean, mean and form focus.
|
|
|
Post by cundo on Apr 16, 2023 21:57:23 GMT
Can we Hide Windows? because that is not working for me, I can't remember
|
|
|
Post by cundo on Apr 16, 2023 22:01:36 GMT
People found the problem ha ha ha, I was running 1920x1080 but scaled to 175% because I can't see a thing. Attachments:
|
|
|
Post by xxgeek on Apr 17, 2023 0:26:15 GMT
Found a couple of things to fix. 1. test.ffu and lastsession.ffu reports to combobox 800x500 not 800x600 as expected. Written to test.ffu, and lastsession.ffu as 500 (no big deal, they are just test files and can be deleted) I may have seen another issue with this 500 popping back into the combobox for height. Keeping an eye on it, I could be wrong. 2. "ffu loaded is:" statictext reporting wrong file at startup (should be lastsession.ffu) - it is reporting test.ffu (test.ffu was in fact the last file before closing) so it must be reporting projectname$ of file used just before closing. 3. When resizing the #1 window, all the comboboxes have their text highlighted for some reason. 4. When right clicking a listbox, I see this in the RESO textbox> lb5$( No other controls have anything in that textbox, seemed strange so... Is it meant for future use "Resolution"? 5. The controls can't be placed off screen any longer. You bast..... I figured out how to get that back Still playing, will report anything else I notice.
|
|
|
Post by Rod on Apr 17, 2023 6:48:31 GMT
When the session is restored it keeps everything including the project name. That is what you see in the loaded message. You can change the project name in the properties window or when you save as . Only when you save as will you have a unique .ffu for the project. The lastsession.ffu is simply a backup/ fast start convenience. Bit lik just basics .bak file.
Will need to check the size issue.
The Reso property is a place to name any resource used by the control. Thst will be the array$( or the .bmp file name.
Rather than place objects off screen the official method is to show and hide, enable disable. When we get to color two differently coloured controls layered on top of each other might be possible. So linked to show and hide we get color change controls. The issue for me is how to present off screen controls so that they can be managed?
I think on resize I need to go round and set all the combobox controls to their default.
Thanks for spending time.
Cundo, I what would need changed to make it work on your original 175% setting?
|
|
|
Post by Rod on Apr 17, 2023 16:07:11 GMT
Fixed the size issue on load, fixed the combo box highlight by selecting the defaults on resize. Also introduced the concept of an insert point. Now when you click on empty space an insert symbol is shown. Any control added after that will be inserted at that point. It means you can scroll down to the bottom of a large form , click and insert. Much preferable to trying to drag a control all the way down.
Struggling to get xor fine tuned, need to go back to the classroom!
|
|