FontDialog类继承自CommonDialog,没有Location及Size属性,其他自CommonDialog派生的类,如ColorDialog、FileDialog等也是如此。
API函数GetWindowRect、SetWindowPos可以获取和设置窗体的位置和大小。
1
using System;
2
using System.Drawing;
3
using System.Windows.Forms;
4
using System.Runtime.InteropServices;
5
6
class FontDialog : System.Windows.Forms.FontDialog
7
相关文章:
-
2021-10-09
-
2021-10-28
-
2021-11-23
-
2022-12-23
-
2022-12-23
-
2021-12-21
-
2022-12-23
-
2022-12-23