1
我寫了一個小模塊,試圖獲得屏幕放大值。它會在magnification.dll中調用一些過程。我想我編碼正確,但我得到一個可怕的453錯誤(無法找到入口點)。在VBA中使用Magnification API來獲得屏幕放大率
下面的代碼:
Public Declare Function MagInitialize Lib "magnification.dll"() As Boolean
Public Declare Function MagUninitialize Lib "magnification.dll"() As Boolean
Public Declare Function MagGetFullscreenTransform Lib "magnification.dll" _
(ByVal pMagLevel As Single, ByVal pxOffset As Integer, ByVal pyOffset As Integer) As Boolean '
Sub test123()
Dim sngValue As Single, intX As Integer, intY As Integer
If (MagInitialize) Then
If MagGetFullscreenTransform(sngValue, intX, intY) Then '
Debug.Print sngValue & " was returned from MagGetFullscreenTransform. "
Else
Debug.Print "MagGetFullscreenTransform was false."
End If
Else
Debug.Print "Can't initialize"
End If
If Not (MagUninitialize) Then
Debug.Print "Can't uninitialize"
End If
End Sub
我不知道程序別名(不,它需要一個,據我所知,別名是可選的)。我試圖「檢查」Magnification.dll作爲我的Excel項目中的參考,但它不會讓我。 (不能添加對指定文件的引用)。
對此提出建議?我只需要拉大放大值。
謝謝!
正確。我在Windows 7上。我想知道是否有另一種方法來控制屏幕放大。 – Harry 2012-01-14 22:23:04