When I try to put "Form.KeyPreview = True" it's giving me "Decleration Expected" Error message

164 views Asked by At

I'm new with KeyPreview. I've read a bit about it but I still don't understand everything. In my code I put "Form.KeyPreview = True" But then it says "Declaration expected" under Form. I don't know what I need to declare though. I don't know if I need to put it under a private sub, but I need help. Here is the code snippet

Public Class Form1

Form.KeyPreview = True
Private Sub TextBox1_TextChanged(sender As Object, e As EventArgs) Handles TextBox1.TextChanged
    Select Case True

Here is a picture of the code. Anyways thanks for your help.

0

There are 0 answers