登录
首页 » 界面开发 » WINFORM保存参数至本机注册表

WINFORM保存参数至本机注册表

于 2022-03-19 发布 文件大小:24.38 kB
0 210
下载积分: 2 下载次数: 1

代码说明:

实现在窗体关闭时将窗体中的参数保存变量至注册表,首先创建一个新的子路径,在子路径中创建变量, 如注册表中无此变量将自动创建,若下次有此变量时将更新变量。窗体再次载入时从注册表子路径读取 此变量信息,通过赋值给控件。 方法如下: private void Form1_Load(object sender, EventArgs e) //窗体载入时 { SetStyle(ControlStyles.SupportsTransparentBackColor, true); SetStyle(ControlStyles.AllPaintingInWmPaint, true); SetStyle(ControlStyles.UserPaint, true); SetStyle(ControlStyles.DoubleBuffer, true); this.Refresh(); this.ShowInTaskbar = false; this.PAN_1.Visible = false; int Z_alpha,Z_red,Z_green,Z_blue; //声明4个Int类型颜色变量 //this.TransparencyKey = Color.Transparent; RegistryKey myReg1, myReg2, myReg3;//声明注册表对象 myReg1 = Registry.CurrentUser;//获取当前用户注册表项 try

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • 类以于RealPlayer播放器中的多种显示模式(如:正常、精简模式)的实现方法...
    类以于RealPlayer播放器中界面的多种显示模式(如:正常、精简模式)的实现方法-category in a player RealPlayer interface of a variety of display modes (such as : normal, streamlining models) Method
    2022-02-24 21:21:30下载
    积分:1
  • 可是现在运行时动态创建Delphi组件,增加灵活性。
    可是现在运行时动态创建Delphi组件,增加灵活性。
    2022-02-12 08:45:22下载
    积分:1
  • 计算器
    // calc-ui-model/Calc.java -- Fred Swartz//     Level     : Intermediate.//     Structure : Three files: main, GUI (subclass of JFrame), logic.//     Components: JButton, JTextField (right justified).//     Containers: JFrame, several JPanels.//     Layouts   : BorderLayout to put the other panels together.//                 Two GridLayout panels for the buttons.//     Listeners : One ActionListener which is shared by all//                 numeric key buttons.  Similarly share//                 an ActionListener for all operator buttons.//
    2022-10-18 16:20:03下载
    积分:1
  • 本例讲述在MFC中类Cstring的一些基本用法,希望能给初学者帮助...
    本例讲述在MFC中类Cstring的一些基本用法,希望能给初学者帮助-the cases described in MFC category Cstring some basic usage, in hopes of giving help beginners
    2023-06-13 23:05:03下载
    积分:1
  • VC带颜色选择的组合框源码
    原组合框只能显示文本信息,不能显示颜色和图形。通过自定义组合框控件,改写DrawItem虚方法,实现根据项目的状态,绘制相应效果的颜色和文本的功能
    2022-01-26 03:06:10下载
    积分:1
  • 这是一个论文!毕业 的 学生 又 用 !
    这是一个论文!毕业 的 学生 又 用 !-This is a thesis! Graduating students used!
    2022-04-30 06:41:32下载
    积分:1
  • 运行后在屏幕上画出一个漂亮的大表,可以通过它调节系统时钟。...
    运行后在屏幕上画出一个漂亮的大表,可以通过它调节系统时钟。-After running on the screen to draw a pretty big table, you can adjust the system clock through it.
    2022-03-22 05:10:29下载
    积分:1
  • 列表框-滚动条更新(LV8.6).vi
    列表框-滚动条更新(LV8.6).vi,LAVIEW中关于多列列表框的使用,使用过程中,滚动条更新
    2022-03-22 11:20:19下载
    积分:1
  • Qt login,自动识别焦点
    #include "mainwindow.h" #include "ui_mainwindow.h" MainWindow::MainWindow(QWidget *parent) :     QMainWindow(parent),     ui(new Ui::MainWindow) {     ui->setupUi(this);     pushButton = new QPushButton(this);     pushButton->setObjectName(QString::fromUtf8("pushButton"));     pushButton->setGeometry(QRect(40, 180, 51, 27));     pushButton_2 = new QPushButton(this);     pushButton_2->setObjectName(QString::fromUtf8("pushButton_2"));     pushButton_2->setGeometry(QRect(40, 140, 51, 27));     pushButton_3 = new QPushButton(this);     pushButton_3->setObjectName(QString::fromUtf8("pushButton_3"));     pushButton_3->setGeometry(QRect(100, 140, 51, 27));   &
    2022-03-13 04:00:49下载
    积分:1
  • letter recognition very good
    letter recognition very good
    2022-03-09 09:21:17下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载