• 0

[C#] - Events for a OpenFileDialog


Question

Hello,

I have a simple form that has an OpenFileDialog() . I'm looking to perform an event when the user clicks Open, after selecting a file.

I took a peek at OpenFileDialog.FileOK, does this handle 'Open' ?

Specifically, I am loading data from a file, I need a graphical component to draw afterwards based upon the data it pulls from the selected file in the OpenFileDialog

If not, which event will will I be looking at?

Link to comment
https://www.neowin.net/forum/topic/675972-c-events-for-a-openfiledialog/
Share on other sites

2 answers to this question

Recommended Posts

  • 0
  AaronMT said:
Hello,

I have a simple form that has an OpenFileDialog() . I'm looking to perform an event when the user clicks Open, after selecting a file.

I took a peek at OpenFileDialog.FileOK, does this handle 'Open' ?

Specifically, I am loading data from a file, I need a graphical component to draw afterwards based upon the data it pulls from the selected file in the OpenFileDialog

If not, which event will will I be looking at?

OpenFileDialog is modal, so it suspends the window that opens it until a selection is made or it's canceled. I don't think I've ever used the events for the dialog. ReDwAvE's sample code should do what you need. :)

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.