Hello,
I'm making a little program and wonder how do i add buttons to the form (beside the minimize,maximize,exit buttons) in visual basic 2008 express edition .
or if its possible to bind ctrl+h to hide form and ctrl+s to show it.
Thank you!
Hello,
I'm making a little program and wonder how do i add buttons to the form (beside the minimize,maximize,exit buttons) in visual basic 2008 express edition .
or if its possible to bind ctrl+h to hide form and ctrl+s to show it.
Thank you!
Last edited by Spot_1337; 10-04-2008 at 08:52 AM.
I don't think you can add a button to the form , but for the CTRL+H add me on msn : [email protected]
Why fill up a signature?
Use minimise, and create a sub to handle Me.Minimise that hides it to the tray.
Added you on msn EmiloZ![]()
Yeah, most of the time folk just create the bar on the form itself and hide the standard one for doing that sort of stuff. Or they fiddle with the XML.
if i create my own bar how do i make it movable so the whole app moves?
You need a Picture box named PictureBox1 for this.
Code:'Picture Box Form Move Private _move As Boolean = False Dim differencePoint As New Point Private Sub PictureBox1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseDown _move = True differencePoint = e.Location End Sub Private Sub PictureBox1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseMove If _move Then Dim newX As Int32 = (Me.Location.X - differencePoint.X) + (e.X) Dim newY As Int32 = (Me.Location.Y - differencePoint.Y) + (e.Y) Me.Location = New Point(newX, newY) End If End Sub Private Sub PictureBox1_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseUp _move = False End Sub
Zomfg. And no, don't ask. - Dombo did it.
yay it worked but now i have another problem
i cant see the sides / bottom now , know how to fix this?
Not quite sure what you mean by "can't see the sides/bottom". Sides/bottom of what? A screenshot would help.
u know the blue sides /bottom of every windows program xd try to minimize ie explorer and look at the sides
I always use Firefox, always Maximised, and I have a custom theme :P But I know the blue bits you mean. Check the form is enabled, because disabling it does that as far as I recall.
... i have disable it and then i made my own as you said i should
Yeah, most of the time folk just create the bar on the form itself and hide the standard one for doing that sort of stuff.
There we go then. That's where the border's gone. You just need to make your own border too![]()
oh thank you soo much +rep![]()