加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 大数据 > 正文

modPub.bas

发布时间:2020-12-16 23:31:51 所属栏目:大数据 来源:网络整理
导读:Attribute VB_Name = "modPub" Option Explicit Public strAppPath$ Public intFontSize As Integer Public strFontColor As String Public lngFontColor As Long Public strSplit As String Sub Main() strAppPath = App.Path If Right(strAppPath,1) "/" T

Attribute VB_Name = "modPub"
Option Explicit

Public strAppPath$
Public intFontSize As Integer
Public strFontColor As String
Public lngFontColor As Long
Public strSplit As String

Sub Main() strAppPath = App.Path If Right(strAppPath,1) <> "/" Then strAppPath = strAppPath & "/" iniFileName = strAppPath & "user.INI" If Dir(iniFileName) <> "" Then Call initFromIniFile Else Call initFromApp Call saveToIniFile End If Form1.ShowEnd Sub'从配置文件初始化Private Sub initFromIniFile()' On Error GoTo err1 intFontSize = Trim(GetIniS("UserSet","FontSize")) strFontColor = Trim(GetIniS("UserSet","FontColor")) lngFontColor = Val(strFontColor) strSplit = Trim(GetIniS("UserSet","Split ")) Exit Suberr1: Call initFromApp Call saveToIniFileEnd Sub'保存到配置文件Public Sub saveToIniFile() SetIniS "UserSet","FontSize",CStr(intFontSize) SetIniS "UserSet","FontColor",CStr(strFontColor) SetIniS "UserSet","Split",CStr(strSplit)End Sub'用程序自身初始化Private Sub initFromApp() intFontSize = 10 strFontColor = "&HFFFF&" lngFontColor = Val(strFontColor) strSplit = "---------------------------------"End Sub

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读