So im making a app and theres a problem as always
+++++++++++++
Form 2 _
Private Sub CustmBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CustmBtn.Click
Dim IconLoc As String
Dim CustmIcon As New OpenFileDialog
CustmIcon.AutoUpgradeEnabled = True
CustmIcon.DereferenceLinks = True
CustmIcon.SupportMultiDottedExtensions = True
CustmIcon.Filter = "Windows Based Icons|*.ico"
CustmIcon.ShowDialog()
If CustmIcon.FileName = "" Then
Else
IconLoc = CustmIcon.FileName
My.Settings.My_OpeniconLocation_String = IconLoc
My.Settings.Save()
' MainForm.Icon = New System.Drawing.Icon(CustmIcon.FileName)
End If
End Sub
Now For MainForm _
If My.Computer.FileSystem.FileExists(System.Environment.CurrentDirectory & "\MoonBase Project Setup.exe") Then
My.Computer.FileSystem.DeleteFile(System.Environment.CurrentDirectory & "\MoonBase Project Setup.exe")
Else
End If
Try
If My.Settings.My_TabPageNameFirst = Nothing Then
Else
Me.TabPageRich1.Text = My.Settings.My_TabPageNameFirst
Me.TabPageRich2.Text = My.Settings.My_TabPageNameSecond
Me.TabPageRich3.Text = My.Settings.My_TabPageNameThrid
Me.TabPageRich4.Text = My.Settings.My_TabPageNameThrid
End If
Call PictureBoxFucntions()
Call NotesViewrRichtextctrlFucntions()
Call TabPagesRichBoxFucntions()
FormTimer.Start()
Dim Max As System.Drawing.Size = New System.Drawing.Size(522, 593)
Me.MaximumSize = Max
OptionsForm.MainFormTopmostCKB.Checked = My.Settings.My_Topmost_app
If OptionsForm.MainFormTopmostCKB.Checked Then
Me.TopMost = True
Else
Me.TopMost = False
End If
If My.Settings.My_First_Build = True Then
My.Settings.Save()
Me.Icon = Nothing
Else
Try
Tab4RichTextBoxPrintCtrl.LoadFile(My.Settings.My_TabPage4_LastFile)
Tab5RichTextBoxPrintCtrl.LoadFile(My.Settings.My_TabPage5_LastFile)
Tab6RichTextBoxPrintCtrl.LoadFile(My.Settings.My_TabPage6_LastFile)
Tab7RichTextBoxPrintCtrl.LoadFile(My.Settings.My_TabPage7_LastFile)
Me.Text = My.Settings.My_Main_Caption
If My.Settings.My_OpeniconLocation_String = vbEmpty Then <<<<<<<<< Heres the problem
' Me.Icon = Nothing
Else
Me.Icon = New Icon(System.Drawing.Icon(My.Settings.My_OpeniconLocation_String)
End If <<<<<<<<<<<<<<<<<<<<<<<<<<
Catch eee As Exception
My.Settings.My_First_Build = True
My.Settings.Save()
End Try
End If
' My.Settings.My_First_Build = False
' If My.Settings.My_First_Build = False Then
' My.Settings.Reload()
Catch WathDebuggingProcess As Exception
End Try
The Problem is with loading the custom icon
Doesnt seem to get the Location of the sring in my.setting.My_OpeniconLocation_String
I dont know what im doing wrong here??:?: