showdialog

Is it safe to show multiple dialogs in WPF?

强颜欢笑 提交于 2019-12-14 03:57:10
问题 Surprisingly one can show more than one dialog at a time by putting the ShowDialog() call on the Dispatcher: uiDispatcher.BeginInvoke(new Func<bool?>(myWindow.ShowDialog)); How come this works and still the UI remains running responding to user interaction once the dialog is shown (I would have thought not since ShowDialog() blocks the thread it is on which has to be the UI thread), one can even go on showing new dialogs: Window myWindow; for(int i = 0; i < 5; i ++) { myWindow = new Window();

Visual Basic 2012: Passing variable from one form to another

送分小仙女□ 提交于 2019-12-14 03:00:59
问题 I have two forms, the main (Main.vb) program window and a pop-up that appears when the program is started (getInitialBalance.vb). I need to get a value entered into the PopUp window from the popup window to the Main program. The relevant code is shown below: getinitialbalance.vb Public Class GetInitialBalance Public initialBalance As Integer Private Sub btnApplyInitialBal_Click(sender As Object, e As EventArgs) Handles btnApplyInitialBal.Click Dim textinput As Integer = txtInitialBalance.Text

System::Windows::Forms::Form::ShowDialog()

青春壹個敷衍的年華 提交于 2019-12-13 04:23:00
问题 I have a 2 forms setup my first form will call another form with the ShowDialog() method when I receive data from the serial port ShowDialog() throws InvalidOperation with additionnal information "DragDrop registration did not succeed" any hints on how to solve this? 回答1: Cheesy google search answer... but it seems to address your issue: http://social.msdn.microsoft.com/forums/en-US/vbgeneral/thread/269b8950-2ef9-483f-8124-e2725ffd5d83/ 来源: https://stackoverflow.com/questions/659825

Transparent Background and No Buttons When Customizing Content of an AlertDialog on onPrepareDialog on Android

馋奶兔 提交于 2019-12-12 18:32:41
问题 I am having some difficulties to update the content of an AlertDialog on the onPrepareDialog method. I am setting the content of the AlertDialog, but the dialog comes to the screen with no buttons and no background. Probably the problem is related to the Builder . @Override protected Dialog onCreateDialog(int id) { switch (id) { case DIALOG_USER_INFORMATION: AlertDialog.Builder builder = new AlertDialog.Builder(this); return builder.create(); default: return null; } } @Override protected void

Android ShowDialog : IllegalStateException: Can not perform this action after onSaveInstanceState

[亡魂溺海] 提交于 2019-12-12 16:09:11
问题 In runOnUiThread() of an Activity, I'm trying to show a ProgressDialog. FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction(); ProgressDialogFragment mProgressDialogFragment = new ProgressDialogFragment(); mProgressDialogFragment.show(fragmentTransaction, TAG); Here ProgressDialogFragment extends DialogFragment . I have tested this in many devices and didn't get any crash. But whereas in Asus, I'm constantly getting the below crash whenever I show the dialog

WPF ShowDialog and ElementHost

↘锁芯ラ 提交于 2019-12-12 10:45:32
问题 is it possible to display a Modal Window from a WPF User Control, that is a child of an ElementHost, and set the owner/parent of the Modal Window to the containing Form control? I'm guessing you can't do this, as the Owner property takes an instance of Window, where as I want to set it to the parent of the Element Host control, which is an old Windows Forms Form control. Just wondering if there is a work around or alternative approach. The problem is when the Modal Window is displayed and the

How to convert this code that use deprecated methods?

巧了我就是萌 提交于 2019-12-12 05:39:21
问题 I'm using for my first time an AsyncTask class as inner class in my main activity class. Here is the code: // Async Task Class class fetchdata extends AsyncTask<String, String, String> { // Show Progress bar before downloading file @Override protected void onPreExecute() { super.onPreExecute(); // Shows Progress Bar Dialog and then call doInBackground method showDialog(progress_bar_type); } // Download File from Internet @Override protected String doInBackground(String... f_url) { int count;

ShowDialog in mdi

寵の児 提交于 2019-12-12 04:44:51
问题 I need to open with Showdialog() in mdi form because I need to stop code until the mdichild finish. The structure of program is this, I open a mdichild in onCreate of this I instead the class and in the constructor I open de SearchForm There's the code: frm_bsq_persona busqueda_persona = new frm_bsq_persona(); busqueda_persona.MdiParent = this.MdiParent.MdiParent; busqueda_persona.Show(); Thank you very much. 回答1: MDI child as dialog form (MDI modal workaround) http://www.codeproject.com

Android : showDialog when setContentView loading

有些话、适合烂在心里 提交于 2019-12-12 00:28:55
问题 There is a method for display an Indeterminate Dialog when setContentView loading ? I want to do this when the application load the google maps's mapView 回答1: THIS guy had a similar issue and he used this solution. LINK. hope you are able to find out how he did it. 来源: https://stackoverflow.com/questions/7154863/android-showdialog-when-setcontentview-loading

ShowDialog() ends prematurely if called from hidden windows

好久不见. 提交于 2019-12-11 04:00:42
问题 Consider this code: public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); Title = DateTime.Now.ToString(); } private void Button_Click(object sender, RoutedEventArgs e) { Hide(); new MainWindow().ShowDialog(); Show(); Debug.WriteLine(Title); } } The XAML is trivial: <Window x:Class="ShowHide.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <Grid> <Button Content="Test"