×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

IsCancelButton... or isn't?

IsCancelButton... or isn't?

IsCancelButton... or isn't?

(OP)
Colleagues,
Unless I misinterpret the meaning of this property in subject, once it's set to True, it fires this button's Click event when the User hits Esc key on keyboard - right?
So, besides having hotkey on my Exit button on form, I want to give the User possibility to just hit Esc key (instead of Alt+X, let alone Tab-ing to the Exit button through all the form).
So, I checked Help - there's IsCancel property in the System.Forms.Button class, which, according to https://learn.microsoft.com/en-us/dotnet/api/syste...,

"When you set the IsCancel property of a button to true, you create a Button that is ... then activated when a user presses the ESC key"... which is exactly what I need.

But this property in not in the button's property sheet in VS 2019 VB IDE! ponder



(FYI, in VFP this property of a Command Button is clearly visible in the Properties sheet! Can't recall if it was so in VB6...)

What am I missing or misunderstand?

Please advise!
TIA!
(Just in case: my WS is Windows 10, and it's MS VS 2019.)

Regards,

Ilya

RE: IsCancelButton... or isn't?

C heck yopur project type - believe property only exposed in WPF projects, not WFA

RE: IsCancelButton... or isn't?

(OP)
There's no WFP, only WFA type in the list:

Regards,

Ilya

RE: IsCancelButton... or isn't?

#Um - you pretty much can't just swich at the click of an option from WFA to WPF, they are very different beasts

RE: IsCancelButton... or isn't?

(OP)
Alas!
But thank you nonetheless.

Regards,

Ilya

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close