Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Harley Evans   on Dec 12 In MS Office Category.

  
Question Answered By: Lena Moore   on Dec 12

This bit at the top of a module (the declarations section):

Declare Function GetSystemMetrics Lib "user32" _
(ByVal nIndex As Long) As Long
Public Const SM_CXSCREEN = 0
Public Const SM_CYSCREEN = 1

This bit anywhere in a standard code module:

Sub DisplayVideoInfo()
vidWidth = GetSystemMetrics(SM_CXSCREEN)
vidHeight = GetSystemMetrics(SM_CYSCREEN)
Msg = "The current video mode is: "
Msg = Msg & vidWidth & " X " & vidHeight
MsgBox Msg
End Sub

I don't know how to set the screen  resolution/video mode from vba; I
suspect it's difficult. How about using the above information to set
window sizes, form sizes, zoom levels etc.

Share: 

 
 
Didn't find what you were looking for? Find more on Screen Resolution Or get search suggestion and latest updates.


Tagged: