Hi all,
Thank you for all your support and time for taking a look into my problem.
I am posting my code which solved the issue below.
long style = WinAPI.GetWindowLongPtr(new HandleRef(this,console.MainWindowHandle), WinAPIConstants.GWL_STYLE).ToInt64();
style= style & ~(WinAPIConstants.WS_CAPTION |
WinAPIConstants.WS_BORDER |
WinAPIConstants.WS_DLGFRAME);
IntPtr styleValue = new IntPtr(style);
Rectangle displayRectangle = newTab.DisplayRectangle;
WinAPI.SetWindowLongPtr(new HandleRef( this,console.MainWindowHandle),
WinAPIConstants.GWL_STYLE, styleValue);
style = WinAPI.GetWindowLongPtr(new HandleRef(this, console.MainWindowHandle), WinAPIConstants.GWL_STYLE).ToInt64();
style &= ~WinAPIConstants.WS_POPUP;
style |= WinAPIConstants.WS_CHILD;
styleValue = new IntPtr(style);
WinAPI.SetWindowLongPtr(new HandleRef(this, console.MainWindowHandle), WinAPIConstants.GWL_STYLE, styleValue);
WinAPI.SetParent(console.MainWindowHandle, newTab.Handle);