🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: cn.bbs.comp.program
2 messages
2 total messages Started by ��� Thu, 12 Mar 1998 00:00
Re: about use api in vb
#1958
Author: ���
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]
Re: about use api in vb
#1960
Author: Henry Jia
Date: Fri, 13 Mar 1998 00:00
50 lines
2149 bytes
The string need init, it should be something like this:

    dim nLen as integer
    dim sRead as string

    sRead=string(255,0)
    nLen = GetProfileString("windows", "device", "NOT", sRead, 255)
    sRead=left$(sRead,nLen)

    Hope this help and good luck!

Jia H
Xi'an Orient
ShaanXi    China

��� wrote in message <980312.yD0sP$PBBS@bbs.ustc.edu.cn>...
>> ==> 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]
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads