1、消息对话框换行:Enviroment.NewLine
2、设置文件对话框的筛选器:"图像文件(Jpeg,Gif,Bmp,etc) | *.jpg;*.jpeg | 所有文件 *.* (*.*)"
3、在上次关闭位置启动程序窗体
  //设置窗体启动位置
  RegisterKey MyFirstReg,MyReg;
  MyFirstReg = Registry.CurrentUser;
  try
  {
    MyReg = MyFirstReg.CreateSubKey("software\\MySort");
    this.Location = new Point(Convert.ToInt16(MyReg.GetValue("1")),Convert.ToInt16(MyReg.GetValue("2")));
  }
  catch
  {}
  //保存窗体关闭位置
  RegisterKey MyFirstReg,MyReg;
  MyFirstReg = Registry.CurrentUser;
  MyReg = MyFirstReg.CreateSubKey("software\\MySort");
  try
  {
    MyReg.SetValue("1",this.Location.X.ToString());
    MyReg.SetValue("2",this.Location.Y.ToString());
  }
  catch
  {}

相关文章:

  • 2022-12-23
  • 2021-10-05
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-30
  • 2021-05-22
猜你喜欢
  • 2022-12-23
  • 2022-02-18
  • 2022-03-09
  • 2021-05-02
  • 2022-12-23
  • 2021-09-26
  • 2021-07-13
相关资源
相似解决方案