List of ALL Controls in PROJECT - VB.net

Hi all,

I don

Comments

  • Yes, getting the controls in VB.NET is a very tricky thing indeed, one of the few disadvantages of .NET compared to Classic. The following page gives one of the easiest methods I've found for doing it:

    [link=http://www.codeproject.com/KB/vb/control_arrays_in_vbnet.aspx][/link]

    http://www.codeproject.com/KB/vb/control_arrays_in_vbnet.aspx

    Hope this will help you to achieve what you need. Dai


    ------------------------------------------
    Do or do not, there is no try. |
    ------------------------------------------
  • Sorry, but i couldn
  • That's strange, I used the link command and that actually stopped the link displaying, never mind, have pasted the link text again. Regards, Dai


    ------------------------------------------
    Do or do not, there is no try. |
    ------------------------------------------
  • Hi,
    You might want to try this peace of code I came across. It'll find the object by string/name and return the object which you can iterate through if you need.

    [color=Blue]Private Function getfromFromName(ByVal FormName As String) As Object
    Dim oRetForm As Object = Nothing
    Dim oType As Type = _
    Assembly.GetExecutingAssembly().GetType(FormName)
    If oType IsNot Nothing Then
    oRetForm = Activator.CreateInstance(oType)
    End If

    Return oRetForm

    End Function[/color]



  • This post has been deleted.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories