473,480 Members | 1,918 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How to tell the type of a user-defined control on a windows form

I think if the object type of the control is not System.Windows.Forms.xxx,
then it is a user-defined control. But how to tell the type of the
user-defined control: Composite(User), Extended, and Custom?
Aug 24 '07 #1
2 1671
Peter wrote:
I think if the object type of the control is not System.Windows.Forms.xxx,
then it is a user-defined control.
Probably, but not guaranteed. You can create user-defined controls in
the S.W.Forms namespace: ;-)

Namespace System.Windows.Forms
Class GoButton
Inherits Button
But how to tell the type of the user-defined control:
Composite(User), Extended, and Custom?
Ask the control what Type it is!

Dim ctl As Control = ...

If TypeOf ctl Is Extended Then
With DirectCast( ctl, Extended )
. . .
End With
ElseIf Typeof ctl Is Custom Then
. . .
End If

HTH,
Phill W.
Aug 28 '07 #2
On Aug 24, 6:02 pm, Peter <Pe...@discussions.microsoft.comwrote:
I think if the object type of the control is not System.Windows.Forms.xxx,
then it is a user-defined control. But how to tell the type of the
user-defined control: Composite(User), Extended, and Custom?
Didn't you ask this same question a week ago?

Thanks,

Seth Rowe

Aug 31 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
3722
by: lawrence | last post by:
How do I get PHP to tell the server that when I echo text to the screen, I need for the text to be sent as UTF-8? How does Apache know the right encoding when all the text is being generated by...
2
3066
by: Paul | last post by:
I need to insert a row into a table in SQL Server 2000. The primary key for the row is an identity type, so it auto-numbers for me without needing to put in the value in the insert statement. ...
17
4860
by: Mike A | last post by:
Hi, I'm hoping someone can help me with this. I have a URL for which I'd like to limit access to by time. For example,say I have a URL that I don't want accessable on Monday mornings between...
2
8287
by: Richard Bell | last post by:
Newbie question ... please respond to group I'm trying to open/navigate to a url. How can I tell when the page is fully loaded? Testing suggest that window.open returns before the page is...
1
1829
by: Brent Grooms | last post by:
Does anyone know how to tell if a local user account on a member server is disabled using the directoryservices dll and vb.net? I know since it is not an LDAP server that i will have to use the...
2
1619
by: marco | last post by:
the problem: I use a typedef inside a class template, than I use this type (dim_v<N1>::Type) to define the argument of a template function f but when I call this function from main, the compiler...
6
2364
by: Fan Ruo Xin | last post by:
Please don't tell me using DB2LOOK. I only found the following difference when I checked the SYSCAT.TABLES. tabname TYPE STATUS PROPERTY -------- ---- ------ --------------------------------...
2
10533
by: Jozef | last post by:
Hello, I'm trying to find a way to see who or how many connections, (or both) are open on a single access database. What I'm trying to do is find out who is logged in and hopefully...
1
1682
by: Charles Sanders | last post by:
I am not sure if this is the right forum to ask this. If it is not, could someone pleas point me to a more appropriate newsgroup. I am attempting to install dap.plugins.netcdf using easy_install...
4
8755
by: =?Utf-8?B?RGF2aWQgVGhpZWxlbg==?= | last post by:
Hi; If I have an XPathNavigator object and for a given xpath statement need to know if the node exists, how should I do this? I have found for some xpath functions it returns an empty string if...
0
7050
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
6743
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
6966
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5344
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4488
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
2999
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
2988
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1303
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
185
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.