Click here to Skip to main content
15,895,423 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionMSChart on Win 7 64 bits ? Pin
gbessis18-Dec-10 6:43
professionalgbessis18-Dec-10 6:43 
AnswerRe: MSChart on Win 7 64 bits ? Pin
Dave Kreskowiak18-Dec-10 15:34
mveDave Kreskowiak18-Dec-10 15:34 
QuestionWhat is the equivalent code in vb? [modified] Pin
Milad.Biroonvand17-Dec-10 21:57
Milad.Biroonvand17-Dec-10 21:57 
AnswerRe: What is the equivalent code in vb? Pin
Eddy Vluggen18-Dec-10 0:15
professionalEddy Vluggen18-Dec-10 0:15 
GeneralRe: What is the equivalent code in vb? Pin
Milad.Biroonvand18-Dec-10 1:43
Milad.Biroonvand18-Dec-10 1:43 
GeneralRe: What is the equivalent code in vb? Pin
Eddy Vluggen18-Dec-10 11:44
professionalEddy Vluggen18-Dec-10 11:44 
GeneralRe: What is the equivalent code in vb? Pin
Milad.Biroonvand18-Dec-10 2:14
Milad.Biroonvand18-Dec-10 2:14 
QuestionNeed help loading a background image from the registry Pin
Garrett Crawford17-Dec-10 18:18
Garrett Crawford17-Dec-10 18:18 
I'm new to programming and VB so just for fun I'm trying to build a music player app. I want to have it set up so you can choose your own background from picture files on your computer. The code I'm using to save the registry file is:

Private Sub MusicPlayerForm_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing

        My.Computer.Registry.SetValue _
            (m_strKeyName, "BackgroundImage", Me.BackgroundImage)
        
    End Sub


The file is saved and I can see it when I use the regedit. The problem I'm having is loading the file. Currently I have:

Private Sub MusicPlayerForm_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Timer1.Start()
        LoadDefault()
        Me.BackgroundImage = m_objBackgroundImage
    End Sub
    Public Sub LoadDefault()

        If CStr(My.Computer.Registry.GetValue(m_strKeyName, "BackgroundImage", _
                                              Me.BackgroundImage)) = "" Then
            Exit Sub
        Else
            m_objBackgroundImage = Image.FromFile(My.Computer.Registry.GetValue _
                (m_strKeyName, "BackgroundImage", Me.BackgroundImage))
        End If

    End Sub


The error message I get is 'System.IO.FileNotFound Exception'. I know it's probably something simple that I overlooked, but can anyone help me?

THANKS!!!
AnswerRe: Need help loading a background image from the registry Pin
Richard MacCutchan17-Dec-10 23:46
mveRichard MacCutchan17-Dec-10 23:46 
AnswerRe: Need help loading a background image from the registry Pin
Dave Kreskowiak18-Dec-10 3:02
mveDave Kreskowiak18-Dec-10 3:02 
GeneralRe: Need help loading a background image from the registry Pin
Garrett Crawford18-Dec-10 9:39
Garrett Crawford18-Dec-10 9:39 
GeneralRe: Need help loading a background image from the registry Pin
Dave Kreskowiak18-Dec-10 15:32
mveDave Kreskowiak18-Dec-10 15:32 
GeneralRe: Need help loading a background image from the registry Pin
Garrett Crawford18-Dec-10 19:16
Garrett Crawford18-Dec-10 19:16 
GeneralRe: Need help loading a background image from the registry Pin
Dave Kreskowiak19-Dec-10 4:21
mveDave Kreskowiak19-Dec-10 4:21 
GeneralRe: Need help loading a background image from the registry Pin
Garrett Crawford19-Dec-10 5:52
Garrett Crawford19-Dec-10 5:52 
QuestionSourceSafe and VB.Net Pin
#realJSOP15-Dec-10 8:48
mve#realJSOP15-Dec-10 8:48 
AnswerRe: SourceSafe and VB.Net Pin
fjdiewornncalwe15-Dec-10 8:53
professionalfjdiewornncalwe15-Dec-10 8:53 
AnswerRe: SourceSafe and VB.Net Pin
Prerak Patel16-Dec-10 0:24
professionalPrerak Patel16-Dec-10 0:24 
AnswerRe: SourceSafe and VB.Net Pin
Gary Wheeler16-Dec-10 0:55
Gary Wheeler16-Dec-10 0:55 
AnswerRe: SourceSafe and VB.Net Pin
Member 459898616-Dec-10 5:33
Member 459898616-Dec-10 5:33 
AnswerRe: SourceSafe and VB.Net Pin
Steve Naidamast16-Dec-10 7:23
professionalSteve Naidamast16-Dec-10 7:23 
GeneralRe: SourceSafe and VB.Net Pin
Member 376360816-Dec-10 10:37
Member 376360816-Dec-10 10:37 
AnswerRe: SourceSafe and VB.Net Pin
Fabio Franco16-Dec-10 9:38
professionalFabio Franco16-Dec-10 9:38 
GeneralRe: SourceSafe and VB.Net Pin
Michael Kingsford Gray16-Dec-10 18:43
Michael Kingsford Gray16-Dec-10 18:43 
GeneralRe: SourceSafe and VB.Net Pin
Fabio Franco17-Dec-10 1:00
professionalFabio Franco17-Dec-10 1:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.