[VB.NET] Move a bordless Form
2013-06-09, 09:41 PM,
#1
Hi guys, i'm here to explain you how to move a form without border.

LET'S START!
1. Open VisualBasic and make new project or open one of your project.
2. Now go in the Form Properties, find FormBorderStyle and select None
[Image: mzCres2.png]
3. Now double-click on Form and paste this after Public Class Form1
PHP Code:
Private selx As Integer
   
Private sely As Integer
   
Private selz As Boolean

   
Private Sub Form1_MouseDown(ByVal sender As ObjectByVal e As System.Windows.Forms.MouseEventArgsHandles Me.MouseDown
       selz 
True
       selx 
e.X
       sely 
e.Y
   End Sub

   
Private Sub Form1_MouseMove(ByVal sender As ObjectByVal e As System.Windows.Forms.MouseEventArgsHandles Me.MouseMove
       
If selz True Then
           Me
.Left -= (selx e.X)
           
Me.Top -= (sely e.Y)
       
End If
   
End Sub

   
Private Sub Form1_MouseUp(ByVal sender As ObjectByVal e As System.Windows.Forms.MouseEventArgsHandles Me.MouseUp
       selz 
False
   End Sub 

[Image: 5YkGR9h.png]

Now you can make custom background for your form and he will look like custom skin.
Reply
2013-06-09, 09:49 PM,
#2
I was gonna make a similar tut ! Thanks for ur time ;) U could add more screenshots though !! Show examples ! :D
Reply
2013-06-09, 10:19 PM,
#3
Yes, when i have more time i will show some example.
Reply
2013-06-10, 04:53 AM,
#4
Thanks for this, Much apriciated!

Any questions related to CPA belong here.
Before posting, make sure you are in the correct section.

I am temporarily absent due to family circumstances.

Reply
2013-06-10, 01:15 PM,
#5
(2013-06-10, 04:53 AM)DutchPride Wrote: Thanks for this, Much apriciated!

No problem mate. I share what i know with this community
Reply
2013-06-10, 07:30 PM,
#6
(2013-06-10, 01:15 PM)lanzye Wrote:
(2013-06-10, 04:53 AM)DutchPride Wrote: Thanks for this, Much apriciated!

No problem mate. I share what i know with this community

That's the spirit! Thanks for that.

Any questions related to CPA belong here.
Before posting, make sure you are in the correct section.

I am temporarily absent due to family circumstances.

Reply
2013-06-10, 08:03 PM,
#7
Make this community big as a CPA/PPD Pedia.
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  Aeonsofts VB.NET Theme Manager v2.1 lanzye 29 9,738 2017-06-20, 06:55 PM
Last Post: storix
  .Net Expert Required insomniac 6 1,541 2016-09-08, 08:38 PM
Last Post: styx
  VB NET FORM APPLICATION QwertySon 12 1,738 2016-04-27, 08:00 PM
Last Post: Harrington
  HttpWebRequest POST Method Visual Basic . net QwertySon 5 1,412 2016-03-17, 02:59 PM
Last Post: QwertySon
  Youtube api v2 to v3 .net evolution74 7 939 2015-06-05, 02:41 AM
Last Post: Jonz




About Us | Contact Us | CPA Elites | Advertise | Stats | Staff Team

© 2013-2017 CPA Elites Ltd
Enhanced by MyBB and WallBB
Return to top