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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T02:39:47+00:00 2026-05-27T02:39:47+00:00

I am having a problem with thinking of a way that would let me

  • 0

I am having a problem with thinking of a way that would let me pass a selected file to another form.

I am trying to select a file in Form 1 by using Open File Dialog and then pass the same file to Form 2 in which I will try to add another entry into a file.

The problem is that I am nnot sure what I should be passing. Should I pass only openFileDialog.FileName or I need to pass more than just this?

I was thinking of this all day today but I don’t know how should I do this? Which parts of Open File Dialog should I pass over?

Or.. I might just thinking too hard of this problem. Please clear my mind.

  • 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-27T02:39:48+00:00Added an answer on May 27, 2026 at 2:39 am
            public partial class Form1 : Form
            {
                Form2 frm2;
                public Form1()
                {
                    InitializeComponent();
                    frm2 = new Form2();
                }
                private void btnOpenFile_Click(object sender, EventArgs e)
                {
                    if (openFileDialog1.ShowDialog() == DialogResult.OK)
                    {
                        frm2.FileName = openFileDialog1.FileName;
                        frm2.Show();
                    }
                }
            }
    
        public partial class Form2 : Form
        {
            string _fileName = "";
             public string FileName
            {
                get
                {
                    return this._fileName;
                }
                set
                {
                    this._fileName = value;
                }
            }
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been thinking/searching for an equivalent of the problem that I am having below,
I'm having problems thinking of a way to split numbers of string. What I
Maybe I'm just thinking about this too hard, but I'm having a problem figuring
I'm having a bit of trouble thinking of an idea to solve my problem.
For some reason, I am having trouble thinking of a good way to rewrite
An interesting problem occured recently, and I've been thinking of the best way (for
Having problem with the middle Div not expanding to the width http://acs.graphicsmayhem.com/images/middiv.jpg Ok, how
Im having problem extending the life of my session. I tried //start sessions ini_set('session.gc-maxlifetime',
I'm having problem about web service method with auto increment ID. I have a
We're having problem with a huge number of legacy stored procedures at work. Do

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.