moving panel(or any other control) at runtime
Heres your chance to share your own tutorials with the community. Just post them on here. If your lucky they may even be posted on the main site.
4 posts
Page 1 of 1
Hi this is just a basic tut how to move a panel or any control at run time
OK the project has some extra stuff, so if you want that just dl the project.
Okay now you'll need to put this under Public Class ..
So we have a panel called pnl1..

OK the project has some extra stuff, so if you want that just dl the project.
Okay now you'll need to put this under Public Class ..
So we have a panel called pnl1..
Code: Select all
You'll find everything you need in this app:Dim smth as Point'Smth is something I dont know what to call it xD, you can call it pt or something.
Private Sub pnl1_MouseDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles pnl1.MouseDown
smth = New Point(-e.X, -e.Y)
lb1.ForeColor = Color.White
End Sub
Private Sub pnl1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles pnl1.MouseMove
If e.Button = Windows.Forms.MouseButtons.Left Then
Dim cp As Point = Me.PointToClient(MousePosition)
cp.Offset(smth.X, smth.Y)
pnl1.Location = cp
End If
End Sub
You do not have the required permissions to view the files attached to this post.
Last edited by Agust1337 on Thu Dec 16, 2010 6:30 pm, edited 1 time in total.
i've made this a long time ago but still Nice Tut.
This program is not too complicated perhaps you should write the tutorial here
This program is not too complicated perhaps you should write the tutorial here
You can find me on Facebook or on Skype mihai_92b
Yeah, write it instead of just posting a file. You get much more reputation and you get more people to read it.
LMAOSHMSFOAIDMT
Laughing my a** of so hard my sombrero fell off and I dropped my taco lmao;
Over 30 projects with source code!
Please give reputation to helpful members!
![Image]()
![Image]()
Laughing my a** of so hard my sombrero fell off and I dropped my taco lmao;
Over 30 projects with source code!
Please give reputation to helpful members!

Well i was in a hurry, but i will put the codes.
4 posts
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023