Jump to content

AU3_DLL ControlMove Functions makes controls disappear


MITH
 Share

Recommended Posts

Hi,

I am trying to use ControlMove function AU3 DLL in VBA. The function instead of moving the control just makes it disappear. It only appears when I resize notepad manually.

Can anybody please help me and let me know whats the miss here

Here's the code I am working on:

Private Declare PtrSafe Function AU3_ControlMove Lib "C:\Program Files\AutoIt3\AutoItX\AutoItX3.dll" (ByVal szTitle As LongPtr, ByVal szText As LongPtr, ByVal szControl As LongPtr, ByVal nX As Integer, ByVal nY As Integer, nWidth As Integer, nHeight As Integer) As Long

Private Function ControlMove(szTitle As String, szControl As String, nX As Integer, nY As Integer, Optional nWidth As Integer = -1, Optional nHeight As Integer = -1, Optional szText As String = "") As Long
ControlMove = AU3_ControlMove(StrPtr(szTitle), StrPtr(szText), StrPtr(szControl), nX, nY, nWidth, nHeight)
End Function

Sub test()

ControlMove "Untitled - Notepad", "[CLASS:Edit; INSTANCE:1]", 0, 0, 150, 150

End Sub

The Edit Box in Notepad just disappears.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...