Windows Forms is a graphical API of Microsoft .NET Framework, a wrapper providing access to native Microsoft Windows interface elements.

learn more… | top users | synonyms

0
votes
1answer
82 views

How to show my XNA game in form C#

I have a game in XNA, I want to connect this game with WindowForm to show for example the distance and the position. I tried to apply many tutorials that talking about this. but here is my problem : ...
15
votes
2answers
4k views

What is the standard C# / Windows Forms game loop?

When writing a game in C# that uses plain-old Windows Forms and some graphics API wrapper like SlimDX or OpenTK, how should the main game loop be structured? A canonical Windows Forms application has ...
0
votes
0answers
87 views

Trying to render a texture on Windows.Forms.Panels

Using a SlimDX.Windows.RenderForm, I want to dynamically create a texture of a map of the US, copy that texture to 2 other textures, then draw unique radar data onto each texture. Then I will pass ...
0
votes
1answer
133 views

How do I handle window resizing in SlimDX?

I'm considering the use of SlimDX in a managed Windows Forms Application. Available with DirectX is DXUT. I use DXUT to handle events such as window resizing and 'lost devices.' How well does SlimDX ...
3
votes
1answer
4k views

XNA + Windows Forms: How make them work together without making the trick of the custom GraphicsDeviceControl?

What I've found is a solution where you have to code a custom GraphicsDeviceControl to put inside the form (the well known tutorial from the APPHub), but that's not what I'm searching for. I would ...
0
votes
1answer
118 views

How to call game Update from another form

I have three projects in one solution: a form with some tool (see it as a level-editor), in which there is PictureBox where I want to redirect drawing of the game. My game, with some methods and ...
0
votes
1answer
155 views

Write my own level editor, questions [closed]

I just finished to code the most important parts of my game engine (not a tile-map one), such as lights, shadows, objects update/draw, input, ecc. Now I'm making a level editor to simplify the ...
2
votes
1answer
73 views

How can I show xna graphics content in a control on a form in xna?

I was able to create a form in xna using "Add Windows Form", named "Form1" then adding: Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new ...
0
votes
1answer
406 views

Client Server Multiplayer Project

I have reviewed the relevant WinForms/XNA samples here and here. However, my requirements are slightly different. Given the following: I am developing a multiplayer (Client - Server) game There ...
1
vote
2answers
234 views

2D tilemap editor UI--how do I disable editing while save/load dialog is open?

I'm working on a basic 2D tilemap editor in C#/XNA. Currently, it displays the map through a picturebox through which XNA's output is being routed, and editing is accomplished through simply checking ...
1
vote
2answers
172 views

Point[] and Tri not “could not be found”

Hi I'm trying to learn how to load a .obj file using OpenTK in windows Forms. I have seen a lot of examples out there, but I do see almost everyone uses List, and Point[]. Code example show these ...
5
votes
1answer
343 views

Does using [STAThread] with XNA have any negative implications?

I'm working on a game in XNA, which has an inbuilt level editor. To facilitate this I want use the FileOpenDialog from Winforms. I followed the instructions as per this answer. This involves setting ...
2
votes
2answers
165 views

Re-sizing the form without scaling the GUI

I am writing a turn based strategy game in C#. My GUI implementation consists of class that extends Form containing a class that extends Panel. When I render the GUI I draw to the paint method in ...
-1
votes
1answer
827 views

How can I guarantee a solvable Fifteen Puzzle shuffle?

I am making a 15 Puzzle game in C# that allows the user to enter a custom row and column value up to a maximum of a 10 x 10 puzzle. I am having problems with the shuffle method. I want to make it so ...
0
votes
2answers
150 views

MenuStrip in XNA 4.0

Is it possible to place a MenuStrip into a XNA 4.0 project. This project is intended for PC-s only and I already have openFile dialogs, but I cant get the MenuStrip drawn. If this is not possible what ...
1
vote
3answers
1k views

interaction with WinForm and Xna

Okay, this is may be very simple. I embedded my XNA project in WinForms through "this tutorial" and it works fine even with XNA 4. Now I have a 3D CoilSpring object and the number of loops for this ...
2
votes
3answers
858 views

Stuck in an infinite recursion in Minesweeper

I am trying to build a simple minesweeper game. The game gets stuck in an infinite recursion whenever a user clicks on a tile which is not a mine... I have used the following function code for the ...
6
votes
4answers
1k views

Game Editor - When screen is clicked, how do you identify which object that is clicked?

I'm trying to create a Game Editor, currently just placing different types of Shapes and such. I'm doing this in Windows Forms while drawing the 3D with XNA. So, if I have a couple of Shapes on the ...
1
vote
1answer
183 views

Present fails randomly on mixed C++ Direct3D9 app

I have a mixed .NET application (managed and unmanaged code bridged by C++/CLI wrappers) which uses unmanaged Direct3D9 9.0c to do rendering inside a control which is wrapped inside a C++/CLI class ...
1
vote
1answer
166 views

Should have one device per application or per form when doing MDI Forms work with XNA?

I am just making a simple editor for a project I am working on and as part of this I need to add a few different MDI forms within a larger container form. Now the XNA (4.0) example Windows Forms ...
1
vote
2answers
729 views

What basic windows form games should I build as a newbie in game development? [closed]

I am a complete newbie in game development. I want to know about some basic games that I can start building with simple algorithms and basic knowledge. I have already made few basic games like ...
6
votes
2answers
654 views

Is the viewport meant to be an absolute representation of where the underlying device is drawing?

I know this may sound like an odd question but I just wanted to confirm which way it is. Currently I am using XNA within Windows Forms (MDI) and I am just wondering about the viewport, as I have ...
2
votes
0answers
558 views

Developing user interface [closed]

i am beginner in graphic development and have no experience with it, i only developed always with standard win controls. Now i want to create interface in c# for my sports management simulation game, ...
3
votes
1answer
1k views

XNA mouse position in windows forms

I am using this code in Update method in XNA RenderControl in Windows Forms: ... Mouse.WindowHandle = renderControl1.Handle; MouseState stat=Mouse.GetState(); ... Everything works fine but when I ...
1
vote
2answers
273 views

Creating installer for WinForms XNA with compiled content

I have a Windows Forms application that uses a custom Graphics Device control based on Microsoft's "WinForms Series 1: Graphics Device" sample. The application makes use of a single model (the ...
0
votes
2answers
196 views

Windows Form code not executing?

Ok, I've got a weird one here. I'm trying to make a basic tile engine using a windows form, but some of my code is just...not happening. I'll post the chunks in question. private void ...
0
votes
2answers
926 views

Thread problem updating Windows Forms control in XNA C#

I'm development a network card game, and for now i've two players connected but there is a problem with one of them, this one can't do anything on the game. Looks that screen was blocked. I'm think ...