dcsimg

A method to reposition standard MsgBox windows from VB

WEBINAR:
On-Demand

Desktop-as-a-Service Designed for Any Cloud ? Nutanix Frame


This code allows you to reposition the standard MsgBox window. To use it in your program simply replace all calls to the standard MsgBox routine with a call to MsgBoxEx

The new routine has the following Format:


'
public Function MsgBoxEx(Prompt, optional X = -1, optional Y = -1, _
     optional StartupPosition as StartupPos = CenterScreen, _
     optional Buttons as VbMsgBoxStyle = vbOKOnly, optional Title, _
     optional HelpFile, optional Context) as VbMsgBoxResult
'
'

You can specify the startup x and y positions or even whether the message box is centered to the screen or the calling form.

Download Sample Project (3k)



Most Popular Programming Stories

More for Developers

RSS Feeds

Thanks for your registration, follow us on our social networks to keep up-to-date