A method to reposition standard MsgBox windows from VB

Saturday Feb 7th 2004 by Aaron Young
Share:

Use This small BAS module to allow you to reposition any standard MsgBox window. (Added: 1-Mar-2000)

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)

Share:
Home
Mobile Site | Full Site
Copyright 2017 © QuinStreet Inc. All Rights Reserved