When I double click on a slide, how do I pass the filename of a selected image in a form, to another form?

public void DblClickSld(object sender, System.EventArgs e)
        {
            frmZoom fZ = new frmZoom();

            MessageBox.Show((string)((AxSlide.AxSlide)sender).FileName.ToString());

            fZ.Show();
        }public void DblClickSld(object sender, System.EventArgs e)
        {
            frmZoom fZ = new frmZoom();

            MessageBox.Show((string)((AxSlide.AxSlide)sender).FileName.ToString());

            fZ.Show();
        }

That's the same when you ask how to pass value to another class. fz.SomeMethodTakeStringAsParameter(fileName) haa??

Or, in a more OO term you would either set the property of the second form - which has an associated event to triger the change in form 2.

I gave a parameter to the form on call.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.