-
To check if a control exists in the form
[Originally posted by Biju]
Dear all,
I am generating controls (say Labels) at runtime in VB. Before loading any control I want to see if the control has been already loaded or not. An error message comes when I try to load an existing control. How to check whether a control already exists in the form or not? Thanks.
Biju.
-
Re:To check if a control exists in the form
[Originally posted by gibra]
Choose one:
1st:
ÿ ÿ On Error Resume Next
ÿ ÿ Load Your_Control_Name
ÿ ÿ If Err.Number =361 Then
ÿ ÿ ÿ ÿ ' Your control is already
ÿ ÿ ÿ ÿ Err.Clear
ÿ ÿ End If
2nd:
ÿ ÿ If Your_Control_Name Is Nothing Then
ÿ ÿ ÿ ÿ Load Your_Control_Name
ÿ ÿ End If
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks