摘要:
public Form1() { this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; InitializeComponent(); } 阅读全文
摘要:
private void button1_Click(object sender, EventArgs e) { this.Hide(); Form2 f = new Form2(); f.ShowDialog(); } 阅读全文
摘要:
Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)"E:\\Documents and Settings\\Administrator.FYRV5GZ\\Application Data"Environment.GetFolderPath(Environment.SpecialFolder.CommonAppli... 阅读全文
摘要:
Add COM referenceWindows Script Host Object Model--------------- WshShell shell = new WshShell(); IWshShortcut shortcut = (IWshShortcut)shell.CreateShortcut(Environment.GetFolderPath(Environment.Speci... 阅读全文
摘要:
//引入API函数 [DllImportAttribute("user32.dll")] public static extern int FindWindow(string ClassName,string WindowName); [DllImport("user32.dll")] public static extern int ShowWindow(int handle, int cmdS... 阅读全文
摘要:
string message = "you did not enter a server name. cancel this operation?"; string caption = "no server name specified"; MessageBoxButtons buttons = MessageBoxButtons.YesNo; DialogResult result; // di... 阅读全文
摘要:
OpenFileDialog ofd = new OpenFileDialog(); ofd.Title = "打开(Open)"; ofd.FileName = ""; ofd.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);//为了获取特定的系统文件夹,可以使用 //Syst... 阅读全文
摘要:
Connectionstring:connectionString="Data Source=.;AttachDBFilename= aa.mdf;User ID=sa;Password=sa"AttachDBFilename = ... //automaticly attach the db connectionString="Data Source=.;database = aa.mdf;Us... 阅读全文
摘要:
import函数import mathmath.floor(32.9)from模块import函数from math import sqrtsqrt(9)使用了"from模块import函数"这种形式的import命令之后,就可以直接使用函数,而不需要模块名作为前缀。Defining Functions>>> def fib(n): ... a, b = 0, 1... whil... 阅读全文
摘要:
dpkg --get-selections|grep linux-imagesudo apt-get remove [内核文件名] 阅读全文