471,616 Members | 1,780 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,616 software developers and data experts.

¿como puedo abrir un formulario en ejecucion en forma dinamica?

GZG
Por ejemplo

Dim FRM As String = "fUno"

'y poder yo decir lo siguiente
FRM.Show

'se asume que hay un formulario con el nombre fUno en mi proyecto
'mi necesidad es crear un objecto formulario a partir de un string
Nov 21 '05 #1
4 4103
GZG wrote:
Por ejemplo

Dim FRM As String = "fUno"

'y poder yo decir lo siguiente
FRM.Show

'se asume que hay un formulario con el nombre fUno en mi proyecto
'mi necesidad es crear un objecto formulario a partir de un string


(este group esta en *ngles. hay un grupo specificamente para español.)
(this group is in english)
I assume you mean this???

Dim myFRM as new FRM
myFRM.Show
--

Daniel
MCSE, MCP+I, MCP in Windows 2000/NT

--------------------------------------
remove the 2nd madrid from my mail address to contact me.
Nov 21 '05 #2
Daniel,

I assume that is meant creating a form from a string (a name).

Cor
Nov 21 '05 #3
"GZG" <GZ*@discussions.microsoft.com> schrieb:
Dim FRM As String = "fUno"

'y poder yo decir lo siguiente
FRM.Show

'se asume que hay un formulario con el nombre fUno en mi proyecto
'mi necesidad es crear un objecto formulario a partir de un string


\\\
Imports System.Reflection
..
..
..
Dim frm As Form = _
DirectCast( _
Activator.CreateInstance( _
Type.GetType("MyApplication.SampleForm") _
), _
Form _
)
frm.Show()
///

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Nov 21 '05 #4
Cor Ligthert wrote:
Daniel,

I assume that is meant creating a form from a string (a name).

Cor

oh yeah, silly me. misread it again.

--

Daniel
MCSE, MCP+I, MCP in Windows 2000/NT

--------------------------------------
remove the 2nd madrid from my mail address to contact me.
Nov 21 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

11 posts views Thread by Liber | last post: by
1 post views Thread by Liber | last post: by
1 post views Thread by elena.me | last post: by
2 posts views Thread by denet iglesias | last post: by
4 posts views Thread by goosfancito | last post: by
reply views Thread by leo001 | last post: by
1 post views Thread by ZEDKYRIE | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.