[API] Titelleiste Blinken lassen

    • VB.NET

    Es gibt 4 Antworten in diesem Thema. Der letzte Beitrag () ist von Nikx.

      [API] Titelleiste Blinken lassen

      Hey,
      ich hab mal diesen Code von VB 5/6 auf VB.NET "übersetzt":

      VB.NET-Quellcode

      1. Public Class Form1
      2. Private Declare Function FlashWindow Lib "user32" ( _
      3. ByVal hwnd As Integer, ByVal bInvert As Integer) As Integer
      4. Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
      5. Timer1.Enabled = True
      6. Timer1.Interval = 500
      7. Button1.Text = "Manueller Schalter"
      8. Option1.Text = "Manuell"
      9. Option2.Text = "Automatisch"
      10. Option2.Checked = True
      11. End Sub
      12. Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
      13. If Option1.Checked Then
      14. Call FlashWindow(Me.Handle, True)
      15. End If
      16. End Sub
      17. Private Sub Timer1_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles Timer1.Tick
      18. If Option2.Checked Then
      19. Call FlashWindow(Me.Handle, True)
      20. End If
      21. End Sub
      22. End Class


      ich hoffe ihr könnt damit etwas anfangen^^

      lg.
      Hab das ganze mal auf die Heutige Zeit(2015) angepasst ;D

      VB.NET-Quellcode

      1. Public Class Form1
      2. Private Declare Function FlashWindow Lib "user32" (hwnd As IntPtr, bInvert As Integer) As Integer
      3. Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
      4. FlashWindow(Handle, 1)
      5. End Sub
      6. Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
      7. Timer1.Enabled = True
      8. Timer1.Interval = 500
      9. End Sub
      10. End Class
      In general (across programming languages), a pointer is a number that represents a physical location in memory. A nullpointer is (almost always) one that points to 0, and is widely recognized as "not pointing to anything". Since systems have different amounts of supported memory, it doesn't always take the same number of bytes to hold that number, so we call a "native size integer" one that can hold a pointer on any particular system. - Sam Harwell
      Darf ich fragen wo da jetzt der Unterschied liegt?
      Wenn ich nichts übersehen habe, dann hast du nur alle Controls und Optionen rausgekürzt.

      Grüße
      "Life isn't about winning the race. Life is about finishing the race and how many people we can help finish the race." ~Marc Mero

      Nun bin ich also auch soweit: Keine VB-Fragen per PM! Es gibt hier ein Forum, verdammt!
      Ist mir nicht aufgefallen.
      Grüße
      "Life isn't about winning the race. Life is about finishing the race and how many people we can help finish the race." ~Marc Mero

      Nun bin ich also auch soweit: Keine VB-Fragen per PM! Es gibt hier ein Forum, verdammt!