恍惚之间

梦...

2006年11月23日

3种创建数据库的方法

摘要: -------还原数据库RESTORE DATABASE [" + 新数据库名 + "] FROM DISK = N'" + 备份文件路径+ "' WITH FILE = 1, NOUNLOAD , STATS = 10, RECOVERY , MOVE N'" + Data文件名 + "' TO N'" + 存放DATA文件的绝对路径+ "', MOVE N'" + Log文件名 ... 阅读全文

posted @ 2006-11-23 21:10 Red Hu 阅读(904) 评论(0) 推荐(0) 编辑

通用对话框

摘要: Dim openFileDialog_ScriptFile As New System.Windows.Forms.OpenFileDialog '通用对话框,选择文件 If openFileDialog_ScriptFile.ShowDialog() = DialogResult.OK Then 'DialogResult.OK 确定 ... 阅读全文

posted @ 2006-11-23 20:55 Red Hu 阅读(169) 评论(0) 推荐(0) 编辑

Invoke("stop", Nothing)关闭某端口

摘要: Try Dim root As DirectoryEntry = New DirectoryEntry("IIS://localhost/W3SVC") Dim siteID As Integer = 1 Dim e As New DirectoryEntry For Each e In root.Chil... 阅读全文

posted @ 2006-11-23 20:52 Red Hu 阅读(362) 评论(0) 推荐(0) 编辑

循环修改WEB.CONFIG

摘要: For Each Node In XmlDocument.Item("configuration").Item("appSettings") If Node.Name = "add" Then If Node.Attributes.GetNamedItem("key").Value = "SQLConnString" Then ... 阅读全文

posted @ 2006-11-23 20:49 Red Hu 阅读(376) 评论(0) 推荐(0) 编辑

安装目录写入注册表(不知道有简单方法没..脑子不好使)

摘要: Dim regist As RegistryKey = Registry.LocalMachine Dim reg As RegistryKey Dim regkey As String = "SOFTWARE" reg = regist.OpenSubKey(regkey, True) reg.CreateSubKey("TCKJ")... 阅读全文

posted @ 2006-11-23 20:47 Red Hu 阅读(311) 评论(0) 推荐(0) 编辑

ShowMyDialogBox

摘要: Public Sub ShowMyDialogBox() Dim testDialog As New Form2() ' Show testDialog as a modal dialog and determine if DialogResult = OK. If testDialog.ShowDialog(Me) = System.Windows.Forms.Dial... 阅读全文

posted @ 2006-11-23 20:44 Red Hu 阅读(215) 评论(0) 推荐(0) 编辑

你让我痛快,我才让你爽!(呵呵仗义的兄弟)

摘要: (转:http://chinapcc1978.spaces.live.com/PersonalSpace.aspx?_c02_owner=1) 你让我痛快,我才让你爽! 我去换50张20的人民币,用来发小红包。 于是拿了1000去银行换,那小子态度极其不好的说“没有,不能换给你”呵!态度实在恶劣啊。 我十分凶恶的反问“你再说一次” 那... 阅读全文

posted @ 2006-11-23 20:42 Red Hu 阅读(235) 评论(0) 推荐(0) 编辑

C#操作注册表(不错的东东)

摘要: (转...) C#操作注册表 以下从‘读’‘写’‘删除’‘判断’四个事例实现对注册表的简单操作 1.读取指定名称的注册表的值 程序代码private string GetRegistData(string name) { string registData; RegistryKey hkml = Registry.LocalMachine; RegistryKey software = hkm... 阅读全文

posted @ 2006-11-23 20:36 Red Hu 阅读(219) 评论(0) 推荐(0) 编辑

导航