BBC BASIC for Windows
« Screen Output Size »

Welcome Guest. Please Login or Register.
Apr 5th, 2018, 9:53pm



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

If you require a dump of the post on your message board, please come to the support board and request it.


Thank you Conforums members.

BBC BASIC for Windows Resources
Online BBC BASIC for Windows documentation
BBC BASIC for Windows Beginners' Tutorial
BBC BASIC Home Page
BBC BASIC on Rosetta Code
BBC BASIC discussion group
BBC BASIC for Windows Programmers' Reference

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: Screen Output Size  (Read 419 times)
kingsmiller
New Member
Image


member is offline

Avatar




PM

Gender: Male
Posts: 13
xx Screen Output Size
« Thread started on: Oct 7th, 2016, 07:16am »

I have not used BB4W for many years and only just recently revisited some of the software I wrote back in 2004.

Since that date I have bought a widescreen monitor and when I run my old software find that the output only fills the screen size area of the old monitor. The effect is the output screen only fills an area middle top.

Because I am so much out of touch with BB4W, I have forgot if it’s possible to enlarge the output to my wider screen and much more importantly, how to code it so that the software can respond to any users screen size.

Secondly I have a problem the Dialogue Boxes, in as much they are not “fixed”. A user can very easily move the box outside the of screen area with the mouse.
User IP Logged

DDRM
Administrator
ImageImageImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 321
xx Re: Screen Output Size
« Reply #1 on: Oct 7th, 2016, 1:02pm »

Hi Kingsmiller,

This is beyond the range of things I normally do, so treat my comments with a pinch of salt! This is based on what it says in the help file, and I'll just point you at the relevant bits.

You can define custom modes using VDU 23,22. Note that the background bitmap is 1920 x 1440, and you shouldn't make your display window bigger than that. If you need to, you can refer to the section called "Using windows larger than 1920 x 1440 pixels". Even then, you mustn't make the text viewport larger than that.

You can find the size of the display with
SYS "GetSystemMetrics", 0 TO xscreen%
SYS "GetSystemMetrics", 1 TO yscreen%
However, that doesn't really let you make your window fit the screen, since if you choose a mode the same size as the display then things like the title bar etc won't be visible.

There is a section called "Using the entire screen" which does what it says on the tin - essentially, everything will be hidden behind your window, which will look like an old-fashioned Beeb screen, I think. Arguably not friendly in a Windows environment. There's a section in the wiki:
http://bb4w.wikispaces.com/Switching+back+from+full-screen
which tells you how to get back!

Alternatively, and perhaps better, you could look at the section called "Minimising or maximising the window". I think you still need to be careful not to exceed 1920 x 1440, though.

Positioning dialogue boxes: surely that's normal behaviour for Windows? If you want to constrain it within your main window, you might be able to do that by defining it as a child window, but I'm not sure how to achieve that. It might be setting
dlg%!16=dlg%!16 OR &40000000
...but I don't promise, and I don't have time to try it out at the moment.

Hope that's helpful (and preferably correct!).

D

User IP Logged

kingsmiller
New Member
Image


member is offline

Avatar




PM

Gender: Male
Posts: 13
xx Re: Screen Output Size
« Reply #2 on: Oct 7th, 2016, 6:00pm »

I want to thank you for your help, it is very much appreciated.

My problem is basically I have been away from BB4W for too long. I have forgotten too much over the years.

I will look into your suggestions and hope I can progress I bit further.

Regards ..
User IP Logged

KenDown
Full Member
ImageImageImage


member is offline

Avatar




PM


Posts: 181
xx Re: Screen Output Size
« Reply #3 on: Nov 27th, 2016, 5:23pm »

If I may just add two things learned by hard experience:

1. When you alter the size of the window you must always issue a VDU26 command to set BASIC's internal parameters to the new window size, otherwise graphics commands are going to produce some inexplicable results! You may also need to specify ORIGIN 0,0

2. In fact, it is a good idea to use VDU23 to set a user-defined mode the same size as your screen, as sometimes VDU26 is not enough.
User IP Logged

Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls