The code you provided is a start. However, when I ran the program I got an unhandled exception. So far I have not been able to solve the unhandled exception.
MissingManifestResourceException was unhandled
Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "DIS_Database.Resource1.resources" was correctly embedded or linked into assembly "WindowsApplication1" at compile time, or that all the satellite assemblies required are loadable and fully signed.
I clicked "Copy exception detail to the clipboard" and got the mess below.
System.Resources.MissingManifestResourceException was unhandled
Message="Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "DIS_Database.Resource1.resources" was correctly embedded or linked into assembly "WindowsApplication1" at compile time, or that all the satellite assemblies required are loadable and fully signed."
Source="mscorlib"
StackTrace:
at System.Resources.ResourceManager.InternalGetResour ceSet(CultureInfo culture, Boolean createIfNotExists, Boolean tryParents)
at System.Resources.ResourceManager.InternalGetResour ceSet(CultureInfo culture, Boolean createIfNotExists, Boolean tryParents)
at System.Resources.ResourceManager.InternalGetResour ceSet(CultureInfo culture, Boolean createIfNotExists, Boolean tryParents)
at System.Resources.ResourceManager.GetString(String name, CultureInfo culture)
at System.Resources.ResourceManager.GetString(String name)
at WindowsApplication1.Module1.ReadResources() in C:\Documents and Settings\Lowell\Local Settings\Application Data\Temporary Projects\WindowsApplication1\Module1.
vb:line 15
at WindowsApplication1.Form1.Button1_Click(Object sender, EventArgs e) in C:\Documents and Settings\Lowell\Local Settings\Application Data\Temporary Projects\WindowsApplication1\Form1.
vb:line 4
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventAr gs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.O nMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.W ndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallba ck(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchM essageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager. System.Windows.Forms.UnsafeNativeMethods.IMsoCompo nentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.Run MessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.Run MessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(ApplicationCo ntext context)
at Microsoft.VisualBasic.ApplicationServices.WindowsF ormsApplicationBase.OnRun()
at Microsoft.VisualBasic.ApplicationServices.WindowsF ormsApplicationBase.DoApplicationModel()
at Microsoft.VisualBasic.ApplicationServices.WindowsF ormsApplicationBase.Run(String[] commandLine)
at WindowsApplication1.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.
vb:line 81
at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.Run UsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context( Object state)
at System.Threading.ExecutionContext.Run(ExecutionCon text executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()