lock control

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Here is some old code that was used to lock a control. Dot Net does not seem to like the AnObj.hwnd. Any suggestions on how to fix this. Thank

Public Sub LockControl(ByRef AnObj As Object, ByRef LockIt As Boolean
If LockIt The
api.LockWindowUpdate(AnObj.hwnd
Els
api.LockWindowUpdate(0
AnObj.Refresh(
End I
End Sub
 
It also looks like this was part of the code that use to work previously

Public Declare Function LockWindowUpdate Lib "user32" (ByVal hwndLock As Integer) As Intege
Thanks for any help anyone can give me
 
* "=?Utf-8?B?bWlrZQ==?= said:
It also looks like this was part of the code that use to work previously.

Public Declare Function LockWindowUpdate Lib "user32" (ByVal hwndLock As Integer) As Integer

In VB6, the 'Integer's must have been 'Long's. For .NET, use a
'Boolean' as return type, 'hwndLock' should be an 'IntPtr'.
 
Back
Top