pb mit tastatur bewegen

  • VB.NET

    pb mit tastatur bewegen

    hey leute,

    ich habe ne picturebox, die ich mit der tastatur nach oben und unten bwegen will. bis vorhin gings auch noch. muss wohl irgendwie noch nen fehler eingebaut haben. hier mein code:

    VB.NET-Quellcode

    1. Dim dp = New Drawing.Point
    2. dp = PictureBox2.Location
    3. If e.KeyCode = Keys.Down Then
    4. dp.y() = dp.y + 10
    5. PictureBox2.Location = dp
    6. End If
    7. If e.KeyCode = Keys.Up Then
    8. dp.y() = dp.y - 10
    9. PictureBox2.Location = dp
    10. End If
    11. If e.KeyCode = Keys.S Then
    12. Timer1.Start()
    13. End If
    14. If e.KeyCode = Keys.Escape Then
    15. Close()
    16. End If



    kann mir einer sagen wo der fehler da drin is, oder liegt es daran das ich auch noch zusätzlich nen mosuemove für die gleiche pb hab? anfangs ging beides zusammen. danke schonma für eure hilfe

    Edit by LaMa5: VB-Tag eingefügt

    Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von „LaMa5“ ()