280 pts.
 How do I convert a VB 6 TextBox to ComboBox?
Sir, how i convert textbox to combo in vb form

Software/Hardware used:
ASKED: November 19, 2008  9:06 AM
UPDATED: November 19, 2008  2:26 PM

Answer Wiki:
I think you cannot do that conversion at runtime in vb6, but you can create new controls and delete controls, so you could remove the textbox and create a combo at the same position. You can create a new control this way (a TextBox called 'Text2' in this case): <pre>Dim ctlName As Control Set ctlName = Form1.Controls.Add("VB.TextBox", "Text2", Form1) ctlName.Visible = True ctlName.Top = Text1.Top </pre> and you can remove it like this: <pre>Form1.Controls.Remove ("Text2")</pre> Hope this helps.
Last Wiki Answer Submitted:  November 19, 2008  2:25 pm  by  carlosdl   63,535 pts.
All Answer Wiki Contributors:  carlosdl   63,535 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _