Click here to Skip to main content
16,014,637 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
This is my code for set the form properties
VB
Imports System.Windows.Forms.Form
Public Class formProperties
    Public Sub FormProperty(ByRef myForm As System.Windows.Forms.Form)
        myForm.SuspendLayout()
        myForm.Text = "BLA BLA BLA"
        myForm.StartPosition = FormStartPosition.CenterScreen
        myForm.ShowInTaskbar = False
        myForm.MaximizeBox = False
        myForm.MinimizeBox = False
        myForm.FormBorderStyle = Windows.Forms.FormBorderStyle.FixedSingle
    End Sub
End Class


and this code is how i use this class
VB
Dim myf As formProperties = New formProperties
    myf.FormProperty(Form2)
    Form2.ShowDialog()


I want to make if i press escape key in the form..it will be hide or close the form...
but i haven't idea...
can anybody help me to fix this problems....

thx
Posted
Updated 17-Feb-10 6:27am
v4

The escape key should just do that. If not, handle the KeyPressed event
 
Share this answer
 
can you show me the code for fix my problem chris....
thx
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900