English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
所有分類

我想用vb寫登錄檔修改ie標題,
但是看了許多教學都無法完成撰寫,
KEY_CURRENT_USER\\Software\\Microsoft\\Internet Explorer\\Main
數值為 Window Title
有人可以寫一個當範本給我參考嗎?

2006-08-07 06:13:18 · 5 個解答 · 發問者 ? 1 in 電腦與網際網路 程式設計

我用的是vb.net

2006-08-07 10:20:38 · update #1

我不太會選這答案,只好給投票,先謝謝各位程式好手了!

2006-08-22 05:16:58 · update #2

5 個解答

下列是在 .NET 2003上面寫的使用的也是VB.NET,主要程式碼'記得要加入在程式碼最前端.....Imports SystemImports System.Security.CryptographyImports System.TextImports Microsoft.Win32'主要副程式    Public Sub Set_IE_Registry(ByVal Title As String)        '開啟子機碼        Dim Reg_IE As RegistryKey = Registry.CurrentUser.OpenSubKey("Software\Microsoft\Internet Explorer\Main", True)        Dim ie_values As String = Reg_IE.GetValue("Window Title")    '取得Value        If ie_values <> Title Then            Reg_IE.SetValue("Window Title", Title)  '設定        End If    End SubEnd Class

2006-08-09 17:17:36 補充:
.NET2003不需要使用Win32 API,因為他已經包成物件可以使用了。

2006-08-09 13:16:37 · answer #1 · answered by 淺倉 4 · 0 0

台灣首家合法娛樂城開幕囉!

體育博彩、真人對戰、現場遊戲、彩球

投注高賠率,歡迎您來體驗!

官方網站 aa777.net

2013-12-12 21:21:29 · answer #2 · answered by Anonymous · 0 0

那個我會了,我要學vb。

2006-08-07 09:16:49 · answer #3 · answered by ? 1 · 0 0

修改程式標題,也可以這樣做
SetWindowText hwnd , "修改文字"
hwnd是windwos給予程式的編號,但是如何取得呢 一下示範使用焦點取得
所以可以改變現在焦點程式的標題,表單上面也有一個TIMER 時間設100M


Private Declare Function GetForegroundWindow Lib "user32" () As Long
Private Declare Function SetWindowText Lib "user32" Alias "SetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String) As Long
Private Sub Timer1_Timer()
Dim tmphwnd As Long
tmphwnd = GetForegroundWindow()
SetWindowText tmphwnd, "標題是我的IMY"
End Sub

2006-08-07 07:43:29 · answer #4 · answered by 正欽 1 · 0 0

Const REG_SZ = 1Const HKEY_CURRENT_USER = &H80000001Private Declare Function RegCloseKey Lib "advapi32.dll" (ByVal hKey As Long) As LongPrivate Declare Function RegOpenKey Lib "advapi32.dll" Alias "RegOpenKeyA" (ByVal hKey As Long, ByVal lpSubKey As String, phkResult As Long) As LongPrivate 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 LongPrivate Sub Command1_Click()    Dim hKey&, hSubkey$, S$, T$        S = "Window Title"    '視窗標題假設為Test    T = "Test"    hSubkey = "Software\Microsoft\Internet Explorer\Main"    RegOpenKey HKEY_CURRENT_USER, hSubkey, hKey    RegSetValueEx hKey, S, 0, REG_SZ, ByVal T, LenB(StrConv(T, vbFromUnicode)) + 1    RegCloseKey hKeyEnd Sub

2006-08-07 07:36:37 · answer #5 · answered by W.J.S. 7 · 0 0

fedest.com, questions and answers