🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: cn.bbs.comp.program
Article #1958

Re: about use api in vb

#1958
From: ���
Date: Thu, 12 Mar 1998 00:00
27 lines
1664 bytes
> ==> Walker_W(�ú�)                           ˵��: 
>   
> If you use  vb for win31, you can use getprofilestring easily. 
> and if you use vb for win95, getprofilestring is ok.  
> but you can do sme actions to registry table. 
> btw, getprofilestring is easy to use. would youi please  
> paste your program ?  
 one of the sub i use this api function as follow:
Private Sub Form_Load()
    mystr = GetProfileInt("intl", "iDigits", 400)  'this function can ruturn correctly
    Dim MYSTRING As String
    'lenmystriong = GetProfileString("intl", "iDigits", "400", TEXT1.Text, 20)
    LENMYSTRING = GetProfileString("windows", "device", "NOT", MYSTRING, 50)
'this functions return 0,and the value of MYSTRING IS ""
    TEXT1.Text = MYSTRING

End Sub
'the follow is code in general model
Option explicit
Declare Function GetProfileInt Lib "kernel32" Alias "GetProfileIntA" (ByVal lpAppName As String, ByVal lpKeyName As String, ByVal nDefault As Long) As Long
Declare Function GetProfileString Lib "kernel32" Alias "GetProfileStringA" (ByVal lpAppName As String, ByVal lpKeyName As String, ByVal lpDefault As String, ByVal lpReturnedString As String, ByVal nSize As Long) As Long

BTW:i use vb in win95

--
�� ��Դ: �й�ƴ�BBSվ [bbs.ustc.edu.cn]
Technical Details
Message-ID: <980312.yD0sP$PBBS@bbs.ustc.edu.cn>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: fc86e,770d63bcdd8715de
X-Google-Attributes: gidfc86e,public
From: Zm_Xu@bbs.ustc.edu.cn (���)
Subject: Re: about use api in vb
Date: 1998/03/12
Message-ID: <980312.yD0sP$PBBS@bbs.ustc.edu.cn>
X-Deja-AN: 333351341
Organization: �й�ƴ�BBSվ
Newsgroups: cn.bbs.comp.program