⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rini.bas

📁 一个酒厂派车单管理系统,很方便的系统
💻 BAS
字号:
Attribute VB_Name = "Rini"
Private Declare Function GetPrivateProfileInt Lib "kernel32" Alias "GetPrivateProfileIntA" (ByVal lpApplicationName As String, ByVal lpKeyName As String, ByVal nDefault As Long, ByVal lpFileName As String) As Long
Private Declare Function GetPrivateProfileString Lib "kernel32" Alias "GetPrivateProfileStringA" (ByVal lpApplicationName As String, ByVal lpKeyName As Any, ByVal lpDefault As String, ByVal lpReturnedString As String, ByVal nSize As Long, ByVal lpFileName As String) As Long
Private Declare Function WritePrivateProfileString Lib "kernel32" Alias "WritePrivateProfileStringA" (ByVal lpApplicationName As String, ByVal lpKeyName As Any, ByVal lpString As Any, ByVal lpFileName As String) As Long
Private Declare Function GetWindowsDirectory Lib "kernel32" Alias "GetWindowsDirectoryA" (ByVal lpBuffer As String, ByVal nSize As Long) As Long

'写INI文件(字符串)
Public Sub WriteINI(ByVal FileName As String, ByVal App As String, ByVal Key As String, ByVal strValue As String)
  Dim Result As Long
  Result = WritePrivateProfileString(App, Key, strValue, FileName)
End Sub
'读整型
Public Function GetINIint(ByVal FileName As String, ByVal App As String, ByVal Key As String) As Long
  Dim Result As Long
  Result = GetPrivateProfileInt(App, Key, 0, FileName)
  GetINIint = Result
End Function
'读字符串
Public Function GetINIstr(ByVal FileName As String, ByVal App As String, ByVal Key As String) As String
  Dim Result As Long
  Dim BufferStr As String * 255
  Result = GetPrivateProfileString(App, Key, "", BufferStr, Len(BufferStr), FileName)
  If Result = 0 Then
    GetINIstr = ""
  Else
    GetINIstr = Left(BufferStr, Result)
  End If
End Function




⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -