'æ°æ®æ件å称 = cj.dat
'æ°æ®ç±»å = iniç±»å
'[æ绩]
'å¦çå§å=å¦ç§1æ绩,å¦ç§2æ绩,...,å¦ç§næ绩
'çé¢è®¾è®¡ï¼
'1个Labelï¼Caption="å§å"ï¼1个TextBoxï¼ç¨æ·è¾å
¥è¦æ¥è¯¢çå¦çå§åï¼Name="Text1"ï¼Text=""ï¼1个CommandButtonï¼Name="Command1"ï¼Caption="æ¥è¯¢æ绩"
'
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 Const km="ç§ç®1,ç§ç®2,ç§ç®3,ç§ç®4,ç§ç®5" 'éæ ¹æ®å®é
æ
åµæ´æ¹
Private Sub Text1_GotFocus()
Text1 = ""
End Sub
Private Sub Command1_Click()
Dim buf, rt As Long, n As Long, xk, i As Integer, msg As String
n = 256 'éæ ¹æ®å®é
æ
åµæ´æ¹è¿ä¸ªæ°åç大å°
buf = Space(n)
rt = GetPrivateProfileString("æ绩",Text1.Text, "", buf, n, App.Path & "\cj.dat")
If rt = 0 Then
MsgBox "æªæ¾å°â" & Text1.Text & "âçæ绩ï¼"
Else
buf = Split(buf, vbNullChar)
xk = Split(km,",")
msg = xk(0) & " = " & buf(0)
For i = 1 To UBound(xk)
msg = msg & "ï¼" xk(i) & " = " & buf(i)
Next
MsgBox Text1.Text & "çæ绩ï¼" & vbCrlf & msg
End If
End Sub
追é®æ²¡æ°æ®åºï¼
è¦ææ绩åæä¸å»
追çç®åçæ绩æ¥è¯¢ï¼ä¸ç¨æ°æ®åºä¹è¡åï¼æ·»å æ°æ®ç¨è®°äºæ¬å°±å¯ä»¥æå®ï¼å
å»å®è£
æ°æ®åºè½¯ä»¶ç麻ç¦ï¼O(â©_â©)O
追é®ä¼å¼é£ä¸ªæ°æ®åºå
æè¿æé£ä¸ªæ绩å
麻ç¦ä½ äº
追çæ以ä¸ä¿¡æ¯è¯´ä¸ï¼
âå§åâçæ大é¿åº¦ãè®°å½å段ãï¼æåªå 个å¦ç§ï¼æ绩记为æ´æ°è¿æ¯å°æ°ãè®°å½å段ãï¼æ绩表å称å½åè§åãè®°å½è¡¨ãï¼ææ绩æ¥æºãè®°å½å段ãï¼
追é®æ¹ä¾¿å 个qqåï¼ç¾åº¦ç¥éè¿éåä¸äºé£ä¸ªæ绩æ件
追çåç§ä¿¡äº
追é®æä¹æ²¡æ¶å°ï¼