有的程序再运行以后,还可以将它本身删掉,vb可以实现吗? 我想再程序里面点一个按钮(比如移除按钮)就可以将该程序的exe文件从硬盘上删除,用VB不知道怎么实现,情各位大虾帮忙!谢谢先! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 只能用自删除批处理。Option ExplicitPrivate Sub Form_Unload(Cancel As Integer) Dim i As Integer Dim strBatFile As String strBatFile = App.Path & "\" & App.EXEName & ".bat" i = FreeFile Open strBatFile For Output Access Write As #i Print #i, "Sleep 10" Print #i, "Del """ & App.Path & "\" & App.EXEName & ".exe""" Print #i, "Del """ & strBatFile & """" Close (i) Shell Environ$("comspec") & " /c """ & strBatFile & """", vbMinimizedFocus EndEnd Sub 求一个EXE文件 VB 里面的FILE类型 恳求VB的数据通信程序 VB中怎么样获取鼠标选取的文本,类似于划词的方法 如何使无边框窗口最大化后不遮住任务栏呀? 超大位图的处理:矩形区域图像内容保存为bmp文件 连接SQLSERVER问题,高手急救 怎样用代码让窗体启动时,显示为固定大小? 小小问题:) 用vb打印的问题 需急救 谢谢 有人用过MS Agent吗?有几个问题想请教 高分求教 数学问题 绝对给分
Dim i As Integer
Dim strBatFile As String
strBatFile = App.Path & "\" & App.EXEName & ".bat"
i = FreeFile
Open strBatFile For Output Access Write As #i
Print #i, "Sleep 10"
Print #i, "Del """ & App.Path & "\" & App.EXEName & ".exe"""
Print #i, "Del """ & strBatFile & """"
Close (i)
Shell Environ$("comspec") & " /c """ & strBatFile & """", vbMinimizedFocus
EndEnd Sub