I want to make a usercontrol which is a combobox but the dropdown will be a grid. So far this is my code and my problem is that the grid wont show.

Namespace myComboBox
    Public Class popUpComboBox
        Inherits System.Windows.Forms.ComboBox

        Protected Overrides Sub OnDropDown(ByVal e As System.EventArgs)
            Dim grid As New System.Windows.Forms.DataGridView

            grid.Width = 1000
            grid.Height = 1000
            grid.Left = Me.Left
            grid.Top = Me.Top + Me.Height

            grid.Show()
        End Sub

    End Class
End Namespace

No help?

Is it possible to develop the user control in vb.net window application.If yes how can i do it.

Regards,
Naresh R. shriramoju

I know how to make the user contorl in web application, But don't know in vb.net window application.

Regards,
Naresh R. shriramoju

In windows application if u want to create user control
develop the application go to properties of the project make it as a class library
and then select start up object as nothing then run the application
it will give u the dll file instead of .exe
you can use this dll as component as user control wherever u want

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.