Author |
Topic: Screen Output Size (Read 419 times) |
|
kingsmiller
New Member
member is offline


Gender: 
Posts: 13
|
 |
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.
|
|
Logged
|
|
|
|
DDRM
Administrator
member is offline


Gender: 
Posts: 321
|
 |
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
|
|
Logged
|
|
|
|
kingsmiller
New Member
member is offline


Gender: 
Posts: 13
|
 |
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 ..
|
|
Logged
|
|
|
|
KenDown
Full Member
member is offline


Posts: 181
|
 |
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.
|
|
Logged
|
|
|
|
|