Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8709741
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T04:26:26+00:00 2026-06-13T04:26:26+00:00

I have an xml with control definitions <?xml version=1.0 encoding=utf-8?> <Controls> <TabControl> <Properties> <Dock>5</Dock>

  • 0

I have an xml with control definitions

 <?xml version="1.0" encoding="utf-8"?>
  <Controls>
   <TabControl>
     <Properties>
      <Dock>5</Dock>
     </Properties>
     <TabPage>
      <TextBox>
       <Properties>
        <Text>Id:</Text>
        <Location>106,12</Location>
        <Size>113,20</Size>
        <BorderStyle>2</BorderStyle>
       </Properties>
      </TextBox>
      <MyControl>
       <Properties>
        <Visible>True</Visible>
        <Location>106,33</Location>
        <Size>113,20</Size>
        <Enabled>True</Enabled>
        <BorderStyle>2</BorderStyle>
        <Text>Action:</Text>
        <TabIndex>0</TabIndex>
       </Properties>
      </MyControl>
     <Properties>
      <Text>Details</Text>
     </Properties>
    </TabPage>
   </TabControl>
  </Controls>

Ok. As you can see I have in this example One tabControl , with one TabPage. The TabPage has one TextBox and one MyControl.

I am able to read the xml and add all the controls except the MyControl.
The reason is that I cannot find the type.
Explain:
in order to run through the xml and add the controls I wan tot find what type it is. So I use this line of code:

   Dim oType As Type = FindType("System.Windows.Forms." & elem.Name.ToString)

FindType is a function I found here: Best way to get a Type object from a string in .NET

Unfortunately I cannot figure out what to add in this function to find MyControl.
MyControl is just a custom control added to my solution.

I know that I can use an if inside the FindType function

    if base is Nothing then
      if name.Contains("MyControl")Then
            base = GetType(MyControl)
        End If
    End If
      If base IsNot Nothing Then Return base

My problem is that I have 3 custom Controls and maybe in the future I will add more.
Is any way to have something generic?

Another question is that in FindType function I have to use “System.Windows.Forms.” for the name.
and I discovered that without it the function doesn’t return anything.
I am thinking that this is happened because I call that function when I am building the form , so not everything is loaded yet?

Thanks for your time

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T04:26:28+00:00Added an answer on June 13, 2026 at 4:26 am

    if FindType("System.Windows.Forms." & elem.Name.ToString) doesn’t find anything, just try FindType(elem.Name.ToString)

    it looks like the code for FindType in the question you linked should find it if you just pass only the name, since it looks at all the types in the executing assembly.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have XML like this: <?xml version=1.0 encoding=UTF-8?> <viewentries timestamp=20100923T130205,90Z toplevelentries=8903> <viewentry position=1 unid=A4958CC88435D1A8422577A7004422E8
I have this XML file: <?xml version=1.0 encoding=utf-8?> <Wpf> <wpfctrl id=NavBtnTemplate>#FFCFDEFF</wpfctrl> </Wpf> and i
I have an XML Sitemap like this <?xml version=1.0 encoding=utf-8 ?> <Menu> <MenuItem Name=Page
Picture the following situation. I have an XML document as follows, <Form> <Control Type=Text
Currently, I have this version of the autocomplete control working when returning XML from
I have added an easy compound control which loads its layout from a XML
xml.append(<alertDesc>); xml.append(desc); xml.append(</alertDesc>); response.getWriter().write(xml.toString()); response.setContentType(text/xml); response.setHeader(Cache-Control, no-cache); xml is a StringBuffer object. I have
I have some code that uses xsl and xml. The Xml control is on
I have XML that I need to parse but have no control over the
I have xml records with javascript code embedded in an element. Like: <?xml version=1.0

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.