oke oke thanks
uda berhasil

regards,

Jimmy

--- In [email protected], LiveDeviL <[EMAIL PROTECTED]>
wrote:
>
> lho...
> kalo menggunakan entry hex berhasil, mengapa harus dihapal hex nya??
> kan tinggal mendeklarasikan di module
> 
> Public Const HKEY_CURRENT_USER = &H80000001
> Public Const HKEY_LOCAL_MACHINE = &H80000002
> 
> CMIIW
> 
> regards,
> LiveDeviL
> 
> On 10/8/05, Jimmy <[EMAIL PROTECTED]> wrote:
> >
> >  Thanks untuk sarannya, tapi tujuan awal saya membuat coding itu untuk
> > membuat entry ODBC di HKEY_LOCAL_MACHINE atau di HKEY_CURRENT_USER,
> > setau saya untuk membuat entry itu harus pakai function API, kalo
> > pakai fungsi SaveSetting tadi kan menyimpan di entry Software\VB
> > Application ...
> > Saya sempat mengubah HKEY_LOCAL_MACHINE menjadi entry heksadecimalnya,
> > dan berhasil, tapi coding jadi tidak enak untuk debug karena harus tau
> > dan hapal heksadecimalnya
> > Mungkin ada saran coding untuk meregister ODBC dari program ?
> >
> > --- In [email protected], LiveDeviL <[EMAIL PROTECTED]>
> > wrote:
> > >
> > > hello...
> > > sekedar saran saja...
> > > ada cara yg lebih mudah untuk mengakses registry windows...
> > > tanpa menggunakan API sama sekali...
> > > yaitu dengan perintah sbb :
> > > Procedure SaveSetting (AppName As String, Section As String, Key As
> > String,
> > > Setting As String) untuk menulis ke registry
> > > Function GetSetting (AppName As String, Section As String, Key As
> > String,
> > > [Default] ) As String untuk membaca dari registry
> > >
> > > contoh penggunaan:
> > > Private Sub Command1_Click()
> > > Dim strDBPath As String
> > >
> > > strDBPath = GetSetting("NamaProgram", "Setting", "DBPath")
> > > If strDBPath="" then
> > > SaveSetting "NamaProgram", "Settings", "DBPath", App.Path
> > > strDBPath = GetSetting("NamaProgram", "Setting", "DBPath")
> > > End If
> > > OpenDB strDBPath
> > > End Sub
> > >
> > > Semoga membantu...
> > >
> > > regards,
> > > LiveDeviL
> > >
> > > On 10/8/05, Jimmy <[EMAIL PROTECTED]> wrote:
> > > >
> > > > Hi all,
> > > >
> > > > saya sedang buat program VB6 buat nulis ke registry, udah buka
> > manual
> > > > MSDN dll, syntaxnya seperti ini tapi kok masih error yah.... ada
> > yang
> > > > bisa kasih pencerahan ? I need it urgent!
> > > >
> > > > Thanks!!!!!
> > > >
> > > > Regards,
> > > >
> > > >
> > > > Jay
> > > >
> > > >
> > > > Listingnya :
> > > >
> > > > Private Declare Function RegCreateKeyEx Lib "advapi32.dll" Alias
> > > > "RegCreateKeyExA" _
> > > > (ByVal hKey As Long, ByVal lpSubKey As String, ByVal Reserved As
> > > > Long, _
> > > > ByVal lpClass As Long, ByVal dwOptions As Long, _
> > > > ByVal samDesired As Long, ByVal lpSecurityAttributes As Long, _
> > > > phkResult As Long, lpdwDisposition As Long) As Long
> > > >
> > > > Private Declare Function RegSetValueEx Lib "advapi32.dll" Alias
> > > > "RegSetValueExA" _
> > > > (ByVal hKey As Long, ByVal lpValueName As String, _
> > > > ByVal Reserved As Long, ByVal dwType As Long, lpData As Any, _
> > > > ByVal cbData As Long) As Long
> > > >
> > > > Private Declare Function RegOpenKeyEx Lib "advapi32.dll" Alias
> > > > "RegOpenKeyExA" _
> > > > (ByVal hKey As Long, ByVal lpSubKey As String, ByVal ulOptions As
> > > > _
> > > > Long, ByVal samDesired As Long, phkResult As Long) As Long
> > > >
> > > > Private Declare Function RegCloseKey Lib "advapi32.dll" (ByVal
> > hKey As
> > > > Long) _
> > > > As Long
> > > >
> > > > Private Function CreateRegistryKey(ByVal hKey As Long, ByVal
> > KeyName
> > > > As String) As Boolean
> > > > Dim handle As Long, disp As Long
> > > > If RegCreateKeyEx(hKey, KeyName, 0, 0, REG_OPTION_NON_VOLATILE,
> > > > KEY_ALL_ACCESS, 0, handle, disp) <> ERROR_SUCCESS Then
> > > > Err.Raise 1001, , "Unable to create the registry key"
> > > >
> > > > Else
> > > > ' Return True if the key already existed.
> > > > If disp = 2 Then
> > > > MsgBox "open"
> > > > CreateRegistryKey = True
> > > > ' Close the key.
> > > >
> > > > End If
> > > > RegCloseKey handle
> > > > End If
> > > > End Function
> > > >
> > > > Private Sub Form_Load()
> > > > CreateRegistryKey HKEY_CURRENT_USER, "Software\SIPB"
> > > >
> > > > Dim handle As Long
> > > >
> > > > If RegOpenKeyEx(HKEY_CURRENT_USER, "Software\SIPB", 0, KEY_WRITE,
> > > > handle) Then
> > > > MsgBox "cannot open"
> > > > Else
> > > >
> > > > Dim strvalue As String
> > > > ' We want to add a "LastLogin" value, of type string.
> > > > strvalue = "test"
> > > > ' Strings must be passed using ByVal.
> > > > RegSetValueEx handle, "Description", 0, REG_SZ, ByVal strvalue,
> > > > Len(strvalue)
> > > > ' Don't forget to close the key.
> > > > RegCloseKey handle
> > > >
> > > > End If
> > > > End Sub
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > Untuk keluar dari millis ini, kirim email kosong ke:
> > > > [EMAIL PROTECTED]
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > SPONSORED LINKS
> > > > Programmer<http://groups.yahoo.com/gads?
> > t=ms&k=Programmer&w1=Programmer&w2=Indonesia&w3=Basic+programming+lang
> > uage&w4=Computer+programming+languages&w5=Programming+languages&w6=Jav
> > a+programming+language&c=6&s=157&.sig=QQ3jf-qPyCuDVOqmjxXLqQ>
> > > > Indonesia<http://groups.yahoo.com/gads?
> > t=ms&k=Indonesia&w1=Programmer&w2=Indonesia&w3=Basic+programming+langu
> > age&w4=Computer+programming+languages&w5=Programming+languages&w6=Java
> > +programming+language&c=6&s=157&.sig=gwDT36aV8hG5doSQaoUwSA> Basic
> > > > programming language<http://groups.yahoo.com/gads?
> > t=ms&k=Basic+programming+language&w1=Programmer&w2=Indonesia&w3=Basic
> > +programming+language&w4=Computer+programming+languages&w5=Programmin
> > g+languages&w6=Java+programming+language&c=6&s=157&.
> > sig=g8R4hday0lm5D2hL5lG5aQ> Computer
> > > > programming languages<http://groups.yahoo.com/gads?
> > t=ms&k=Computer+programming+languages&w1=Programmer&w2=Indonesia&w3=Ba
> > sic+programming+language&w4=Computer+programming+languages&w5=Programm
> > ing+languages&w6=Java+programming+language&c=6&s=157&.
> > sig=RLdM7FZAm3K7raX0D8KsjA> Programming
> > > > languages<http://groups.yahoo.com/gads?
> > t=ms&k=Programming+languages&w1=Programmer&w2=Indonesia&w3=Basic+progr
> > amming+language&w4=Computer+programming+languages&w5=Programming+langu
> > ages&w6=Java+programming+language&c=6&s=157&.
> > sig=CtRXYvnoy1O17UC430cphA> Java
> > > > programming language<http://groups.yahoo.com/gads?
> > t=ms&k=Java+programming+language&w1=Programmer&w2=Indonesia&w3=Basic+p
> > rogramming+language&w4=Computer+programming+languages&w5=Programming+l
> > anguages&w6=Java+programming+language&c=6&s=157&.
> > sig=XQJC4fZro9pIX1bkqBwT8w>
> > > > ------------------------------
> > > > YAHOO! GROUPS LINKS
> > > >
> > > >
> > > > - Visit your group "Programmer-VB<http://groups.yahoo.com/
> > group/Programmer-VB>"
> > > > on the web.
> > > > - To unsubscribe from this group, send an email to:
> > > > [EMAIL PROTECTED]<Programmer-VB-
> >
[EMAIL PROTECTED]<http://[EMAIL PROTECTED]>
> > >
> > > > - Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> > > > Service <http://docs.yahoo.com/info/terms/>.
> > > >
> > > >
> > > > ------------------------------
> > > >
> > >
> >
> >
> >
> >
> >
> >
> >  Untuk keluar dari millis ini, kirim email kosong ke:
> > [EMAIL PROTECTED]
> >
> >
> >
> >
> >  ------------------------------
> > YAHOO! GROUPS LINKS
> >
> >
> >    - Visit your group
"Programmer-VB<http://groups.yahoo.com/group/Programmer-VB>"
> >    on the web.
> >     - To unsubscribe from this group, send an email to:
> >   
[EMAIL PROTECTED]<[EMAIL PROTECTED]>
> >     - Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> >    Service <http://docs.yahoo.com/info/terms/>.
> >
> >
> >  ------------------------------
> >
>






------------------------ Yahoo! Groups Sponsor --------------------~--> 
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/k7folB/TM
--------------------------------------------------------------------~-> 

Untuk keluar dari millis ini, kirim email kosong ke:
[EMAIL PROTECTED]

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/Programmer-VB/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Kirim email ke