博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2009年11月24日

摘要: Option ExplicitPrivate Sub Form_Load() getProcessCommandLine "notepad.exe"End SubPrivate Sub getProcessCommandLine(ByVal proName As String) Dim objWMIService As Object Dim colProcessList As Object Dim objProcess As Object Dim objProType As Object Set objWMIService = GetObject("winmgmts:" & "{imperso 阅读全文

posted @ 2009-11-24 16:42 随风飘零0 阅读(195) 评论(0) 推荐(0) 编辑

摘要: Option ExplicitPrivate Sub Form_Load() getProcessCommandLine "iexplore.exe"End Sub'得到所有进程名为proName的详细列表,参数一定要写完整。Private Function getProcessCommandLine(ByVal proName As String) As String Dim objWMIService As Object Dim colProcessList As Object Dim objProcess As Object Dim objProType As 阅读全文

posted @ 2009-11-24 16:42 随风飘零0 阅读(357) 评论(0) 推荐(0) 编辑

摘要: Public Function SaveFile(FileName As Variant, strFileBody As Variant) As BooleanOn Error GoTo err1 Dim ADO_Stream As Object Set ADO_Stream = CreateObject("ADODB.Stream") With ADO_Stream .Type = 2 .Mode = 3 .Charset = "utf-8" .Open .WriteText strFileBody .SaveToFile FileName, 2 End With SaveFile = 阅读全文

posted @ 2009-11-24 16:04 随风飘零0 阅读(254) 评论(0) 推荐(0) 编辑