Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cannot type in Combobox in non-TopLevel Form

Status
Not open for further replies.

plocks

Programmer
Aug 26, 2011
16
US
I have a program that opens up a blank form. When the users clicks a button, multiple new forms are brought up within the original form. When doing this, all ComboBoxes in the new forms become uneditable by the user. They can select from the drop-down menu, but they cannot click into the combobox and type.

The comboboxes work fine if I do not open them within the main form. They are all set to "DropDown" style.


Below is some code.

Private Sub btnOpenForms_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnOpenForms.Click

'Open Account_Information form
Account_Information.TopLevel = False
Account_Information.Visible = True
Me.Controls.Add(Caller_Information)

'Open Addresses form
Addresses.TopLevel = False
Addresses.Visible = True
Me.Controls.Add(Addresses)

'Open Notes form
Notes.TopLevel = False
Notes.Visible = True
Me.Controls.Add(Call_Notes)

'Open Services form
Services.TopLevel = False
Services.Visible = True
Me.Controls.Add(Services)

End Sub


Any help with this would be greatly appreciated.
 
I don't have the option. I'm using VB2008 and I think SetTopLevel is not supported for controls.
 
This has been solved by changing the forms to mdi
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top