[c#]:如何在C#中读写INI文件(三)
来源:互联网 发布:生成器 python 编辑:程序博客网 时间:2024/05/21 07:06
using System ;
using System.Drawing ;
using System.Collections ;
using System.ComponentModel ;
using System.Windows.Forms ;
using System.Data ;
using System.Runtime.InteropServices ;
using System.Text ;
{
public class Form1 : System.Windows.Forms.Form
{
private System.Windows.Forms.Button button1 ;
private System.Windows.Forms.TextBox textBox1 ;
private System.Windows.Forms.Button button2 ;
private System.Windows.Forms.TextBox textBox2 ;
private System.Windows.Forms.TextBox textBox3 ;
private System.Windows.Forms.TextBox textBox4 ;
private System.Windows.Forms.Label label1 ;
private System.Windows.Forms.Label label2 ;
private System.Windows.Forms.Label label3 ;
private System.Windows.Forms.Button button3 ;
private System.Windows.Forms.OpenFileDialog openFileDialog1 ;
private System.ComponentModel.Container components = null ;
public Form1 ( )
{
INItializeComponent ( ) ;
}
protected override void Dispose ( bool disposing )
{
if ( disposing )
{
if ( components != null )
{
components.Dispose ( ) ;
}
}
base.Dispose ( disposing ) ;
}
[ DllImport ( "kernel32" ) ]
private static extern long WritePrivateProfileString ( string
section ,
string key , string val , string filePath ) ;
[ DllImport ( "kernel32" ) ]
private static extern int GetPrivateProfileString ( string section ,
string key , string def , StringBuilder retVal ,
int size , string filePath ) ;
private void INItializeComponent ( )
{
this.button1 = new System.Windows.Forms.Button ( ) ;
this.textBox1 = new System.Windows.Forms.TextBox ( ) ;
this.button2 = new System.Windows.Forms.Button ( ) ;
this.textBox2 = new System.Windows.Forms.TextBox ( ) ;
this.textBox3 = new System.Windows.Forms.TextBox ( ) ;
this.textBox4 = new System.Windows.Forms.TextBox ( ) ;
this.label1 = new System.Windows.Forms.Label ( ) ;
this.label2 = new System.Windows.Forms.Label ( ) ;
this.label3 = new System.Windows.Forms.Label ( ) ;
this.button3 = new System.Windows.Forms.Button ( ) ;
this.openFileDialog1 = new
System.Windows.Forms.OpenFileDialog ( ) ;
this.SuspendLayout ( ) ;
this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat ;
this.button1.Location = new System.Drawing.Point ( 238 , 20 ) ;
this.button1.Name = "button1" ;
this.button1.Size = new System.Drawing.Size ( 100 , 32 ) ;
this.button1.TabIndex = 0 ;
this.button1.Text = "选择INI文件" ;
this.button1.Click += new System.EventHandler ( this.button1_Click ) ;
this.textBox1.Location = new System.Drawing.Point ( 58 , 22 ) ;
this.textBox1.Name = "textBox1" ;
this.textBox1.Size = new System.Drawing.Size ( 162 , 21 ) ;
this.textBox1.TabIndex = 1 ;
this.textBox1.Text = "" ;
this.button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat ;
this.button2.Location = new System.Drawing.Point ( 86 , 168 ) ;
this.button2.Name = "button2" ;
this.button2.Size = new System.Drawing.Size ( 98 , 30 ) ;
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 728x15, 创建于 08-4-23MSDN */google_ad_slot = "3624277373";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
- [c#]:如何在C#中读写INI文件(三)
- [c#]:如何在C#中读写INI文件(三)
- 如何在C#中读写INI文件
- 如何在C#中读写INI文件
- 如何在C#中读写INI文件
- 如何在C#中读写INI文件
- 如何在C#中读写INI文件
- 如何在C#中读写INI文件
- 如何在C#中读写INI文件
- 如何在C#中读写INI文件
- 如何在C#中读写INI文件
- 如何在C#中读写INI文件
- 如何在C#中读写INI文件
- 如何在C#中读写INI文件
- [c#]:如何在C#中读写INI文件(一)
- [c#]:如何在C#中读写INI文件(二)
- [c#]:如何在C#中读写INI文件(四)
- [c#]:如何在C#中读写INI文件(五)
- 动画启动窗口的类(源码)
- 在ADO.NET中使用事务保护数据的完整性(2)
- 在C#使用XML注释
- DataGrid中鼠标单击行改变颜色
- 用vs.net创建webservice+flash简易计算器
- [c#]:如何在C#中读写INI文件(三)
- [c#]:如何在C#中读写INI文件(五)
- 在ADO.NET中使用事务保护数据的完整性(3)
- 微软首席架构师:PC时代结束 Web取而代之
- 使用VS.NET开发Web Services 简明教程
- 设计模式c#描述——装饰(Decorator)模式
- SharePoint 中列表的用户组权限
- C#中在应用程序和DLL使用消息
- 用异步方式解析域名