private void panelProperties_Selecting(object sender, TabControlCancelEventArgs e)
{
if (CurrentProto == null) return;
TabPage Tab=GetTabPageByItemType(CurrentProto.Type);
if(Tab==null) return;
if (Tab != e.TabPage)
e.Cancel = Config.LockTabs;
else
WinAPI.SetWindowExFlag(MainObj.Handle, (int)Win32.WS_EX_COMPOSITED);
}