![]() |
Screen Resizing - Printable Version +- QB64 Phoenix Edition (https://qb64phoenix.com/forum) +-- Forum: QB64 Rising (https://qb64phoenix.com/forum/forumdisplay.php?fid=1) +--- Forum: Code and Stuff (https://qb64phoenix.com/forum/forumdisplay.php?fid=3) +---- Forum: Help Me! (https://qb64phoenix.com/forum/forumdisplay.php?fid=10) +---- Thread: Screen Resizing (/showthread.php?tid=2883) Pages:
1
2
|
Screen Resizing - ahenry3068 - 07-25-2024 I have a very specific thing I'm trying to accomplish. I am creating an Cross Platform Audio Book manager for SD-Cards with the primary platform being David Murray's "Commander X16" platform. This is a "New"/"Retro" 8-bit computer recently in production. I am well on the way on the Commander X16 side of things and I wouldn't come here for help with that. I also want a version of the Audio Book Manager to run on Windows & Linux. I want the look and feel between the two platforms to be as close as possible. Due to hardware limitations my Text Screens on the X16 are going to be 40 cols x 30 rows. I need to replicate that under QB64PE. The closest I have got is SCREEN 0, then WIDTH 40, 43 and VIEW PRINT 1 TO 30. This is getting me very close but with 13 blank lines at the bottom of the Window. If I Enable $RESIZE:ON I can manually resize the Window and cut off these lines from view. WHAT I WANT TO DO: Have the Window automatically resize itself with no further resizing allowed by the User. This will give me exactly the screen I need for the correct look and feel. I've been combing the DOCS and example code and I really can't figure out how to do this. It should work under both Windows & Linux. RE: Screen Resizing - Petr - 07-25-2024 Hi. Screen 0; 40cols x 30 rows: SCREEN _NEWIMAGE(40, 30, 0) RE: Screen Resizing - ahenry3068 - 07-25-2024 (07-25-2024, 07:10 PM)Petr Wrote: Hi. Screen 0; 40cols x 30 rows: I tried that. It works kind of. But it gives me a Window with a very ODD aspect ratio. The VIEW PRINT above gives me a better looking Window. RE: Screen Resizing - NakedApe - 07-25-2024 Is the VIEW PRINT important to your program? This seems to do the job, but maybe I'm missing something. Not sure why you set the rows to 43 when you want 30... EDIT: The output looks the same with / without the VIEW PRINT on my screen. Code: (Select All)
RE: Screen Resizing - Petr - 07-25-2024 Ok, what aspect ratio does the font used in your other programs? QB64 uses a height of 16 pixels and a width of 8 pixels for text mode, but this can be changed by assigning a different font. As a result, the text screen will also look different. RE: Screen Resizing - ahenry3068 - 07-25-2024 (07-25-2024, 07:22 PM)NakedApe Wrote: Is the VIEW PRINT important to your program?The VIEW PRINT is just so the Screen behaves like the X16 screen I'm porting from. Just figured out that WIDTH 40, 30 actually works but the FONT Aspect at least on Linux looks better when I do the Width 40, 43. I'll be doing the port to Linux first then tweaking it to work on Windows. Might turn out that 40, 30 will work fine on Windows. That would be an easy tweak. Seems nobody quite knows how to make a window resize by itself ???? We can make the Window move by itself. Why can we not make it resize itself ??? RE: Screen Resizing - Pete - 07-26-2024 https://qb64phoenix.com/qb64wiki/index.php/RESIZE_(function) RE: Screen Resizing - ahenry3068 - 07-26-2024 (07-26-2024, 12:02 AM)Pete Wrote: https://qb64phoenix.com/qb64wiki/index.php/RESIZE_(function) That reports if the Window HAS BEEN resized.... It doesn't allow you to resize it.... I know how to do Images with _PutImage and SCREEN. Thats not what I want to do. I want to have a SCREEN 0 window where I'm resizing the Window borders to cut off the bottom of it. (Its going to be 40 x 43 text, I want to "simulate" 40 x 30). I can manually resize the window to do this from the User Interface. I want the program to do it without user intervention on program startup...... RE: Screen Resizing - Pete - 07-26-2024 There are various related _RESIZE examples in the wiki... https://qb64phoenix.com/qb64wiki/index.php/$RESIZE https://qb64phoenix.com/qb64wiki/index.php/RESIZE Also, the search in the forums for RESIZE: https://qb64phoenix.com/forum/showthread.php?tid=2801&highlight=RESIZE I've made a few resizable apps, but I'm not a big fan of that keyword and as of right now, I can't even remember the names or functions of those apps. Edit: Huh, I actually found one: https://qb64phoenix.com/forum/showthread.php?tid=1240&highlight=word+wrap+resize Pete RE: Screen Resizing - ahenry3068 - 07-26-2024 (07-26-2024, 12:47 AM)Pete Wrote: There are various related _RESIZE examples in the wiki... |