开发手记(六)——共享软件注册程序编写实例(1)[2]

[入库:2006年2月23日] [更新:2007年3月24日]

本文简介:

    Dim API_sPath As String * 256 '必需256长

    PathSize = GetWindowsDirectory(API_sPath, Len(API_sPath))

    sPath = Left$(API_sPath, PathSize) '从字符串API_sPath的左侧开始,取PathSize个字符(去除API_sPath的右侧的空格)

    '************更改系统时间,来实现隐藏注册库的修改时间**********

            Dim DateTemp

            Dim MyDate

            Dim TimeTemp

            Dim MyTime

            MyDate = #**/**/****#

            MyTime = #**:**:** PM#

            DateTemp = Date

            TimeTemp = Time

            Date = MyDate

            Time = MyTime

    '****查找是否存在***库,如不存在创建***库,启动注册窗体************

    If Dir(sPath & "\***.***") = "" Then

        Set ws = DBEngine.Workspaces(0)

        Set db = ws.CreateDatabase(sPath & "\***.mdb", dbLangGeneral) 'dbLangGenral是一个常数,用来确定数据驱动程序支持的语言类别

本文关键:开发手记(六)——共享软件注册程序编写实例(1)
  相关方案
Google
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top