Jump to content
Xtreme .Net Talk

Recommended Posts

Posted
Forgive me if this question is rather simplistic but i'm relatively new to this. I'm making a windows app that involves opening and closing a lot of files. There is however more than one button on the form i've created that can be used to open the files. Is it ok to use the same openFileDialog component with each button or should i use a different dialog for each button? I'm only worried because i had the thought that using the same dialog might create some sort of conflict. :confused:
Posted

Despite the fact it would use more resources, each button should have it's own openfiledialog for the same reason as you stated... conflict.

 

I don't know how you're going to code it, but I can give you a scenario where it might be a pain... listening for events .e.g: FileOk. Once this event is triggered, it's going to send it to all of your buttons, how his the button going to to know which instance should handle this. To overcome that issue, extra, and code will have to be generated.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...