Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Imports System.Security.Cryptography
- Imports System.Text
- Public Class Form1
- Dim TextBox_User As New TextBox
- Dim TextBox_Password As New TextBox
- WithEvents FrequenzBereich As New MyNewTextBox(TextBox_User, TextBox_Password)
- Public WithEvents KrabkenStein As New MyButton
- Public NumSticks As String
- Public KannIch_BuBiEinZahl As String ' = Nothing
- Public Sub New()
- 'MessageBox.Show(InputBox($"{KannIch_BuBiEinZahl}"))
- NumSticks = InputBox($"{KannIch_BuBiEinZahl}") '"Armagedon" 'KannIch_BuBiEinZahl '.Text.ToString
- ' Dieser Aufruf ist für den Designer erforderlich.
- InitializeComponent()
- SetUserToDefault(TextBox_User)
- SetPasswordToDefault(TextBox_Password)
- KrabkenStein.KonfettiKonfekt(KrabkenStein)
- ' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu.
- Me.Controls.AddRange({TextBox_User, TextBox_Password, KrabkenStein})
- End Sub
- Public Sub SetUserToDefault(TextBox_User As TextBox)
- With TextBox_User
- .Location = New Point(100, 100)
- .ForeColor = Color.Gray
- .Font = New Font("Arial", 10, FontStyle.Italic)
- .Text = "User Name"
- .TabStop = False
- End With
- End Sub
- Public Sub SetPasswordToDefault(TextBox_Password As TextBox)
- With TextBox_Password
- .Location = New Point(200, 200)
- .ForeColor = Color.Gray
- .Font = New Font("Arial", 10, FontStyle.Italic)
- .Text = "Password"
- .TabStop = False
- End With
- End Sub
- Private Sub FrequenzBereich_Enter(sender As Object, e As EventArgs) Handles FrequenzBereich.Enter
- Dim tb As TextBox = DirectCast(sender, TextBox)
- With tb
- .ForeColor = Color.Black
- .Font = New Font("Microsoft Sans Serif", 8, FontStyle.Regular)
- Select Case tb.Name
- Case "TextBox_User"
- If .Text = "User Name" Then
- .Clear()
- End If
- Case "TextBox_Password"
- If .Text = "Password" Then
- .Clear()
- End If
- End Select
- End With
- End Sub
- Private Sub FrequenzBereich_Leave(sender As Object, e As EventArgs) Handles FrequenzBereich.Leave
- Dim tb As TextBox = DirectCast(sender, TextBox)
- If tb.Text.Trim = "" Then
- Select Case tb.Name
- Case "TextBox_User"
- SetUserToDefault(FrequenzBereich)
- Case "TextBox_Password"
- SetPasswordToDefault(FrequenzBereich)
- End Select
- End If
- End Sub
- Private Sub Form1_KeyUp(sender As Object, e As KeyEventArgs) Handles Me.KeyUp
- Kein_Stress_beim_Essen(e)
- End Sub
- Public ix, slitter As Integer
- Public dest(5) As Char
- Public number As Integer = 0
- Sub Kein_Stress_beim_Essen(e As KeyEventArgs)
- Dim whilecatchOutsideoperators As New StringBuilder(NumSticks, 11) '
- For ix = 0 To slitter
- If slitter < 7 Then
- whilecatchOutsideoperators.CopyTo(ix * 1, dest, 1, 1)
- End If
- Next ix
- Select Case e.KeyCode
- Case Keys.Space
- slitter += 1
- Number += 1
- Me.Invalidate()
- End Select
- End Sub
- Private Sub Form1_Click(sender As Object, e As EventArgs) Handles Me.Click
- Me.ActiveControl = Nothing
- Form1_Enter(sender, e)
- End Sub
- Private Sub Form1_Enter(sender As Object, e As EventArgs) Handles Me.Enter
- Me.BackColor = Color.GreenYellow
- End Sub
- Private Sub Form1_Paint(sender As Object, e As PaintEventArgs) Handles Me.Paint
- With e.Graphics
- .DrawString(dest, New Font("Consolas", 22),
- New SolidBrush(Color.FromArgb(151, 201, 104, 221)), New Point(500, 100))
- End With
- End Sub
- End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement