Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Empfohlene Antworten

Veröffentlicht

Hallo Leute,

mal eine Frage zu MDIs:

Ich habe 2 MDI-Childs:

-Child 1: WindowState: Maximized

-Child 2: WindowState: Normal; StartPosition: CenterScreen;

Child 1 ruft nun Child 2 auf:


frm_Schnellsuche Schnellsuche = new frm_Schnellsuche(this.Connection);

Schnellsuche.MdiParent = this.MdiParent;

Schnellsuche.Show();

Child 2 soll IMMER seine normale größe haben und nicht maximiert werden.

Doch in meinem Programm hat es nur seine vorgegebene Größe, wenn Child 1 vorher verkleinert wird. Sobald Child 1 maximiert ist, wird Child 2 dies auch; obwohl ich es anders eingestellt habe.

Ist das ein Bug oder muss das so sein? Gibt es einen Workaround?

LG, Luk :)

  • Autor

Hey, danke für deine Antwort!

Ja, so werde ich es wohl machen müssen... Doof... Direkt von Windows kennt man das ja auch so, dass es maximierte und normale Fenster gibt...

Aber gleich nochwas:

Ich bin auf folgendes gestoßen: MDI child as dialog form (MDI modal workaround) - CodeProject

Dieser Code bringt ein MDI-Child in den Vordergrund; wie eine richtige DialogBox und man kann es nicht in den Hintergrund klicken.

Ich öffne also mein Form:

            

frm_Schnellsuche Schnellsuche = new frm_Schnellsuche(this.Connection);


try

{

[INDENT]ShowChildDialog(Schnellsuche, ChildDemoForm_DialogReturned);[/INDENT]


}

Im Form Schnellsuche habe ich eine Property:

        public string GetName

        {

            get { return this.ResultName; } 

        }

Sie gibt mir eine Variable zurück. Wie oben ersichtlich, übergebe ich das Objekt Schnellsuche an die Funktion ShowChildDialog. In der Funktion ShowChildDialog bekomme ich für Schnellsuche.GetName nichts angezeigt (es erscheint nicht in der Auswahlliste von Visual Studio). Was mache ich da falsch? Danke, Luk :) EDIT: Habs gefunden - Sorry! Im Methodenkopf stande
 public void ShowChildDialog(Form Schnellform, 
statt
 public void ShowChildDialog(frm_Schnellform Schnellform, 

Bearbeitet von LukOnline

  • Autor

Eine Frage habe ich aber noch, dann läuft es ^^

ChildDemoForm_DialogReturned(object sender, DialogResultArgs e)
Dieser Methodenkopf wird im Beispielcode nur so aufgerufen:
ChildDemoForm_DialogReturned
Ich möchte ihm aber gern noch einen dritten Parameter mitgeben - einen string:
ChildDemoForm_DialogReturned(object sender, DialogResultArgs e, string TEST)

Wie rufe ich aber jetzt die Methode auf - also was übergebe ich für object sender und DialogResultArgs e???

Wäre super wenn mir nochmal jemand helfen könnte!

Danke im voraus schonmal!

Erstelle ein Konto oder melde dich an, um einen Kommentar zu schreiben.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.