Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. Listen now

Questions tagged [windows-forms]

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

Filter by
Sorted by
Tagged with
0
votes
0answers
13 views

Getting a control name/Displaying tooltip text

I am developing a character creator using Windows Forms (because apparently I can't create menus in Unity), and I want to display some tips and descriptions in a ...
0
votes
1answer
31 views

Monogame sprite rotation issue

I'm having interesting problem with rotating a sprite in MonoGame. Here is how origin, destination rectangle and scale are created: ...
0
votes
1answer
197 views

Multiple glControl on same winform is not working - OpenTK C#

I have to show frames from two cameras in two openGl control separately at same time. For that I have put two opengl control in my form and pass those frames to opengl accordingly. But when running ...
0
votes
0answers
13 views

How do I hide the bug image once it's hit by a bullet? [duplicate]

I'm writing a Space Invade clone. I am able to get a bullet to hit an image, then draw a collision image but then it redraws the bug. I want it to clear the bug image after the collision. I have ...
0
votes
2answers
169 views

How do I hide the bug image once it's hit by a bullet?

I have almost solved my problem. I am able to shoot a bullet and hit a bug and it then draws a collision bitmap. but then it redraws a bug, I want to clear the bug bitmap after the collision happens. ...
1
vote
2answers
205 views

How do I replace the enemy with a different graphic when it gets hit?

I am able to draw my space ship and a an enemy (called "bug_one" in the code below) and move my bullet. When the bullet hits the enemy, it draws a collision bmp. But currently my code draws both the ...
1
vote
1answer
82 views

Bitmap drawn with Graphics.DrawImage flickers

I am working on a space invaders clone using bugs as aliens. Everything works ok but the bug bitmap flickers on the screen. ...
0
votes
4answers
220 views

How do I move the paddle with the arrow keys?

I am making a pong game using gdi+ and c#. I want to move the paddle using the arrow keys by using the move variable, but it does not work; the paddle does move when I use the int move=0; global ...
1
vote
0answers
23 views

MonoGame minimises when I click on second game window

I've problem with my MonoGame project. I have one full-screen game window and one window form with some info (part of the game too). And the problem lies in when I click on the window form, the main ...
1
vote
1answer
411 views

System.Windows.Form.Control.FromHandle returns null for current window

I was following the book "XNA 4.0 Game Development By Example" and in the eighth chapter, the author adds windows form to an XNA game. I was following the book for a MonoGame project, but I get null ...
0
votes
1answer
705 views

Windows Forms game loop

There is a very good game loop in the link which is tailored for windows forms. I need it in c++/cli so I converted the code as below. Here is my main loop. ...
1
vote
0answers
266 views

Monogame intermediateSerializer with winforms

I want my xml files to be game ready on save in my winforms. Right now I am trying to serialize a simple object like this and it is accessing the XML file, but not outputting anything. Am I missing ...
2
votes
1answer
648 views

Monitor external window events with SDL2

I'm trying to render my game (SDL2, C++) in a Windows Form application (C#) using C++/CLI to interface with my underlying C++ code. The purpose of the form is to create an editor which can monitor/...
0
votes
1answer
227 views

Stuck the ball in the board (pingpong game)

this game isn't completed yet, i've created the part where the ball hits the board, but there's problem in playing and that's the ball stucking in the board. For a better comprehension and ...
2
votes
3answers
248 views

In XNA, how do I get forms to display in front of my full-screen game?

I'm trying to open a form in front of my game, which is full-screen. However, the form seems to appear only behind the game window. At the moment, I'm doing this: ...
1
vote
1answer
58 views

Strange anomalies when using WinForms with XNA

I haven't seen any questions related to my issue, and this leads me to believe I'm missing something minor, however; The Problem I'm creating a game that is effectively launched from a windows form. ...
2
votes
3answers
1k views

Arrow key control on winforms RichTextBox

I am making a faux console using winforms for the game I am working on. Right now I am moving a '0' across the screen using the arrow keys. In order to provide fine grain formatting on the text, I ...
1
vote
0answers
126 views

Custom Keyboard run by Arduino not working in XNA

I'm trying to make a stenotype-teaching game using the stenoboard as input. The Stenoboard emulates an NKRO keyboard, using this code: https://github.com/caru/StenoFW/blob/master/StenoFW.ino, with an ...
0
votes
1answer
578 views

How can I load another form containing a new level when my player reaches the current level's exit?

I am coding a very basic side-scrolling game in C#, using Windows Forms. I want to connect my game's levels with 'exit points'. When the player touches an exit point, a new form should be loaded ...
0
votes
1answer
334 views

XNA/Winforms - Nothing being drawn after calling SetRenderTarget(null)

I'm creating a basic scene/level editor using XNA/Winforms using the base classes from http://xbox.create.msdn.com/en-US/education/catalog/sample/winforms_series_1 Everything works fine and gets drawn ...
1
vote
2answers
575 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 : ...
0
votes
1answer
577 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 ...
32
votes
3answers
26k 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
1answer
288 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 its ...
0
votes
1answer
305 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 ...
1
vote
2answers
289 views

Spritebatch not working in winforms

I'm using the Winforms sample on the app hub and everything is working fine except my spritebatch won't draw anything unless I call Invalidate in the Draw method. I have this in my initialize method: ...
0
votes
0answers
47 views

Invalidate not working (winforms & xna) [duplicate]

I'm using winforms with xna. Everything's working so far except for the drawing because invalidate won't refresh the screen unless repeated. This is the initial code I had: ...
2
votes
1answer
107 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: ...
0
votes
1answer
1k views

Problems when randomizing x and y position of a picturebox [closed]

So, I'm making a simple game. It's like snake but the picturebox doesn't grow. In the game, you have to get fruits and other objects. Look at berry's code: ...
1
vote
2answers
2k views

Winform + XNA (Microsoft Example) - Issues with Drawing Texture2D

Before I get started I would just like to say that I have been using the Microsoft Winform + Xna examples found here: WinForms Series 1: Graphics Device I think I somewhat understand how its working ...
0
votes
1answer
844 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
284 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
277 views

Set vertex position

Can anyone tell me how to set the positions of model vertices? I want to be able to change the position of some of the vertices of a Model. Is there any way to make that happen? And make the changed ...
1
vote
2answers
227 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 ...
5
votes
1answer
686 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 ...
2
votes
2answers
215 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 ...
4
votes
1answer
7k 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
2answers
2k 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
179 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 ...
7
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
241 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 ...
2
votes
2answers
2k 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 ...
2
votes
3answers
1k 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
2answers
1k 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 ...
4
votes
0answers
1k 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, ...
1
vote
1answer
185 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 ...
3
votes
1answer
2k 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(); ... ...
1
vote
2answers
310 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
217 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. ...