Exemplo n.º 1
0
        private DialogResult STAShowBrowseDialog(FolderBrowserDialog dialog)
        {
            BrowseDialogState state = new BrowseDialogState();

            state.dialog = dialog;
            System.Threading.Thread t = new System.Threading.Thread(state.ThreadProcShowDialog);
            t.SetApartmentState(System.Threading.ApartmentState.STA);
            t.Start();
            t.Join();
            return(state.result);
        }
Exemplo n.º 2
0
 private DialogResult STAShowBrowseDialog(FolderBrowserDialog dialog)
 {
     BrowseDialogState state = new BrowseDialogState();
     state.dialog = dialog;
     System.Threading.Thread t = new System.Threading.Thread(state.ThreadProcShowDialog);
     t.SetApartmentState(System.Threading.ApartmentState.STA);
     t.Start();
     t.Join();
     return state.result;
 }