Dual Screen and VBA

FoeHunter

Board Regular
Joined
Nov 12, 2008
Messages
236
I have a form, cleverly called “background” that is maximized to “hide” the access program. The only problem is when someone is using more than 1 monitor, the background is sometimes is displayed on the other monitor…hiding nothing. Is there a way to have access check to see what screen it is displayed on and put it all on the same one or is this just a windows quirk?

Clear as mud?
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Probably not the “right” way to do this, but by using the following code, I move the form to the screen that access is open on, then executes the rest.
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>
Code:
Private Sub Form_Load()
' Resizes the window
    'http://msdn.microsoft.com/en-us/library/aa221370(v=office.11).aspx
    Forms(0).Move _
        Left:=0, Top:=0, Width:=0, Height:=0
    DoCmd.Maximize
' Centers the image horizontally
    Me.Image1.Left = (Me.InsideWidth - Me.Image1.Width) * 0.5
' Places the image just above vertical center
    Me.Image1.Top = (Me.InsideHeight - Me.Image1.Height) * 0.4
    DoCmd.OpenForm "MainMenu"
End Sub

I figured someone else will find a use for this in the future.
 
Upvote 0

Forum statistics

Threads
1,224,595
Messages
6,179,798
Members
452,943
Latest member
Newbie4296

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top