2012年5月11日

c#设置取消ie代理服务器

摘要: public struct Struct_INTERNET_PROXY_INFO { public int dwAccessType; public IntPtr proxy; public IntPtr proxyBypass; }; [DllImport("wininet.dll", SetLastError = true)] private static extern bool InternetSetOption(IntPtr hInternet, int dwOpt... 阅读全文

posted @ 2012-05-11 15:59 HOT SUMMER 阅读(1328) 评论(0) 推荐(0)

c# winform 自动关闭messagebox 模拟回车 .

摘要: using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using System.Runtime.InteropServices;namespace WindowsApplication1{ public partial class AutoDeleteMessageBox : Form { [DllImport... 阅读全文

posted @ 2012-05-11 15:43 HOT SUMMER 阅读(2734) 评论(0) 推荐(0)

C#如何跨窗体调用控件

摘要: 事件回调,看一点我的代码 在Form1里面写一个方法,用来修改label 在Form2里面写: public delegate void SetMainFormTopMostHandle(bool topmost); public event SetMainFormTopMostHandle SetMainFormTopMost; 声明一个委托和事件 然后在f2.Show()打开f2之前,加一句: Form2 f2 = new Form2 (); f2.SetMainFormTopMost += new Form2.SetMainFormTopMostHandle(MainForm_SetMa 阅读全文

posted @ 2012-05-11 15:41 HOT SUMMER 阅读(1447) 评论(0) 推荐(0)

导航