I cant maximise the window in screen 13 but can in screen 12

New to FreeBASIC? Post your questions here.
TESLACOIL
Posts: 1769
Joined: Jun 20, 2010 16:04
Location: UK
Contact:

I cant maximise the window in screen 13 but can in screen 12

Postby TESLACOIL » Jul 11, 2010 21:53

I cant maximise the window in screen 13 but I can in screen 12 ?

Code: Select all


'$lang:"qb"


screen 13
cls

dim i as integer


?"hello"

sleep
? "kjhkjh"

for i=1 to 15 :  ? "kjhkjh" :  color i :?, i ::  next






sleep
end
 



in changing the 13 to a 12 i can maximise the window by clicking the [] icon with the mouse (no window bars visible at all after that ) so that's all ok

in screen 13 the tiny window just relocates to the top left of my desktop and doesn't change size (this not changing of sizes happens in some other modes too)

windows xp sp 2
FBIde 0.4.6
Last edited by TESLACOIL on Jul 11, 2010 22:01, edited 1 time in total.
D.J.Peters
Posts: 8189
Joined: May 28, 2005 3:28
Contact:

Postby D.J.Peters » Jul 11, 2010 22:00

Not all modern gfx card supports 320x200 but 640x480 pixels in fullscreen mode.
Same here with a NVIDIA GT240 but no problem with a older NVIDIA Ti4300.

Joshy
Last edited by D.J.Peters on Jul 12, 2010 0:56, edited 1 time in total.
TESLACOIL
Posts: 1769
Joined: Jun 20, 2010 16:04
Location: UK
Contact:

I have a Ge Force 7300 GT

Postby TESLACOIL » Jul 11, 2010 22:11

I have a Ge Force 7300 GT

& i seem to have this problem too

the lowest desktop resolution is 640 x 480 in Nvidia control panel
rolliebollocks
Posts: 2655
Joined: Aug 28, 2008 10:54
Location: new york

Postby rolliebollocks » Jul 11, 2010 22:58

@Teslacoil

You can use screeninfo command to read the desktop's resolution, and then set the screen via the information retrieved a la

Code: Select all

dim as integer screenw, screenh
screeninfo screenw, screenh
screenres screenw, screenh,32
badmrbox
Posts: 659
Joined: Oct 27, 2005 14:40
Location: Sweden
Contact:

Postby badmrbox » Jul 11, 2010 23:35

You need to use a scale2x function. There should be several available at the forum. I'm using one that Mysoft has written.
http://games.freebasic.net/forum/index.php?topic=35.0
Theunis Jansen
Posts: 248
Joined: Jul 01, 2010 9:35

Cant maximize screen 13

Postby Theunis Jansen » Jul 14, 2010 15:38

Try running it direct in fullscreen mode:
Add this to the beginning of your program

#include "fbgfx.bi"
'$lang:"qb"
(or under FbEdit you could go to Settings and make it -s GUI -lang fblite
Screen 13, 32, 1, (GFX_FULLSCREEN)

This should give u Screen 13 , 32 bit colour, 1 page , and a fullscreen.

My screencard is a Nvidia Gforce 5500 and your snippet to check colours 1 to 15 works fine on it and I can click the fullscreen icon or press Alt+Enter to give a fullscreen. The previous comment about screen cards is/must be correct.
If you solved the problem pse let us know or we'll chew our nails off wondering where we went wrong. LOL
D.J.Peters
Posts: 8189
Joined: May 28, 2005 3:28
Contact:

Postby D.J.Peters » Jul 14, 2010 21:14

Hello Theunis Jansen
this will work on your older NVIDIA GFORCE 5500
but not on newer NVIDIA chips.

Joshy
Theunis Jansen
Posts: 248
Joined: Jul 01, 2010 9:35

Maximize screen 13

Postby Theunis Jansen » Jul 15, 2010 11:53

Greetings Joshy.
Thanks for the info.
I tried running my screen 7 and screen 13 progs - both 320x200 - on my daughters PC with a nVidia 8600 GT. That is my old QB 4.5 EXE progs and also FB compiled. WINDOWS just boms out with the usual cant run and offers to report to MS. I use background and foreground colours. 640x480 screens mess me around with illegal function calls when I try to use say :- color 15,6 or strait color 15 etc. My maths progs for grade 0 to 8 is about 200 progs. So it would be a monstrous task to change them all.
I thinks I'm am going to crawl back into my cocoon and sleep for another ten years.
Last edited by Theunis Jansen on Jul 17, 2010 9:10, edited 2 times in total.
Theunis Jansen
Posts: 248
Joined: Jul 01, 2010 9:35

Maximize Screen 13

Postby Theunis Jansen » Jul 15, 2010 12:50

Joshy, its me again

I read but missed your ref to gfx. This appears to be a GFX feature to come.
I recompiled under QB64 and my program ran on my daughter's PC. It automatically changed to widescreen as well. But QB64 gives me a monstrous file with too many dependencies to my liking- prog 818 Kb plus dependencies totals 6,2 Meg. I love stand-alone progs and simple hate *.so and *.dll.
Do you or anyone else know if there is another ie apart from BadmrBox's scaling prog, work-around for SCREEN 7 and SCREEN 13 in FB for the newer cards ?
Last edited by Theunis Jansen on Jul 17, 2010 9:06, edited 1 time in total.
D.J.Peters
Posts: 8189
Joined: May 28, 2005 3:28
Contact:

Postby D.J.Peters » Jul 15, 2010 22:31

if it must be the screen 13 mode

render all gfx primitivs to a fb image 320x200x8

pset TheImage,(x,y),color
line
draw text
...

and finaly scale and put the image on an fb screen of 640x400 or 640x480

search for "image scaling" or "sprite scaling" i'm and others posted som cool and fast stuff.

Joshy
D.J.Peters
Posts: 8189
Joined: May 28, 2005 3:28
Contact:

Postby D.J.Peters » Jul 18, 2010 4:57

Theunis Jansen
Posts: 248
Joined: Jul 01, 2010 9:35

Cant maximize screen 13

Postby Theunis Jansen » Jul 18, 2010 10:45

Joshy

You are my Hero. Thanks
Theunis Jansen
Posts: 248
Joined: Jul 01, 2010 9:35

screen 12 and 13

Postby Theunis Jansen » Jul 29, 2010 14:19

I tried the scaling suggestions but could not figure out how to use the LOCATE statements on them.
QB4.5 and QB64 ran my progs on a Nvidia Gforce 8600 GT card (the specs indicate it is OpenGL2 compatible) with a 19 inch Samsung LCD display which the OS indicates the minimum res is 800x600, without problems.

If MS and QB64 can still do it then I am sure there must be another library that supports the newer video cards.

I mainly programmed Data progs and simple DRAW with LOCATE statements and am basically still a novice programmer as far as graphics and linking libraries etc. are concerned.

My questions are:
1. Would say SDL work and how do I link it to FBC and find out what it can do ? (I saw this in a LINUX Format periodical and under the QB64 dependencies)
2. Would I be better off to change to LINUX with all this Microsoft nonsense. ie The VISTA (Virus) OS And no support for XP ?

FBC is the most viable compiler as far as I am concerned since the stand-alone prog I tested with was 107Kb. With QB4.5 I managed to combine some Quick libraries and got 8bit 22KHz Music, Mouse etc. The stand-alone prog was 60Kb. The QB64 was monstrous - 818Kb plus so many dependencies that it totalled 6,2Mbytes.
D.J.Peters
Posts: 8189
Joined: May 28, 2005 3:28
Contact:

Postby D.J.Peters » Jul 29, 2010 18:30

Locate is primary to set the current cursor pos to a y,x position for the next print command.

On images you must use the Draw String command as an replacement for Print.

Now if you need the same grid from the Locate command simple use it like this.

x=1:y=10
Locate y,x:Print "Hello"

Draw String Image, ((x-1)*8,(y-1)*8), "Hello"

Joshy

Return to “Beginners”

Who is online

Users browsing this forum: No registered users and 2 guests