but i am having a problem with my program, i have a settings form and a main form the main for collects information from the settings for and stores it into variables (public XXXX as string) but on my Save button it is supposed to save the information in the main form and show the main form. But it get an error on the first line containing: "MainForm.VARIABLE", The innerMessage says it cant create the form or something, but here is the code from my save button:
(I know that this isn't the right block of code because this doesn't really show anything, but if anyother code is required then just tell me and ill post it. The error actually occurs on "MainForm" itself, how do i fix this?)
Error is: An error occurred creating the form. See Exception.InnerException for details. The error is: Object reference not set to an instance of an object.
Dim r As New Random MainBot.Max = txt_Max.Text If RB_Manually.Checked = True Then savedFile = My.Computer.FileSystem.SpecialDirectories.Temp & "\!_Temp\" & r.Next(999, 999999999) & ".txt" My.Computer.FileSystem.WriteAllText(savedFile, txt_ManURLs.Text, False) MainBot.deleteAfter = True MainBot.TheFile = savedFile Else MainBot.TheFile = txt_FileURL.Text End If MainBot.Show() MainBot.proxyTimer.Enabled = True MainBot.Timer1.Enabled = True
This post has been edited by TechKid: 08 September 2010 - 10:31 PM