Getting the SCREEN mode
#16
(09-30-2022, 08:15 AM)RhoSigma Wrote:
(09-30-2022, 02:30 AM)TerryRitchie Wrote: I working on Lesson 20: Libraries and was thinking about having the user go through the process of making one. My idea was to make custom text inputs, popups, message boxes, etc... However, the library would need to know which SCREEN mode it was in first for dimensions, available colors, current colors, etc.

All that information can be easily acquired with existing keywords _WIDTH(0), _HIGHT(0), _PIXELSIZE(0), _DEFAULTCOLOR(0) and _BACKGROUNDCOLOR(0).

On the other hand it's eg. bad to assume the screen's dimension just from the mode number, since it's possible to create ANY size legacy screens with SCREEN _NEWIMAGE(w, h, mode).

Thanks for all the input everyone. Last night I decided to make the library SCREEN 0 only. If _PIXELSIZE reports anything other than 0 the library will report the mis-match.

I understand the reasoning for others pointing out that legacy screen modes should be avoided but they do exist and can be used. Over the years I've known of at least a few QuickBasic projects that were updated using QB64 because I was asked to help with some of the conversion. One was a program that controlled a small milling machine and it drew the routing outline in screen 12. Creating a library that may potentially be used with legacy screen modes still needs to be considered.

Over the years I've also had people contact me while using the tutorial to ask questions about programs they were typing in from old QuickBasic books. Those old books and programs are still a wealth of knowledge for people learning QB64 even though they use the legacy screen modes.

This gives me an idea for another lesson that deals with converting QuickBasic, PDS, and VBDOS code to use new QB64 commands. Hmm...
Reply


Messages In This Thread
Getting the SCREEN mode - by TerryRitchie - 09-29-2022, 04:04 PM
RE: Getting the SCREEN mode - by Pete - 09-29-2022, 08:25 PM
RE: Getting the SCREEN mode - by TerryRitchie - 09-29-2022, 08:36 PM
RE: Getting the SCREEN mode - by Pete - 09-29-2022, 08:45 PM
RE: Getting the SCREEN mode - by RhoSigma - 09-29-2022, 09:00 PM
RE: Getting the SCREEN mode - by mnrvovrfc - 09-29-2022, 11:06 PM
RE: Getting the SCREEN mode - by Pete - 09-30-2022, 12:04 AM
RE: Getting the SCREEN mode - by TerryRitchie - 09-30-2022, 02:30 AM
RE: Getting the SCREEN mode - by mnrvovrfc - 09-30-2022, 03:15 AM
RE: Getting the SCREEN mode - by TerryRitchie - 09-30-2022, 03:12 PM
RE: Getting the SCREEN mode - by mnrvovrfc - 09-30-2022, 04:21 PM
RE: Getting the SCREEN mode - by TerryRitchie - 09-30-2022, 04:38 PM
RE: Getting the SCREEN mode - by mnrvovrfc - 09-30-2022, 05:46 PM
RE: Getting the SCREEN mode - by RhoSigma - 09-30-2022, 08:15 AM
RE: Getting the SCREEN mode - by TerryRitchie - 09-30-2022, 03:05 PM
RE: Getting the SCREEN mode - by Pete - 09-30-2022, 02:37 AM
RE: Getting the SCREEN mode - by bplus - 09-30-2022, 02:38 AM
RE: Getting the SCREEN mode - by bplus - 09-30-2022, 02:57 AM
RE: Getting the SCREEN mode - by Pete - 09-30-2022, 03:01 AM
RE: Getting the SCREEN mode - by bplus - 09-30-2022, 03:10 AM
RE: Getting the SCREEN mode - by Pete - 09-30-2022, 03:21 PM
RE: Getting the SCREEN mode - by Pete - 09-30-2022, 04:24 PM
RE: Getting the SCREEN mode - by Pete - 09-30-2022, 04:47 PM
RE: Getting the SCREEN mode - by TerryRitchie - 09-30-2022, 04:51 PM
RE: Getting the SCREEN mode - by Pete - 09-30-2022, 05:00 PM
RE: Getting the SCREEN mode - by Pete - 09-30-2022, 05:58 PM
RE: Getting the SCREEN mode - by mnrvovrfc - 09-30-2022, 05:59 PM
RE: Getting the SCREEN mode - by TempodiBasic - 10-03-2022, 11:13 PM
RE: Getting the SCREEN mode - by TempodiBasic - 10-04-2022, 11:22 PM
RE: Getting the SCREEN mode - by SMcNeill - 10-07-2022, 09:56 AM
RE: Getting the SCREEN mode - by TempodiBasic - 10-08-2022, 02:57 AM
RE: Getting the SCREEN mode - by Kernelpanic - 10-07-2022, 03:14 PM
RE: Getting the SCREEN mode - by TempodiBasic - 10-08-2022, 03:01 AM



Users browsing this thread: 12 Guest(s)