Is there specific control which can help me embed the Session screen within my application and interact with the screen data. Any help is greatly appreciated.
Thanks
Amit
Application Delivery Management
Application Modernization & Connectivity
IT Operations Management
CyberRes
public partial class Form1 : Form
{
private const int WS_CAPTION = 0xC00000;
private enum SetWindowPosFlags : uint
{
AsynchronousWindowPosition = 0x4000,
DeferErase = 0x2000,
DrawFrame = 0x0020,
FrameChanged = 0x0020,
HideWindow = 0x0080,
DoNotActivate = 0x0010,
DoNotCopyBits = 0x0100,
IgnoreMove = 0x0002,
DoNotChangeOwnerZOrder = 0x0200,
DoNotRedraw = 0x0008,
DoNotReposition = 0x0200,
DoNotSendChangingEvent = 0x0400,
IgnoreResize = 0x0001,
IgnoreZOrder = 0x0004,
ShowWindow = 0x0040
}
private enum WindowLongFlags : int
{
GWL_EXSTYLE = -20,
GWLP_HINSTANCE = -6,
GWLP_HWNDPARENT = -8,
GWL_ID = -12,
GWL_STYLE = -16,
GWL_USERDATA = -21,
GWL_WNDPROC = -4,
DWLP_USER = 0x8,
DWLP_MSGRESULT = 0x0,
DWLP_DLGPROC = 0x4
}
[DllImport("user32.dll", SetLastError=true)]
static extern int GetWindowLong(IntPtr hWnd, int nIndex);
[DllImport("user32.dll")]
static extern int SetWindowLong(IntPtr hWnd, int nIndex, int dwNewLong);
[DllImport("user32.dll", SetLastError = true)]
static extern IntPtr SetParent(IntPtr hWndChild, IntPtr hWndNewParent);
[DllImport("user32.dll")]
[return: MarshalAs(UnmanagedType.Bool)]
static extern bool SetWindowPos(IntPtr hWnd, IntPtr hWndInsertAfter, int X, int Y, int cx, int cy, SetWindowPosFlags uFlags);
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
IntPtr hGroupbox1 = this.groupBox1.Handle;
EXTRA.ExtraSessions sessions = new ExtraSessions();
EXTRA._Session sess1 = (_Session)sessions.Open("Session1.edp");
IntPtr hSess1 = (IntPtr)sess1.WindowHandle;
SetParent(hSess1, hGroupbox1);
int getlongval = GetWindowLong(hSess1, (int)WindowLongFlags.GWL_STYLE);
getlongval = getlongval