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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T02:46:20+00:00 2026-05-14T02:46:20+00:00

Is there something like SESSION in Windows application? I want to store a few

  • 0

Is there something like SESSION in Windows application? I want to store a few values to be persistent between forms.

For example: First form has some check boxes and third form process them accordingly. So I need to store the checked checkboxes somewhere.

  • 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-14T02:46:21+00:00Added an answer on May 14, 2026 at 2:46 am

    You could only expose your CheckBoxes Checked state through properties of this form where you put your CheckBoxes on, and access these properties from your third or Process form.

    public partial class MainForm : Form {
        // We assume we have let's say three CheckBoxes named chkFirst, chkSecond and chkThird
        public bool IsFirstChecked { get { return chkFirst.Checked; } }
        public bool IsSecondChecked { get { return chkSecond.Checked; } }
        public bool IsThirdChecked { get { return chkThird.Checked; } }
    
        // Calling this form from where these checked states will be processed...
        // Let's suppose we have to click a button to launch the process, for instance...
        private void btnLaunchProcess(object sender, EventArgs e) {
            ProcessForm f = new ProcessForm();
            f.Parent = this;
            if (DialogResult.OK == f.ShowDialog()) {
                // Process accordingly if desired, otherwise let it blank...
            }
        }       
    }
    
    public partial class ProcessForm : Form {
        // Accessing the checked state of CheckBoxes
        private void Process() {
            if ((this.Parent as MainForm).FirstChecked)
                // Process according to first CheckBox.Checked state.
            else if ((this.Parent as MainForm).SecondChecked)
                // Process according to second CheckBox.Checked state.
            else if ((this.Parent as MainForm).ThirdChecked)
                // Process according to third CheckBox.Checked state.
        }
    }
    

    Please consider that I picked this code up the top of my head, so it might happen not to compile. Anyway, I hope that this gives you an idea of how to pass your values throughout your forms.

    The biggest difference between Web and WinForm programming is that Web is stateless. SESSION and VIEWSTATE are workarounds to allow one to preserve values.

    WinForms are stateful, so you don’t need to go through SESSION and VIEWSTATE-like variables. A value is preserved as long as the object exists.

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

Sidebar

Related Questions

Good Evening, I'm building a website which will will look something like this: So
Is there a way to retry an ASIHTTPRequest? I'm using custom authentication in a
Is there a way to use the facebook connect api in a static way?
In my application, I need to talk to multiple databases. I am handling this
I'm writting simple Swing application. I can't uderstand why column name isn't displayed? Here
I have a class that holds the size and position of something I draw
I've just started using Dapper for a project, having mostly used ORMs like NHibernate
Can someone explain to me how to set up cookieless domain? There are many
I might have my terminology incorrect in the title using the word singleton. I
Wondering how some of the more experienced (or anyone with a better idea than

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.