Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Controls declaration.

Posted on 2006-05-21
4
Medium Priority
?
171 Views
Last Modified: 2012-05-05
Hi,

Is it possible, in run-time, to check how a control is declared? (Friend, private, ...)

Using this code:

    for each ctl in form1.Controls
       ...
    next

I don't need the private controls of my form.  
So how to know if "ctl" is not private or protected?

Thanks!
0
Comment
Question by:slabrie99
  • 2
  • 2
4 Comments
 
LVL 44

Accepted Solution

by:
Arthur_Wood earned 500 total points
ID: 16734165
AFAIK, No, it is not possible to determine the 'scope' of a control at run-time.

AW
0
 

Author Comment

by:slabrie99
ID: 16735641
But how can I hide a child control of a userControl?  
Even if I set the control to private using the "Modifiers" property, I'm still getting the private control ...

    for each ctl in form1.userControl1.Controls
       ...
    next

0
 
LVL 44

Expert Comment

by:Arthur_Wood
ID: 16736072
sorry, can't help you with this one.

AW
0
 

Author Comment

by:slabrie99
ID: 16738883
Thanks anyway!
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question