Questions tagged [windows-forms]
Windows Forms is a graphical API of Microsoft .NET Framework, a wrapper providing access to native Microsoft Windows interface elements.
58 questions
17
votes
3
answers
6k
views
Game loop isn't performing well enough, so my frame rate is too low (Windows Form + GDI+)
I decided to learn about building games, so I picked up C# to use it along with Windows Form - I already have C# experience, so that was the main reason I did so. That said, I tasked myself to build a ...
0
votes
1
answer
194
views
0
votes
0
answers
782
views
Playing Video Files in Windows Forms with MediaPlayer
With the following encoding, only the audio part of the video is played, but the video itself is not shown:
...
1
vote
0
answers
180
views
How to implement texture slicing
I'm making a simple game in C# and i'm trying to slice my UI images into 9 smaller rectangles, so the image doesn't get stretched when drawing to different resolutions, but i'm having lots of problems ...
0
votes
2
answers
587
views
Rectangle collision not working!
I'm making a simple game in C# and i'm having some problems with rectangle collisions.
What i'm doing is checking if two rectangles intersects, checking the side of collision and then moving the ...
0
votes
1
answer
174
views
Move two sprites together with offset?
I'm making a simple game in C# for practice and i'm having some problems when dragging a sprite
and making another sprite follow it.
What i'm trying to achieve:
When dragging a sprite, i want ...
0
votes
1
answer
718
views
How to keep objects in the same position relative to their parent?
I'm writing a simple game in C# and i'm having some difficulty to calculate the local position of a sprite.
What i'm aiming to achieve:
Calculate the sprite "local position" relative to the ...
0
votes
1
answer
1k
views
Window handle is invalid
I'm trying to implement an input listener for FNA (modern version of XNA). Since FNA does not supply any sort of way to listen to native input this has to be done through the windows API and native ...
1
vote
1
answer
264
views
How to properly manage game music and sounds?
I'm developing a WinForms customized version of Pac-Man for a Software Engineering project and I reached the point where I have to implement music and sound effects. I used the MVC architectural ...
0
votes
0
answers
168
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 ...
1
vote
1
answer
883
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
1
answer
2k
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
2
answers
226
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
2
answers
251
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
1
answer
504
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.
...