Results 1 to 4 of 4

Thread: Put Focus on MessageBox button

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Feb 2003
    Posts
    219

    Question Put Focus on MessageBox button

    Is there a way to put a focus on a MessageBox button? Forexample, if I have a MessageBoxButton.RetryCancle and I want to put the focus on the Cancel button, how do I go about doing so?

    Any help is appreciated.

    ljCharlie

  2. #2
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428
    have you looked at the default button parameter?
    messagebox.Show (,,,,MessageBoxDefaultButton.Button1)
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Feb 2003
    Posts
    219
    Many thanks for your reponse. No, I have not. But will MessageBoxDefaultButton.Button1 set the change the focus to the button1?

    ljCharlie

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Feb 2003
    Posts
    219
    Never mind, it doesn't work. I just tried with the MessageBoxDefaultButton.Button1 and it's not shifting the actual focus from the txtPassword to the button1. Button1 does have the focus...but it's not shifting from txtPassword textbox so that means txtPassword will still trying to catch the Enter key. I wish there is a lostfocus like the good old days of VB6.

    ljCharlie

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width