private void formulariosToolStripMenuItem_Click(object sender, EventArgs e) { if (oContenedorForm != null) { WindowsForm.ShowMdi(oContenedorForm, Program.oFormPrincipal); } }
public void ShowWindowsForm() { Editor editor = Application.DocumentManager.MdiActiveDocument.Editor; try { var dlg = new WindowsForm(); Application.ShowModalDialog(dlg); } catch (System.Exception ex) { editor.WriteMessage(Environment.NewLine + "Error in Show Windows Form: " + ex.Message); } }
private void dataGridView1_DoubleClick(object sender, EventArgs e) { string person = ""; if (radioBtn_Staff.Checked == true) { person = "Staff"; } else if (radioBtn_Student.Checked == true) { person = "Student"; } WindowsForm wf = new WindowsForm(dataGridView1.CurrentRow.Cells[0].Value.ToString(), person); wf.Show(); }
//code refs //from https://docs.microsoft.com/en-us/dotnet/api/system.windows.forms.form?view=netframework-4.7.2 //https://docs.microsoft.com/en-us/dotnet/framework/winforms/how-to-create-event-handlers-at-run-time-for-windows-forms //https://docs.microsoft.com/en-us/dotnet/api/system.windows.forms.messagebox?view=netframework-4.7.2 private void Awake() { singleton = this; }
private void LaunchButton_Click(object sender, RoutedEventArgs e) { WindowsForm form = new WindowsForm(); form.Show(); }