• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 158
  • Last Modified:

How to know control type ?

Hi,

I have a module that create a dynamic control and one of the parameter is the control object to be clone.
I want to know the type of the control object ("textbox", "combobox", etc..).

Thank you.
0
emi_sastra
Asked:
emi_sastra
  • 5
  • 5
1 Solution
 
Fernando SotoCommented:
Hi emi_sastra;

In VB .Net:

        ' The control type name as a string
        Dim strTypeName As String = obj.GetType().Name
        ' The control type as a Type object
        Dim objType As Type = obj.GetType()

Fernando
0
 
Fernando SotoCommented:
In VB 6

If TypeOf controlObject Is TextBox then
    ' It is a text box control
End If

If TypeOf controlObject Is ComboBox then
    ' It is a combo box control
End If

0
 
emi_sastraAuthor Commented:
Thank you.
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
Fernando SotoCommented:
Is there a reason why you assigned a grade of B and not an A?
0
 
emi_sastraAuthor Commented:
I think this question is not a simple question and do not need long answer.

I usually give an "A" grade when the question required long explanation and provide sample to solve it.

I don't it is fair for you or not?

Hope this make you clear.

Thank you.
0
 
emi_sastraAuthor Commented:
Sorry, I meant :

I think this question is a simple question and do not need long answer.

I usually give an "A" grade when the question required long explanation and provide sample to solve it.

I don't know it is fair for you or not?

Hope this make you clear.

Thank you.
0
 
Fernando SotoCommented:
These are the grading guide lines at Experts Exchange, please read. The experts answering questions are not paid employees of Experts Exchange but are volunteers. One way I gage the askers appreciation of my work is by the grade I am given by them.

Grade quickly and fairly

It is your responsibility to manage your questions, and to close them, in due course. That doesn't mean you have to take the first answer that comes along if it doesn't resolve the issue, but it does mean that the Moderators pay attention to people who don't close their questions. The Moderators consider abandoning questions to be an "abuse of the points system" and grounds for suspension.

Grading at Experts Exchange is not like school. It's more like the "10-point Must" system in professional boxing; in other words, an answer is worth an A, unless it doesn't resolve your issue. If it requires you to do a little more research, or figure out one more piece of code, then it's worth a B. If you think it's not worth a B, the custom is to offer the Experts an opportunity to earn a better grade.

When you give a C, it shows up as part of your grading record. If you show a pattern of giving low grades, many Experts will simply avoid your questions. For more information about grading, please see the section regarding

The above was found in the Experts Exchange help page on the following link.
http://www.experts-exchange.com/help.jsp#hi55

What's the right grade to give?

Although we use an A-C scale here at Experts Exchange, it works differently than, say, school grades. If one or more Experts' proposals are accepted as answers, they should usually be given an A or B grade, since they have taken the time to provide you with a working solution. If a possible solution is incomplete, ask for clarification or details before accepting the answer and grading it. People should not be given lower grades because of incorrect grammar or because you just accepted their answer or comment to close the question. The following is a good guideline to follow when grading:

    * A: The Expert(s) either provided you with a thorough answer or they provided you with a link to information that thoroughly answered your question. An "A" can also be given to any answer that you found informative or enlightening beyond the direct question that you asked.
    * B: The Expert(s) provided an acceptable solution, or a link to an acceptable solution, that you were able to use, although you may have needed a bit more information to complete the task.
    * C: Because Experts' reliability are often judged by their grading records, many Experts would like the opportunity to clarify if you have questions about their solutions. If you have given the Expert(s) ample time to respond to your clarification posts and you have responded to each of their posts providing requested information; or if the answers, after clarification, lack finality or do not completely address the issue presented, then a "C" grade is an option. You also have the option here of just asking Community Support to delete the question.

Remember, the Expert helping you today is probably going to be helping you next time you post a question. Give them a fair chance to earn an 'Excellent!' grade and they'll provide you with some amazing support. It's also true that a "C" is the lowest grade you can give, and the Experts know that -- so use it judiciously.

The use of a C in a vindictive manner is likely to be changed by a Moderator. You may not like the answer you get, and in some cases, and you may not like the way it is delivered, but if it is deemed to be accurate, no less than a B is an acceptable grade.

The above was found in the Experts Exchange help page on the following link.
http://www.experts-exchange.com/help.jsp#hi73
0
 
emi_sastraAuthor Commented:
Sorry, I didn't read the grading guide lines.

Thank you for remind me. I should give you "A" grade according to the rules.

What should I do?

Thank you.

0
 
Fernando SotoCommented:
No need to do anything for this question. But for future questions it would be great to keeping with the grading guide lines.
0
 
emi_sastraAuthor Commented:
Ok. Thank you.
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

  • 5
  • 5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now