PC Review


Reply
Thread Tools Rate Thread

How can I resolve the control type?

 
 
Mr. X.
Guest
Posts: n/a
 
      16th Jun 2010
Hello.
In VB.NET (VS 2008) :
How can I resolve the control type, by knowing it's name only.
I.e : Panel.

Thanks
 
Reply With Quote
 
 
 
 
Herfried K. Wagner [MVP]
Guest
Posts: n/a
 
      16th Jun 2010
Am 16.06.2010 21:00, schrieb Mr. X.:
> In VB.NET (VS 2008) :
> How can I resolve the control type, by knowing it's name only.
> I.e : Panel.


The name of the type or the name of a control?

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
 
Reply With Quote
 
Mr. X.
Guest
Posts: n/a
 
      16th Jun 2010
I have the name of type.
As the following code :
=================
dim s as string
dim t as type
s = "Panel"

I want that :
t = GetType(Panel)
(But on the following code, I have send a type parameter.
I want to send a string parameter).

How can I do that ?

Thanks

"Herfried K. Wagner [MVP]" <hirf-spam-me-(E-Mail Removed)> wrote in message
news:hvb79d$rps$(E-Mail Removed)...
> Am 16.06.2010 21:00, schrieb Mr. X.:
>> In VB.NET (VS 2008) :
>> How can I resolve the control type, by knowing it's name only.
>> I.e : Panel.

>
> The name of the type or the name of a control?
>
> --
> M S Herfried K. Wagner
> M V P <URL:http://dotnet.mvps.org/>
> V B <URL:http://dotnet.mvps.org/dotnet/faqs/>


 
Reply With Quote
 
Armin Zingler
Guest
Posts: n/a
 
      16th Jun 2010
Am 16.06.2010 22:27, schrieb Mr. X.:
> I have the name of type.
> As the following code :
> =================
> dim s as string
> dim t as type
> s = "Panel"
>
> I want that :
> t = GetType(Panel)
> (But on the following code, I have send a type parameter.
> I want to send a string parameter).
>
> How can I do that ?


The name "panel" is not unique. A class of that name can be
in many namespaces and in many assemblies (dlls). Therefore you
must specify more details.

Have a look here: (also read the parameter description)
http://msdn.microsoft.com/en-us/library/w3f99sx1(VS.90).aspx

Also:
http://msdn.microsoft.com/en-us/library/y0cd10tb(VS.90).aspx

--
Armin
 
Reply With Quote
 
Mr. X.
Guest
Posts: n/a
 
      17th Jun 2010
I looked, as your advise, at the links.
For the second one : I should do something for instance, because instance
should not be nothing.

I know the dlls (or the namespace) for the object.
I need an example, please. Specifically for Panel, in order to understand
something about.

Thanks

 
Reply With Quote
 
Mr. X.
Guest
Posts: n/a
 
      17th Jun 2010
.... I meant Panel in : System.Windows.Forms.Panel

"Mr. X." <nospam@nospam_please.com> wrote in message
news:(E-Mail Removed)...
> I looked, as your advise, at the links.
> For the second one : I should do something for instance, because instance
> should not be nothing.
>
> I know the dlls (or the namespace) for the object.
> I need an example, please. Specifically for Panel, in order to understand
> something about.
>
> Thanks


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Issues with EML file with content-type tnef. How to resolve? Gregory Gadow Windows Vista Mail 3 16th Jun 2009 06:57 AM
behaviour depends on profile-type, how to resolve this? tingelton Microsoft Windows 2000 Registry 1 3rd Jul 2006 04:11 PM
Application behaviour depends on profile-type, how to resolve this? tingelton Windows XP General 0 3rd Jul 2006 10:43 AM
How can I resolve error: Could not load type... Dean R. Henderson Microsoft ASP .NET 1 28th Nov 2005 11:42 PM
How to resolve alias to Namespace or type in C# Joe Bloggs Microsoft C# .NET 5 7th Mar 2005 03:12 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:54 AM.