1

480*800の垂直画面を備えたハンドヘルドx86デバイス用の.NETアプリケーションに取り組んでいます。ファイルを開く/ファイルを保存するデザインを除いて、すべてがうまく機能します。デフォルトOpenFileDialogおよび他の同様のダイアログは、表示時に幅が大きすぎるため、[開く]ボタンが部分的に画面から外れ、[キャンセル]ボタンが完全に外れます。実際には、ユーザーは表示された後にダイアログのサイズを変更できますが、幅が480より大きい最小サイズが存在します。

As far as I can see there's no way to manipulate OpenFileDialog directly, nor to do any inheritance. The FileDialog which OpenFileDialog inherits from is not inheritable. And CommonDialog looks too far away. Googling shows some commercial dialog components which has lot of functions I don't want, a hacking solution ends up with a project with at least 4 brand new classes and some Win32 APIs and messaging mechanics i don't need either.

It's very simple, I just want a simple way to fix the width of OpenFileDialog to 480 or smaller. Any way around this?

4

1 に答える 1

1

ファイルを開くダイアログはシステム ダイアログです。これは、アプリケーションがそれを制御できないことを意味します。ユーザーによって制御されます。ユーザーが 1 つのアプリケーションでサイズを変更したい場合、このサイズはユーザーの好みであるため、すべてのアプリケーションで新しいサイズになります。

共通ダイアログの目的は、標準の UI パーツをユーザーに提供することです。すべてのアプリケーションが独自の OpenFileDialog を使用する場合、ユーザーが開くファイルを検索するのがどれほど不快になるか想像してみてください。

ただし、独自のダイアログを作成できます。

于 2012-04-12T21:50:50.557 に答える