Hoe kun je in een FolderBrowserDialog als RootFolder een andere map dan de Environment.SpecialFolder.X mappen kiezen? Want als ik daar 'RootFolder = "C:\" invul dan krijg ik een runtime-error dat 'c:\' niet naar integer geconverteerd kan worden...
System.InvalidCastException was unhandled
Message="De conversie van tekenreeks C:\ naar type Integer is ongeldig."
Source="Microsoft.VisualBasic"
StackTrace:
bij Microsoft.VisualBasic.CompilerServices.Conversions.ToInteger(String Value)
bij TestProg.LogInstellingen.Button1_Click(Object sender, EventArgs e) in C:\Users\XXX\Documents\Visual Studio 2008\Projects\ TestProg\ TestProg\LogInstellingen.vb:regel 15
bij System.Windows.Forms.Control.OnClick(EventArgs e)
bij System.Windows.Forms.Button.OnClick(EventArgs e)
bij System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
bij System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
bij System.Windows.Forms.Control.WndProc(Message& m)
bij System.Windows.Forms.ButtonBase.WndProc(Message& m)
bij System.Windows.Forms.Button.WndProc(Message& m)
bij System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
bij System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
bij System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
bij System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
bij System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
bij System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
bij System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
bij System.Windows.Forms.Application.Run(ApplicationContext context)
bij Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
bij Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
bij Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
bij VrijeSchijfruimte.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:regel 81
bij System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
bij System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
bij Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
bij System.Threading.ThreadHelper.ThreadStart_Context(Object state)
bij System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
bij System.Threading.ThreadHelper.ThreadStart()
InnerException: System.FormatException
Message="De indeling van de invoertekenreeks is onjuist."
Source="Microsoft.VisualBasic"
StackTrace:
bij Microsoft.VisualBasic.CompilerServices.Conversions.ParseDouble(String Value, NumberFormatInfo NumberFormat)
bij Microsoft.VisualBasic.CompilerServices.Conversions.ToInteger(String Value)
InnerException: