hi
i want have a control that include a picturebox with a textbox.
how can i create this?
and i want can move it on the form with mouse
how can i create that?
for this question i put a usercontrol and put a picturebox and a textbox into that, but when i want move it , usercontrol don't move correctly.
and if i use a groupbox for that goal , if i click on the groupbox , it move correctly but if i click on the picturebox or textbox that are into the groupbox, the groupbox don't move
now i don't know what way is good
and what can i do for that question?
please help me;
my question is : create a picturebox with a textbox that be connect together means when i move the picturebox or textbox , else control move too;
for example : if i move the picturebox , the textbox move with picturebox too;
thanks in advance
Loading
Nilanka DharmadasaPosted Dec 21, 2009, 12:34 AM
The reason is not a problem in your usercontrol.
The reason is, you bind the events to one usercontrol intance at the initiation of the form.
Then you create another instance at the button click event, and expect it to be moved.
I corrected your code. Check it.
If you find my answer useful, please do not forget to check 'Do you like this answer' check box.
Bahar JalaliPosted Dec 18, 2009, 9:47 AM
but i say for this question i put a usercontrol and put a picturebox and a textbox into that, but when i want move it , usercontrol don't move correctly.
now i send you my codes for move the usercontrol at runtime;
when i put a usercontrol1 on the form that code test seccussfully but when i add a usercontrol at runtime that don't move;
Nilanka DharmadasaPosted Dec 18, 2009, 7:05 AM
If you want to see the text box and picture box as a single control, you should use it in another project.
Check the attached project. Then you will understand what I say.
Please check 'Do you like this answer' check box if this helps you.