![]() In VB.Net (Visual Basic 2008 Express Edition) when I try to use windows API GetWindowRect I get an AccessViolationException (Attempted to read or write protected memory). VbCrLf & "Bottom = " & NotepadRect. 1 Comment 1 Solution 7674 Views Last Modified. GetWindowRect(NotepadHandl e, NotepadRect) The code seems to work just fine in Windows 8 and 10 as tested during September 2015. The VBA code shown below is a modified version of Microsofts snippet. NotepadHandle = FindWindow("Notepad", "Untitled - Notepad") To use Windows API calls to copy information to the Clipboard read this Microsoft article. If so, youd get 5.1, the internal version number of Windows XP. ![]() Are you perhaps running Access 2002 in Windows XP compatibility mode See the Compatibility tab of the Properties window of the shortcut you use to start Excel. Private Sub MoveIt_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MoveIt.Click Windows 7 should be 6.1 (Windows Vista 6.0, Windows 7 6.1 and Windows 8 6.2). ![]() Private Declare Function GetWindowRect Lib "user32" Alias "GetWindowRect" (ByVal hwnd As Integer, ByVal lpRect As RECT) As Integer Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Integer Can you tell me what I am doing wrong? Here is my code ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |