1st - i saw on a youtube video, a guy moving buttons/pictures in visual basic, while the project was running; it created and represented the idea of moving icons in windows desktop.
i want to do the same; anyone know something? code/links, something useful
2nd - this is about resizing the form:
-when i resize the form, i want the objects of that form, to adapt and resize to the new size of the form; it supposed they adjust automatically with the resizing of the form; please tell me how i can do that.
-when i put the form windowstate maximized, the form appears maximized of course, but the object dont lool proporcionally and it the right place;for example i put a button in the bottom left corner, but when the project loads, that object appears in center left. is there anyway to do that without having to coding coordinates;
thanks, and sorry for the long text and the english
6 replies to this topic
#1
Posted 25 March 2011 - 04:52 PM
|
|
|
#2
Posted 26 March 2011 - 03:48 PM
Perhaps by anchoring the elements to the sides of the form? I don't know Visual Basic, but in Visual C++, that's what I would do.
I suppose it's slightly out of my field.
I suppose it's slightly out of my field.
#3
Posted 27 March 2011 - 11:30 AM
Take a look into the Dock property. You can place your items by using splitcontainers and panel, and docking your controls into them.
#4
Posted 04 April 2011 - 12:46 PM
To answer your first question you'll probably want to use the MouseDown event on the object you want to move.
So if you want to move a command button for example then you would do something like this:
This is a really rough example so sorry
So if you want to move a command button for example then you would do something like this:
This is a really rough example so sorry
Private Sub Button1_MouseDown() button1.capture = false Dim sndmsg As Message = Message.Create(TextBox1.Handle, &HA1, New IntPtr(2), IntPtr.Zero) me.defwndproc(sndmsg) End Sub
#5
Posted 05 April 2011 - 06:41 AM
THANKS
this works fine but the click event dont work with this, i cant understand why, it only works if i put the code in the mousedown event, and i dont wont that.
please help, it's not th first time that my clickevent dont work
this works fine but the click event dont work with this, i cant understand why, it only works if i put the code in the mousedown event, and i dont wont that.
please help, it's not th first time that my clickevent dont work
#6
Posted 05 April 2011 - 07:43 AM
What you could do is put this in the MouseMove event. Then I think MouseMove has a property to say if a mouse button is clicked. It might be Button or something, not sure of the top of my head.
#7
Posted 05 April 2011 - 07:54 AM
worked PERFECT , in the mousemove event
THANKS THANKS.
THANKS THANKS.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account


Back to top









