HLRosenberger
asked on
Windows and Extended desktop
Did you mean to make X an integer array, Public Property X() As Integer, or did you mean to make it an integer like this, Public Property X As Integer?
Depends on the syntax error.
Otherwise, just check if this is on top of your code:
Imports System.Runtime.InteropServ ices
Otherwise, just check if this is on top of your code:
Imports System.Runtime.InteropServ
as per the definition on http://www.pinvoke.net/default.aspx/Structures/POINT.html, X is not an array (as pointed by Fernando). You need to remove the () after X:
<StructLayout(LayoutKind.Sequential)>
Public Structure IntegerPoint
Public Property X As Integer
Public Property Y As Integer
End Structure
ASKER
Nothing I try works, using that <StructLayout(LayoutKind.S equential) > syntax.
This below works just fine. Is there any difference?
Public Structure IntegerPoint
Public x As Integer
Public y As Integer
End Structure
Public Structure IntegerRect
Public Left As Integer
Public Top As Integer
Public Width As Integer
Public Height As Integer
End Structure
Public Structure WindowPlacement
Public Length As Integer
Public Flags As Integer
Public ShowCommand As Integer
Public MinPosition As IntegerPoint
Public MaxPosition As IntegerPoint
Public NormalPosition As IntegerRect
End Structure
This below works just fine. Is there any difference?
Public Structure IntegerPoint
Public x As Integer
Public y As Integer
End Structure
Public Structure IntegerRect
Public Left As Integer
Public Top As Integer
Public Width As Integer
Public Height As Integer
End Structure
Public Structure WindowPlacement
Public Length As Integer
Public Flags As Integer
Public ShowCommand As Integer
Public MinPosition As IntegerPoint
Public MaxPosition As IntegerPoint
Public NormalPosition As IntegerRect
End Structure
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
What is the exact error you are getting now? Please post.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks for the help.
ASKER
thanks.