By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,919 Members | 1,600 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,919 IT Pros & Developers. It's quick & easy.

Detect when FileNameEditoris shown

P: n/a
I have a file path (i.e., String) property that uses a
System.Windows.Forms.Design.FileNameEditor as its
System.ComponentModel.Editor. This property is exposed by a PropertyGrid.
What I need to do is to detect when the Open File dialog is shown (when the
user clicks the ellipsis for that property) and when the dialog is closed so
that I can suspend certain events while the dialog is being displayed. Is
this possible?

Nov 21 '05 #1
Share this Question
Share on Google+
2 Replies

P: n/a

I think you may need to inherits the FileNameEditor class and override the
FileNameEditor.EditValue Method.
Because when we click in the propertygrid to modify the property, we will
invoke the File Dialog in the EditValue method of FileNameEditor class.

You may try to get the open and close as the form similar with below.
e.g. pcode

Hope this helps!

Best regards,

Perter Huang
Microsoft Online Partner Support

Get Secure! -
This posting is provided "AS IS" with no warranties, and confers no rights.

Nov 21 '05 #2

P: n/a
Great idea! Thanks.
Nov 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.