Window Screen Command?

General FreeBASIC programming questions.
Post Reply
xbgtc
Posts: 251
Joined: Oct 14, 2007 5:40
Location: Australia

Window Screen Command?

Post by xbgtc »

Hi, I've tried to use this command but doesn't seem to work.
What is it meant to do?
I assumed (from FB help) that in your say 1440x900 graphics screen i can use WINDOW SCREEN (320,150)-(1120,750) to get an 800x600 screen so the program written for a 800x600 screen now runs as normal but centrally in your bigger screen.

The program runs but text still prints at 0,0 and images start in the negative hence you only see about a 1/4 of them like they are put at -200,-150.

Any idea what's wrong or what i should be doing instead?
fxm
Moderator
Posts: 12161
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Re: Window Screen Command?

Post by fxm »

Instead of 'WINDOW SCREEN .....', use 'VIEW SCREEN .....' instead.
But no solution for 'PRINT' which is not a graphic instruction. Use 'DRAW STRING' instead.
xbgtc
Posts: 251
Joined: Oct 14, 2007 5:40
Location: Australia

Re: Window Screen Command?

Post by xbgtc »

thanks FXM i'll check out view screen but drawstring no good here as i use a routine for text (see below) but no nig deal if i can't do it :)

Code: Select all

sub textsound(text as string,stp as ubyte,sp as ubyte,cr as ubyte)
    dim x as uinteger
    FSOUND_PlaySound(0,wavefile(3))
    for i as integer=1 to len(text) step stp
        ?mid(text,i,stp);
        ?chr(219);chr(8);
        sleep 30
        if inkey=chr(27)then ex
    next
    if sp=0 then ?" "
    if cr=1 then ?" ";
    if cr=2 then
        ?" "
        ?" ";chr(219);
        locate,2
    end if
    if cr=3 then
        ?" "
        ?chr(219);
        locate,1
    end if
    if len(text)=1 then sleep 20
    FSOUND_Stopsound 0
end sub
paul doe
Moderator
Posts: 1742
Joined: Jul 25, 2017 17:22
Location: Argentina

Re: Window Screen Command?

Post by paul doe »

I don't see any reason why you couldn't convert that code to use draw string instead of print...
Post Reply