Windows API代码包v1.1 [英] Windows API Code Pack v1.1

查看:96
本文介绍了Windows API代码包v1.1的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

CommonOpenFileDialog类的实现似乎存在明显的不一致。文档说有一个SelectionChanged事件,可以附加一个处理程序。我已经完成了这件事并且事件发生了。到目前为止一直这么好!



但是,似乎没有任何方法可以确定用户在打开或取消之前选择了哪个文件按下按钮。我想使用所选项目在一个额外的控件或两个我已添加到对话框的控件成员中的控件中显示一些信息。控件显示,但无法使用所选文件信息更新这些控件。



那么...... SelectionChanged事件的故事是什么?

There appears to be a glaring inconsistency in the implementation of the CommonOpenFileDialog class. Documentation says that there is a SelectionChanged event to which a handler can be attached. This I have done and the event itself fires. So far so good!

However, there doesn't appear to be any way in which I can determine which file has been selected by the user before the Open or Cancel buttons are pressed. I want to use the selected item to display some information in an extra control or two that I have added to the Controls member of the dialog. The controls display, but there is no way of using the selected file information to update these controls.

So... what's the story with the SelectionChanged event?

推荐答案

似乎并不重要。我已经尝试过使用VS2008,2010和2012的C#和VB.NET



我所说的是,有一个事件,但没有属性可以询问会使事件有用。
Doesn't appear to matter. I've tried C# and VB.NET using VS2008, 2010 and 2012

All I'm saying is, that there's an Event but there are no properties that can be queried that would make the Event useful.


这篇关于Windows API代码包v1.1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆