static void Main(string[] args) { Thread.CurrentThread.CurrentCulture = new CultureInfo("", false); SceneEditor form = new SceneEditor(); form.Show(); form.game = new Game1(form.pctSurface.Handle,form,form.pctSurface); form.game.Run(); }
public Game1(IntPtr drawSurface, SceneEditor parentForm, System.Windows.Forms.PictureBox pictureBox) { graphics = new GraphicsDeviceManager(this); Content.RootDirectory = "Content"; this.drawSurface = drawSurface; this.parentForm = parentForm; this.pictureBox = pictureBox; graphics.PreparingDeviceSettings += new EventHandler<PreparingDeviceSettingsEventArgs>(graphics_PreparingDeviceSettings); Mouse.WindowHandle = drawSurface; gameForm = System.Windows.Forms.Control.FromHandle(this.Window.Handle); gameForm.VisibleChanged += new EventHandler(gameForm_Hide); }