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

📄 module1.bas

📁 一个用VB开发的非常不错的企业ERP管理源码,值得一看.
💻 BAS
字号:
Attribute VB_Name = "General"
'INI用
Option Explicit
Declare Function WritePrivateProfileString& _
Lib "KERNEL32" Alias "WritePrivateProfileStringA" _
(ByVal lpApplicationName As String, ByVal _
lpKeyName As Any, ByVal lpString As String, _
ByVal lpFileName As String)

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
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
Public a1 As Boolean



Function GetPrivateStringValue(section$, Key$, _
File$) As String

Dim KeyValue$
Dim characters As Long
    
KeyValue$ = String$(128, 0)
    
characters = GetPrivateProfileString(section$, _
Key$, "", KeyValue$, 127, File$)

If characters > 1 Then
   KeyValue$ = Left$(KeyValue$, characters)
End If
    
GetPrivateStringValue = KeyValue$

End Function


⌨️ 快捷键说明

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