Thank you Alex,
using byref now it doesn't give me error but the
structure after the execution of the function remain
empty, the full code is this:
==================================================
Public Class Sip
<System.Runtime.InteropServices.DllImport
("coredll.dll")> Private Shared Function SipShowIM(ByVal i
As SIPStatus) As Integer
End Function
<System.Runtime.InteropServices.DllImport
("coredll.dll")> Private Shared Function SipSetInfo(ByRef
si As SIPINFO) As Boolean
End Function
<System.Runtime.InteropServices.DllImport
("coredll.dll")> Private Shared Function SipGetInfo(ByRef
si As SIPINFO) As Boolean
End Function
Private Enum SIPStatus
SIPF_OFF = 0
SIPF_ON
End Enum
Private Structure SIPINFO
Public cbSize As Int32
Public fdwFlags As Int32
Public rcVisibleDesktop As RECT
Public rcSipRect As RECT
Public dwImDataSize As Int32
Public pvImData As Int32
End Structure
Private Structure RECT
Public left As Int32
Public top As Int32
Public right As Int32
Public bottom As Int32
End Structure
' Mostrar el SIP
Public Shared Sub Show()
SipShowIM(SIPStatus.SIPF_ON)
End Sub
' Ocultar el SIP
Public Shared Sub Hide()
SipShowIM(SIPStatus.SIPF_OFF)
End Sub
Public Shared Sub SetPosition(ByVal x as int32,ByVal y
as int32)
Dim mySi As New SIPINFO
SipGetInfo(mySi)
mySi.rcSipRect.left = 0
mySi.rcSipRect.top = 60
SipSetInfo(mySi)
End Sub
End Class
==================================================
I want to set the position of SIP through the SipGetInfo
(to get the current position) and SipSetInfo (to set the
new position) but, how I've told above the structure
SIPINFO remain empty after the SipGetInfo and if i set
manually the SIPINFO structure the SIP doesn't change
position.
Thank you all for attention.
Antonio.
|