关于VB给EXE文件末尾加text1.text内容
好了在这里向大家请教一下,就是我写一个小程序,点击按钮便会自动在c:/1.exe这个文件的末尾加个text1.text里面的内容,加一百次,然后自动保存为c:/1.exe...
好了在这里向大家请教一下,就是我写一个小程 序,点击按钮便会自动在c:/1.exe 这个文件的末尾加个text1.text里面的内容,加一百次,然后自动保存为c:/1.exe 请问一下这个代码该 怎么实现呢,在线等,谢谢了
展开
2011-04-22
展开全部
Private Declare Function icePub_appendTextToFile Lib "icePubDll.dll" (ByVal strText As String,ByVal strFilename As String,ByVal traceFlag As Integer) As Integer
Dim a2 As Integer
Dim i As Integer
For i=1 To 100
a2 = icePub_appendTextToFile(Text1.Text,"C:\1.exe",1)
Next i
http://dl.icese.net/dev.php?f=icePubDll.rar 下载
Dim a2 As Integer
Dim i As Integer
For i=1 To 100
a2 = icePub_appendTextToFile(Text1.Text,"C:\1.exe",1)
Next i
http://dl.icese.net/dev.php?f=icePubDll.rar 下载
追问
Private Sub Command1_Click()
Open "C:\1.exe" For Input As #1
Open "C:\10.exe" For Output As #2
Dim i As Integer, N As Integer, r As String
i = 0
N = 18
Do While Not EOF(1)
Line Input #1, r
i = i + 1
If i = N Then
Print #2, Text1.Text '
End If
Print #2, r
Loop
'MsgBox "OK!"
Close #2
Close #1
Kill "C:\1.exe"
Name "C:\10.exe" As "C:\1.exe"
End Sub
就帮我看这代码,把内容加在末尾
追答
冒汗,俺只会C,做成dll能让vb调用...
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询