Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Windows (Not the OS)
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
LegendsEnd




PostPosted: Mon May 22, 2006 2:55 pm   Post subject: Windows (Not the OS)

With windows is it possible to have multiple active ones? For example, if you're playing an RPG, and you open your inventory. I create a new window for the inventory, but is it also possible for the game window to input/output data? Also when I close the inventory window, turing wants to close the entire program. Is it possible to make it so that if I hit X on the inventory window it'll close that and return to the main program?
Sponsor
Sponsor
Sponsor
sponsor
Cervantes




PostPosted: Mon May 22, 2006 3:10 pm   Post subject: Re: Windows (Not the OS)

LegendsEnd wrote:
With windows is it possible to have multiple active ones? For example, if you're playing an RPG, and you open your inventory. I create a new window for the inventory, but is it also possible for the game window to input/output data?

I think this is possible in Windows (the OS). Just think of keyloggers: that's what they do! But I don't think Turing can do this. You'd probably have to do some Windows API calls to accomplish this.

LegendsEnd wrote:
Also when I close the inventory window, turing wants to close the entire program. Is it possible to make it so that if I hit X on the inventory window it'll close that and return to the main program?

Nope, that's not possible. The closest you could do would be to give the window it's own little "X" button that you program yourself. However, that button wouldn't be on the window bar.

Tough luck all around, LegendsEnd. Sad
Tony




PostPosted: Mon May 22, 2006 3:12 pm   Post subject: (No subject)

Turing outputs to an active window. So you could switch between the two and draw to both in turn.. though if the user manually selects focus, you could draw to a wrong window.

There are internal Window.Close methods that you could call to close a window. [X] button will indeed quite the entire Turing app.

Personally I think you're better off keeping everything in a single window. Less confusing and easier to implement (everything is always in focus).
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
codemage




PostPosted: Tue May 23, 2006 8:11 am   Post subject: (No subject)

Much better to use one window and "fake" having various panes. Not too hard at all with a bit of graphical savvy.

It was a bit of a rage in VB to have a whole bunch of windows for a while - but the code is tedious, and the whole thing is error prone if a window is closed unexpectedly, or a window suddenly gets input when the active window is expecting it, etc.

It's almost like having processes.
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 4 Posts ]
Jump to:   


Style:  
Search: