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

Das Beispiel ist aus Visual Basic.NET von Michael Kofler...was mache ich falsch? Wäre super wenn mir jemand die Augen öffnen könnte. Vielleicht sogar verbessert...

edit: Ist ein einfacher Texteditor eine Textbox (mehrzeilig) ein speichern und ein öffnen Button.

Danke:hells:


Public Class Form1

    Inherits System.Windows.Forms.Form


    Dim textHasChanged As Boolean


    'Datei laden

    Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click

        If OpenFileDialog1.ShowDialog() = DialogResult.OK Then

            'Datei lesen und darstellen

            Dim enc As System.Text.Encoding = System.Text.Encoding.GetEncoding(1252)

            Dim sr As New IO.StreamReader(OpenFileDialog1.FileName, enc)

            TextBox1.Text = sr.ReadToEnd()

            sr.Close()

            textHasChanged = False

        End If

    End Sub

    'Datei speichern

    Private Sub Button2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button2.Click

        SaveFileDialog1.FileName = OpenFileDialog1.FileName

        If SaveFileDialog1.ShowDialog() = DialogResult.OK Then

            'Datei lesen und darstellen

            Dim enc As System.Text.Encoding = System.Text.Encoding.GetEncoding(1252)

            Dim sw As New IO.StreamWriter(SaveFileDialog1.FileName, False, enc)

            sw.Write(TextBox1.Text)

            textHasChanged = False

        End If

    End Sub

End Class

Der Code im "Windows Form Designer generated code" war unterschiedlich...somit habe ich anscheinend irgendwo einen winzigen Fehler gehabt. Es war nicht möglich, das Programm zu starten, da irgendwelche deklarationen fehlten...

Thema somit erledigt. :rolleyes:

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.