hyhy
ich habe für mein smartphone ein wol script er funktioniert 1a mit windows mobile 5 - 6.1
ich weiss nicht wie ich das packet an eine ip senden kann, da ich mein rechner auch von unterwegs wecken will und nicht nur im lan
danke
ich habe für mein smartphone ein wol script er funktioniert 1a mit windows mobile 5 - 6.1
VB.NET-Quellcode
- Public Class Form1
- Private Sub SetReqExpression(ByVal TextSource As TextBox, ByRef SendString As String, ByRef reg As System.Text.RegularExpressions.Regex)
- SendString = "0x" & TextSource.Text
- Dim regex As String = "\b0[xX][0-9a-fA-F]+\b"
- Dim options As System.Text.RegularExpressions.RegexOptions = ((System.Text.RegularExpressions.RegexOptions.IgnorePatternWhitespace Or System.Text.RegularExpressions.RegexOptions.Multiline) _
- Or System.Text.RegularExpressions.RegexOptions.IgnoreCase)
- reg = New System.Text.RegularExpressions.Regex(regex, options)
- End Sub
- Private Sub InputError(ByVal TextSource As TextBox)
- TextSource.Focus()
- TextSource.Select(0, 2)
- End Sub
- Private Sub verifyInput(ByVal TextSource As TextBox)
- Dim SendString As String
- Dim reg As System.Text.RegularExpressions.Regex
- SetReqExpression(TextSource, SendString, reg)
- If reg.IsMatch(SendString) Then
- MsgBox("OK")
- Else
- MsgBox(TextSource)
- End If
- End Sub
- Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
- If TextBox1.Text.Length <> 2 Then Return
- TextBox2.Focus()
- End Sub
- Private Sub TextBox2_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox2.TextChanged
- If TextBox2.Text.Length <> 2 Then Return
- TextBox3.Focus()
- End Sub
- Private Sub TextBox3_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox3.TextChanged
- If TextBox3.Text.Length <> 2 Then Return
- TextBox4.Focus()
- End Sub
- Private Sub TextBox4_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox4.TextChanged
- If TextBox4.Text.Length <> 2 Then Return
- TextBox5.Focus()
- End Sub
- Private Sub TextBox5_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox5.TextChanged
- If TextBox5.Text.Length <> 2 Then Return
- TextBox6.Focus()
- End Sub
- Private Sub TextBox6_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox6.TextChanged
- If TextBox6.Text.Length <> 2 Then Return
- Button1.Focus()
- End Sub
- Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
- WoL.PacketSend(TextBox1.Text, TextBox2.Text, TextBox3.Text, TextBox4.Text, _
- TextBox5.Text, TextBox6.Text)
- MsgBox("Wakeup Gesendet!!", MsgBoxStyle.OkOnly, "INFO")
- End Sub
- Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click, Button2.Click
- Me.Close()
- End Sub
- Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
- TextBox1.Text = "00"
- TextBox2.Text = "1a"
- TextBox3.Text = "4d"
- TextBox4.Text = "5a"
- TextBox5.Text = "13"
- TextBox6.Text = "c6"
- PictureBox1.Image = My.Resources.Image1
- End Sub
- Private Sub PictureBox1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox1.Click
- MsgBox("WoL have fun")
- End Sub
- End Class
ich weiss nicht wie ich das packet an eine ip senden kann, da ich mein rechner auch von unterwegs wecken will und nicht nur im lan
danke