CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: msgbox

  1. #1
    Join Date
    Jul 2006
    Posts
    54

    Smile msgbox

    hi all,

    Is it possible to set the default focus in cancel button for vbOKCancel to prevent user accidently press enter

    thanks

  2. #2
    Join Date
    Oct 2006
    Location
    slavia
    Posts
    42

    Re: msgbox

    hope this link could give u answer
    http://www.planetsourcecode.com/URLSEO/vb/scripts/ShowCode!asp/txtCodeId!66704/lngWid!1/anyname.htm
    http://groups.google.com/group/micro...5c3651d1dfb462
    or
    ..maybe.. u could try another way.. by creating ur own vbOKCancel msgbox form.
    consist of a form, contain two button OK and Cancel.
    it will be more flexible i think, since u can customize it by ur own.

    hope this gonna help

  3. #3
    Join Date
    Jun 2004
    Location
    Kashmir, India
    Posts
    6,808

    Re: msgbox

    Yes is it pretty easy
    Code:
    MsgBox("Are you sure", vbOKCancel + vbDefaultButton2)

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

Featured