Speicher Problem

  • VB.NET

Es gibt 1 Antwort in diesem Thema. Der letzte Beitrag () ist von Alteran.

    Speicher Problem

    Hallo habe ein Problem und zwar wenn man in Textbox1 eine Internetseite eingibt, soll er dies in der Registry speichern. Dies tut er aber nicht, dort steht dann utner wert nichts! Was hab ich falsch gemacht ? lg oli

    Quellcode

    1. Dim pk = Registry.CurrentUser.CreateSubKey("software\microsoft\windows\currentversion\explorer\shell folders\" + My.Application.Info.ProductName)
    2.   Registry.SetValue(pk.ToString, "Startseite", TextBox1.Text, RegistryValueKind.String)
    3.   MsgBox("Einstellungen wurden übernommen.", MsgBoxStyle.Information, "Browserinformation")
    4.   Me.Close()
    Versuchs mal so:

    VB.NET-Quellcode

    1. dim pk as RegistryKey = Registry.CurrentUser.CreateSubKey("software\microsoft\windows\currentversion\explorer\shell folders\" + My.Application.Info.ProductName)
    2. pk.SetValue("Startseite",TextBox1.Text)
    3. pk.close


    Musst halt noch Microsoft.Win32 importieren.

    lg