PDA

View Full Version : VB6 Dannvanam Visit Karala Yanna


lalanthakumara
03-30-2009, 02:36 PM
Mata Podi Help Ekak Ona
VB6 Valain

Button Ekak Click Kalama
Computer Eke Default Web Browser Eke Home Page Eka Wenas Wenna
Apita Ona Home Page Ekak Danna
Coding Eka Ona

Danna Kenek Innavanam Kiyala Denna

Api digatama VB6 Gena Me Thread eken discuss karamu

kosandpol
03-30-2009, 02:43 PM
you will need to modify the registry for that.
You will need to use the win32 API functions.

lalanthakumara
03-30-2009, 02:48 PM
you will need to modify the registry for that.
You will need to use the win32 API functions.

Ithin help ekak diyanko
Kohomada code karanne

dannavanam
Example Code ekak diyanko

Please Help

kosandpol
03-30-2009, 02:59 PM
this is for IE :

'--these are the API functions. paste them on the form's declaration section---
'----------
Private Declare Function RegCloseKey Lib "advapi32.dll" (ByVal HKey As Long) _
As Long
Private Declare Function RegCreateKey Lib "advapi32.dll" Alias "RegCreateKeyA" _
(ByVal HKey As Long, ByVal lpSubKey As String, phkResult As Long) As Long
Private Declare Function RegDeleteValue Lib "advapi32.dll" Alias "" ()
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 Const REG_SZ = 1
Private Const HKEY_CURRENT_USER = &H80000001
'--------end declares----------

Private Sub SaveString(HKey As Long, Path As String, Name As String, Data As String)
Dim KeyHandle As Long
Dim RetVal As Long
RetVal = RegCreateKey(HKey, Path, KeyHandle)
RetVal = RegSetValueEx(KeyHandle, Name, 0, REG_SZ, ByVal Data, Len(Data))
RetVal = RegCloseKey(KeyHandle)
End Sub

Private Sub SetStartPage(URL As String)
Call SaveString(HKEY_CURRENT_USER, "SoftwareMicrosoftInternet ExplorerMain", "Start Page", URL)
End Sub

Private Sub SetWindowTitle(Title As String)
Call SaveString(HKEY_CURRENT_USER, "SoftwareMicrosoftInternet ExplorerMain", "Window Title", Title)
End Sub
'---------code for the button---------
Private Sub cmdSetStartPage_Click()
SetStartPage ("http://www.elakiri.com") '--------change this to the page you want
SetWindowTitle ("ElaKiri Community") '----------this is to change the browser window title
End Sub

lalanthakumara
03-30-2009, 03:03 PM
this is for IE :

'--these are the API functions. paste them on the form's declaration section---
'----------
Private Declare Function RegCloseKey Lib "advapi32.dll" (ByVal HKey As Long) _
As Long
Private Declare Function RegCreateKey Lib "advapi32.dll" Alias "RegCreateKeyA" _
(ByVal HKey As Long, ByVal lpSubKey As String, phkResult As Long) As Long
Private Declare Function RegDeleteValue Lib "advapi32.dll" Alias "" ()
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 Const REG_SZ = 1
Private Const HKEY_CURRENT_USER = &H80000001
'--------end declares----------

Private Sub SaveString(HKey As Long, Path As String, Name As String, Data As String)
Dim KeyHandle As Long
Dim RetVal As Long
RetVal = RegCreateKey(HKey, Path, KeyHandle)
RetVal = RegSetValueEx(KeyHandle, Name, 0, REG_SZ, ByVal Data, Len(Data))
RetVal = RegCloseKey(KeyHandle)
End Sub

Private Sub SetStartPage(URL As String)
Call SaveString(HKEY_CURRENT_USER, "SoftwareMicrosoftInternet ExplorerMain", "Start Page", URL)
End Sub

Private Sub SetWindowTitle(Title As String)
Call SaveString(HKEY_CURRENT_USER, "SoftwareMicrosoftInternet ExplorerMain", "Window Title", Title)
End Sub
'---------code for the button---------
Private Sub cmdSetStartPage_Click()
SetStartPage ("http://www.elakiri.com") '--------change this to the page you want
SetWindowTitle ("ElaKiri Community") '----------this is to change the browser window title
End Sub


Machan den mage machine eke Vb nehe
Mama meka test karala balannam
Oke elakiri.com thena vitharak wenas kalama ethi wei neda ban?

Oka defalt web browser ekata nemeida?
IE valata vitharai nam Firefox valata oka karana heti danne dedda?

Karadara karanavta Sorry

Dunna code ekata thanks
Mama test karla balannam

kosandpol
03-30-2009, 03:09 PM
IE and Firefox stores the home page setting in different ways. IE keeps it in the registry but I've no idea how firefox does it. Probably keeps it in one of the jscript files in the user's app data folder.
Search the net, theres bound to be sample codes for that as well.
Even the code I gave is one I had found on the web some time back.

lalanthakumara
03-30-2009, 03:16 PM
IE and Firefox stores the home page setting in different ways. IE keeps it in the registry but I've no idea how firefox does it. Probably keeps it in one of the jscript files in the user's app data folder.
Search the net, theres bound to be sample codes for that as well.
Even the code I gave is one I had found on the web some time back.

Ok
Thanks