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

  • SEARCH
  • Home
  • 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 7601027
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T23:04:09+00:00 2026-05-30T23:04:09+00:00

I have a custom VB.NET control that I created that is working correctly in

  • 0

I have a custom VB.NET control that I created that is working correctly in one program but not in another. The control has one button and one form. The form displays some data based on the settings in the control.

This is the use in both test projects:

With Me.MyControl1
    '.Connection = gConn
    .Server = "servername"
    .DBName = "dbname"
    .TableName = "table"
    .FieldString = "list of fields"
    .ReturnColumn = 0
    .AllowMultiSelect = True
End With

This is how I am passing the settings to my form.

…this form is a part of the control

Public Sub New(ByVal cmsl As MyCustomControl)
    ' This call is required by the Windows Form Designer.
    InitializeComponent()
    ' Add any initialization after the InitializeComponent() call.
    Me.Connection = cmsl.Connection
    Me.ConnectionString = cmsl.ConnectionString
    Me.Server = cmsl.Server
    Me.DBname = cmsl.DBName
    Me.TableName = cmsl.TableName
    Me.FieldString = cmsl.FieldString
    Me.FilterString = cmsl.FilterString
    Me.AllowMultiSelect = cmsl.AllowMultiSelect
    Me.AutoPopulate = cmsl.AutoPopulate
    Me.ReturnColumn = cmsl.ReturnColumn
    Me.SelectTop = cmsl.SelectTop

End Sub

In TestProject1 – the control is working as expected
In TestProject2 – the control is not sending any of the settings I set to the form

My control works fine when I debug with the UserControl TestContainer.

I am using VB.NET on VS2005.

This is all done on the same machine. Why would this work in one project and not another?

  • 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-05-30T23:04:10+00:00Added an answer on May 30, 2026 at 11:04 pm

    Seems like a reference error. please show us how the UserControl is integrated. The problem must come from there.

    And are you talking about a custom control, or a UserControl ? (Not the same thing for me)

    Try some breakpoints in the props, and also, try checking the references :). You might be working with a second usercontrol overlapping on the first one or something like that :).

    In winforms the Designer sometimes goes weird.

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

Sidebar

Related Questions

I have created a custom control using VB.NET in Visual Studio 2008 that gives
I have a custom control that inherits from .NET's CompositeControl class. This control overrides
I have created a simple Asp.Net custom control which automatically combines all the correct
I have a custom memebership provider that has served us well for asp.net web
I have a custom ASP.NET user control that is added to a panel on
I have a somewhat complex custom user control, created in C# .NET, which is
I support a .Net 2.0 Windows application that has a custom listview control to
I have a custom gridview control that extends the standard asp.net gridview control. The
I have created a custom web control to act as a button with an
I have an ASP.net page. That has an Ajax Toolkit Tab Control. That has

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.