[StructLayout(LayoutKind.Sequential)]
public struct MENUINFO
{
public UInt32 cbSize;
public UInt32 fMask;
public UInt32 dwStyle;
public uint cyMax;
public IntPtr hbrBack;
public UInt32 dwContextHelpID;
public UIntPtr dwMenuData;
}
Private Structure MENUINFO
Dim cbSize As Int32
Dim fMask As Int32
Dim dwStyle As Int32
Dim cyMax As Int32
Dim hbrBack As IntPtr
Dim dwContextHelpID As Int32
Dim dwMenuData As Int32
Public Sub New(ByVal owner As Control)
cbSize = Marshal.SizeOf(GetType(MENUINFO))
End Sub
End Structure
None.
None.
MENUINFO mi = new MENUINFO();
mi.cbSize = System.Runtime.InteropServices.Marshal.SizeOf(typeof(MENUINFO));