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.

.NET Frage zu Formularen

Empfohlene Antworten

Veröffentlicht

Hallo Leute,

gibt es unter VB.NET die Möglichkeit, an ein Formular, welches man mit '.showdialog' anzeigt, einen Wert zu übergeben, den das Formular im Event 'FormLoad' abarbeiten kann. Wen ja, wäre ich für ein kleines Codebeispiel sehr dankbar. Ansonstern wäre es eine tolle Sache, wenn das Formular erkennen könnte, von welchem Button es aufgerufen wurde.

thx

Chiacomo

Du kannst in der Klasse, in der du die Form definierst, einfach die Funktion ShowDialog() überladen.


Public Class Form1

    Inherits System.Windows.Forms.Form

    Dim my_c As System.Windows.Forms.Control

    ...

    ...

    Public Overloads Function ShowDialog(ByRef c As System.Windows.Forms.Control) As System.Windows.Forms.DialogResult

        Me.my_c = c

        ShowDialog = Me.ShowDialog()

    End Function

End Class

HTH

gibt es unter VB.NET die Möglichkeit, an ein Formular, welches man mit '.showdialog' anzeigt, einen Wert zu übergeben, den das Formular im Event 'FormLoad' abarbeiten kann.

Der Formular-Klasse ein z.B. Property hinzufügen, welches Du vor dem ShowDialog Aufruf entsprechend setzt.

oder aber selber ne Methode im Formular schreiben, die "showdialog" aufruft, welche einen Parameter (in deinem Fall einen Button) erwartet und damt dann ein eigenes Property "füllen", wenn das zur Laufzeit gespeichert werden soll/muss.

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

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.