I made a secondary form named Form2 for my application in which the user can specify a Picture, Color and Text.
Now, on this Form2, after the user presses OK button, I want to send the the particulars to Form 1 and open it up.
For eg: If the user sets the color=Red, Picture=Img.gif, Text=Hi on Form2,
then the TextBox on Form1 should display Hi in red color and a picture in the PicBox in Form1.
See the documentation for System.Windows.Forms.OpenFileDialog (http://msdn.microsoft.com/en-us/libr...iledialog.aspx). A file dialog is used in the way you describe. It is instantiated, displayed, the user performs some action and the result is retrieved from the dialog by the calling code using public properties of the dialog. Make picture, colour and text public properties on Form2. Set them appropriately in the OK handler and then read them from Form1.
Bookmarks