List of ALL Controls in PROJECT - VB.net - Programmers Heaven

Howdy, Stranger!

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

Categories

List of ALL Controls in PROJECT - VB.net

fabiocrjfabiocrj Posts: 2Member
Hi all,

I don

Comments

  • DaiMitnickDaiMitnick Posts: 77Member
    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. |
    ------------------------------------------
  • fabiocrjfabiocrj Posts: 2Member
    Sorry, but i couldn
  • DaiMitnickDaiMitnick Posts: 77Member
    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. |
    ------------------------------------------
  • BillyLunchMoniBillyLunchMoni Posts: 4Member
    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]



  • BillyLunchMoniBillyLunchMoni Posts: 4Member
    This post has been deleted.
Sign In or Register to comment.