Fri 02 Feb 2007 09:40:20 AM UTC, original submission:
The FolderBrowserDialog doesn't seem to work on Portable .NET 0.7.4 or 0.7.5, though for different reasons. See attached code for example. The code works on MS .NET.
On 0.7.4 for Linux you get a blank grey dialogue box.
On 0.7.5 for Windows, you get the following exception:
System.ArgumentOutOfRangeException: Value must not be negative
Parameter name: length
at System.Array.Copy(Array, Int32, Array, Int32, Int32) in .SystemArray.cs:275
at System.Drawing.Toolkit.DrawingWindow.MoveWindowTo(DrawingWindow, DrawingWindow) in .DrawingWindow.cs:910
at System.Drawing.Toolkit.DrawingWindow.System.Drawing.Toolkit.IToolkitWindow.Raise() in .DrawingWindow.cs:88
at System.Windows.Forms.Control.BringToFront() in .Control.cs:2019
at System.Windows.Forms.Form.Activate() in .Form.cs:863
at System.Windows.Forms.Form.ShowDialog(Form) in .Form.cs:962
at System.Windows.Forms.Form.ShowDialog(IWin32Window) in .Form.cs:985
at System.Windows.Forms.FolderBrowserDialog.RunDialog(IWin32Window) in .FolderBrowserDialog.cs:187
at System.Windows.Forms.CommonDialog.ShowDialog(IWin32Window) in .CommonDialog.cs:58
at DirectoryBrowserProblem.DirectoryBrowserProblem.b_Click(Object, EventArgs)
at System.EventHandler.Invoke(Object, EventArgs)
at System.Windows.Forms.Control.OnClick(EventArgs) in .Control.cs:4668
at System.Windows.Forms.Button.OnClick(EventArgs) in .Button.cs:80
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs) in .Button.cs:103
at System.Windows.Forms.Control.System.Drawing.Toolkit.IToolkitEventSink.ToolkitMouseUp(ToolkitMouseButtons, ToolkitKeys, Int32, Int32, Int32, Int32) in
.Control.cs:6320
at System.Windows.Forms.ControlWeakRef.ToolkitMouseUp(ToolkitMouseButtons, ToolkitKeys, Int32, Int32, Int32, Int32) in .ControlToolkitMgr.cs:287
at System.Drawing.Toolkit.DrawingWindow.ButtonUp(Int32, Int32, Int32) in .DrawingWindow.cs:527
at System.Drawing.Toolkit.DrawingToolkit.WindowsLoop(IntPtr, Int32, Int32, Int32) in .DrawingToolkit.cs:633
at System.Drawing.Win32.Api.DispatchMessageA(MSG&)
at System.Drawing.Toolkit.DrawingToolkit.ProcessEvents(Boolean) in .DrawingToolkit.cs:76
at System.Windows.Forms.Application.RunMessageLoop(ApplicationContext) in .Application.cs:428
at System.Windows.Forms.Application.Run(Form) in .Application.cs:582
at DirectoryBrowserProblem.DirectoryBrowserProblem.Main()
|