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 8514147
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T04:46:54+00:00 2026-06-11T04:46:54+00:00

I’m currently attempting to make a program for a project I’m working on. I

  • 0

I’m currently attempting to make a program for a project I’m working on.

I use 2 UserForms that end up embedded into a parent WinForm.

What I need to do, and doesn’t seem to be working, is create a reference to my settings class, and have the user forms directly edit the variable. The data is stored using serialized XML

I have a class that controls the reading/writing of my xml files. It is first created in the ParentForm. I then have several dynamic controls that read from a List<> variable in a seperate user form. I then use that data to create another UserForm which allows me to view/edit those variables.

I can currently view them just fine, but I can’t edit the variables. I’m not very familiar with using references, as most of the time I use either events or just copy data from form to form, causing (what I feel) unnecessary overhead.

To better illustrate

WinForm -> Select Category -> Draw UserForm1 (Show Items in Category) -> Select Item -> Draw UserForm2 (edit items)

All Forms need access to the Settings variable in WinForm.

This is what I’m currently doing:

Edit form:

public partial class EditPage: UserControl
{
    public StorageClass refSettings;
    public EditPage(ref StorageClass pSettings)
    {
                  refSettings = pSettings;

Categories Form:

public partial class Categories: UserControl
{
    public StorageClass programSettings;
    public Categories(ref StorageClass pSettings)
    {
                  programSettings = pSettings;

That’s of course not the actual code, but the main thing I’m trying to do.
Any help would be awesome

Edit: I’m not getting any errors. The variable being passed down simply isn’t being updated. When I go to edit it, It simply reverts back after disposing the child editing form.

  • 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-11T04:46:56+00:00Added an answer on June 11, 2026 at 4:46 am

    You could have a common settings class, which reads configuration from the XML, which I belive you already have.
    Say you have a drop down selection which indicates which user control to load and display inside
    a panel in the MainForm, so you invoke the user control from the SelectionChangedEvent and pass the
    settings class to the constructor of the UserControls.
    You could also expose events in the UserControls and subscribe to those events from the MainForm
    to make any changes in the MainForm, depending on actions in the user controls.

    Say you want to edit something fire an event from the usercontrol and subscribe to that event in the MainParent Form and then make changes from the MainForm.

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want use html5's new tag to play a wav file (currently only supported
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I am currently running into a problem where an element is coming back from
I'm working with an upstream system that sometimes sends me text destined for HTML/XML
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I am trying to understand how to use SyndicationItem to display feed which is
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
this is what i have right now Drawing an RSS feed into the php,

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.