Computer Science Canada

New window?

Author:  mike200015 [ Sat Feb 26, 2005 6:24 pm ]
Post subject:  New window?

How do i make a new window open. In my program, i want to make it so if the user presses "7".. it will open a new window with a different dimension

Author:  Flikerator [ Sat Feb 26, 2005 6:28 pm ]
Post subject: 

I know how to open a window, but what do you mean a different dimension? Like size?

Window.Open()

If you need an explanation just ask.

Author:  Cervantes [ Sat Feb 26, 2005 6:29 pm ]
Post subject: 

Use Window.Open().
ex:
code:

var winID := Window.Open ("text")

Check the help file for it.
Hopefully, Flikerator will post a brand new, shiny tutorial on the topic soon. Very Happy

EDIT: heh. Confused

Author:  mike200015 [ Sat Feb 26, 2005 6:31 pm ]
Post subject: 

i want a new window to open but like make it a diff. dimension than the original window.. and like how would i put it into my prog.. i hav:

(procedure)
....
....
....
end (procedure)

if ch :=('7') then
(procedure)
end if


Also, is there a way of actually not opening a new window, but when the user presses '7' then the window size will change, instead of opening a new window?

Author:  Flikerator [ Sat Feb 26, 2005 6:32 pm ]
Post subject: 

Alright I will write up a tutorial Razz

It will have to be in a phew days as I have too many projects do, im still here because I like making fun of that stupud DrViper. He is pathetic.

Sry for offtopic

EDIT
------
Alright what do you mean by dimension, size, position?

EDIT AGAIN!

Yes give me a phew minutes to test something ill post an answer.

Author:  mike200015 [ Sat Feb 26, 2005 6:42 pm ]
Post subject: 

kk thnx!...... and yea.. dimention.. i mean like size position

Author:  Flikerator [ Sat Feb 26, 2005 6:48 pm ]
Post subject: 

Just posting so you know I didn't abandoned you, I will edit this with the answer.

Alright now since you have it in a procedure I will make one so it will be similar. Then loop it to show that it when you hit '7' it will change position. Its as easy as using View.Set()

code:

var ch : array char of boolean

View.Set ("position:center,bottom")

procedure windowchange
    View.Set ("position:center,top")
end windowchange

loop
    Input.KeyDown (ch)
    if ch ('7') then
        windowchange
    end if
end loop


Now to change size it is very similar, like this;

code:

var ch : array char of boolean

[b]View.Set ("graphics:400,400")[/b]

procedure windowchange
[b]    View.Set ("graphics:1280,720")[/b]
end windowchange

loop
    Input.KeyDown (ch)
    if ch ('7') then
        windowchange
    end if
end loop


I bolded the differences. If you need something else, it doesnt work, or such just say so and Ill help out.

EDIT AGAIN
Okay the bold didnt work but I will leave it in there anyway..lolz sry bout that Laughing

Author:  mike200015 [ Sat Feb 26, 2005 6:49 pm ]
Post subject: 

lol.. kk thnx alot Exclamation Smile

Author:  Flikerator [ Sat Feb 26, 2005 7:02 pm ]
Post subject: 

mike200015 wrote:
lol.. kk thnx alot Exclamation Smile


Did it work out well? (Btw I posted the help stuff Razz)

Author:  mike200015 [ Sat Feb 26, 2005 7:05 pm ]
Post subject: 

I didn't try it yet, i will in a few mins, and ill tell you how it worked out. Thank so much

Author:  mike200015 [ Sat Feb 26, 2005 7:13 pm ]
Post subject: 

Yea, works great Exclamation Exclamation Thanx Flickerator Exclamation Very Happy

Author:  Flikerator [ Sat Feb 26, 2005 8:38 pm ]
Post subject: 

No problem. If you need any other help just say the word 8)

Author:  mike200015 [ Sat Feb 26, 2005 9:52 pm ]
Post subject: 

Very Happy kk.. thnx Exclamation


: