Bob,
It can be done, although it's not trivial as it was in VFP. See Rick's article on the subject at
http://www.west-wind.com/presentations/DynamicCode/DynamicCode.htm~~Bonnie
>This should be the easiest thing to do. In a SQL Server table, I store menu information that is later shown in a tree-view control on a winform. The menu shows the names of forms that can be invoked. One of the columns contains the names of the various forms that can be executed (shown).
>
>These would be sample rows from the menu table:
>
>Menu Caption Form Name
>------------------- -------------
>Accounts Receivable frmAR
>Accounts Payable frmAP
>Order Entry frmOrderEntry
>
>All of the forms have been defined in the solution.
>When the user clicks on the tree-view node, I want the application to invoke the appropriate form, but I want to execute the form as a macro substitution. In Visual FoxPro (God how I miss it!) I could do the following:
>
>command = "do form " + cFormName
>&command
>
>where cFormName is the name of the form that was brought in as data in the table row (ex: frmOrderEntry) and lo and behold the form would execute (if it could be found in the project path). Please spare me the verbage as to why this is a security issue and the history of compiled versus runtime languages. Can VB.NET do this...if so...how. Specific (and simple) code examples would be immensely appreciated. I'm at wit's end if that's not obvious from my demeanor.
>
>I cannot find how to do this in vb.net winforms (even the latest Visual Studio .Net 2003 version). Any help would be greatly appreciated.