I'm trying to create a borderless win forms app.
Here's the steps on how I managed to make something really simple that does what I want:
- First, I set the form border style to none.
- Then added an image that will serve as the exit button for the application.
Here is the image of what I've done so far:
When I run the application, I wonder why I can't move the window or the app around the screen.
Any ideas on how I can get through with this problem?
The example code and project are written in VB.Net but this solved this problem for me after doing a bit of reading on comparing keywords between the two languages I had the code written for C#.
Moving and Resizing Borderless WinForms
It also solves the resizing issue as well if you're interested.
EDIT
Also, here is the website I used to read about converting VB to C#.
Comparing VB and C#
You can not move the application because in Windows the title bar and borders are the default method to move and resize a stand winform. To replicate this functionality without borders; you have to provide an area on the form that captures the mouse pointer and moves the form according to the new location of the mouse. You can do this by handling the drag events for the form and resetting the forms top and left property.