1。怎样删除我创建的临时文件,比如在C:\111.bmp
2。我的程序能够在win98下调用“画图”工具,用的路径是直接的路径,如果我的程序安装到winnt或者是winxp之中的话"画笔"工具的目录是不一样的,我怎样才能找到他呢????

解决方案 »

  1.   

    1.kill "C:\111.bmp"
    2.
    Option ExplicitPrivate Declare Function GetSystemDirectory Lib "kernel32" Alias "GetSystemDirectoryA" (ByVal lpBuffer As String, ByVal nSize As Long) As LongPrivate Sub Form_Load()
        'KPD-Team 1998
        'URL: http://www.allapi.net/
        'E-Mail: [email protected]
        Dim sSave As String, Ret As Long
        'Create a buffer
        sSave = Space(255)
        'Get the system directory
        Ret = GetSystemDirectory(sSave, 255)
        'Remove all unnecessary chr$(0)'s
        sSave = Left$(sSave, Ret)
        'Run MSPAINT.EXE
        Shell sSave & "\MSPAINT.EXE", vbNormalFocus
    End Sub