First off: Wow! This is really cool. You the man Wyrd! Exactly what one need to just fire away with a new project.
Well, as an esteemed n00bie, I naturally ran my head in the wall.
Is it possible to utilize Phoenix in an application that has a Windows.Form as the main entrypoint?
I tried to change the "main" in your example into a constructor that takes the form as an argument. And then set the variables for that form. But on execution the application doesn't appear at all.
I want to use the Form application as the main entrypoint in order to utilize windows graphical components such as MessageBox and different dialogs.
My application basically has a map layer with objects bound to it. By clicking an object I want a windows gui dialog to appear with object information (house, intersection, water, blah blah). But I still want to use DirectDraw for drawing the map. (am I making any sense here???)
Code example:
In the example above the application just fails.
And if I set the Game (ie: Map-class) as the startup project then for some reason I cant use MessageBox() since:
'System.Windows.Forms.MessageBox' denotes a 'class' which is not valid in the given context
I'm so sorry for all the trouble, I wish I wasn't such a newbie.
Well, as an esteemed n00bie, I naturally ran my head in the wall.
Is it possible to utilize Phoenix in an application that has a Windows.Form as the main entrypoint?
I tried to change the "main" in your example into a constructor that takes the form as an argument. And then set the variables for that form. But on execution the application doesn't appear at all.
I want to use the Form application as the main entrypoint in order to utilize windows graphical components such as MessageBox and different dialogs.
My application basically has a map layer with objects bound to it. By clicking an object I want a windows gui dialog to appear with object information (house, intersection, water, blah blah). But I still want to use DirectDraw for drawing the map. (am I making any sense here???)
Code example:
Code:
public Form1 () {
[indent]InitializeComponent();
Map m = new Map(this);
[/indent]
}
... and in Map:
Map(Form window) {
[indent]
window.WindowState = FormWindowState.Maximized;
window.FormBorderStyle = FormBorderStyle.None;
window.Show();
// Start the game.
this.Start(window);
//Cleanup.
this.Dispose();
[/indent]}
In the example above the application just fails.
And if I set the Game (ie: Map-class) as the startup project then for some reason I cant use MessageBox() since:
'System.Windows.Forms.MessageBox' denotes a 'class' which is not valid in the given context
I'm so sorry for all the trouble, I wish I wasn't such a newbie.