internal void DisableShadow(IntPtr handle)
        {
            var cs = NATIVE.GetClassLong(handle, NATIVE.GCL_STYLE);

            if ((cs & NATIVE.CS_DROPSHADOW) == NATIVE.CS_DROPSHADOW)
            {
                cs = cs & ~NATIVE.CS_DROPSHADOW;
                NATIVE.SetClassLong(handle, NATIVE.GCL_STYLE, cs);
            }
        }
Ejemplo n.º 2
0
 //connector *motion[4];
 //PBRAIN_STEM brainstem; // connectors to the body
 void Tick(void)
 {
     //DebugBreak();
     current_angle += (turn / 8.0);
     if (current_angle > 256.0)
     {
         current_angle -= 512.0;
     }
     if (current_angle < -256.0)
     {
         current_angle += 512.0;
     }
 }
Ejemplo n.º 3
0
        private void FrmCLI_Load(object sender, EventArgs e)
        {
            var notificationControl = new NotificationControl();

            this.Controls.Add(_progressbarMain);
            this.Controls.Add(notificationControl);

            this.Width  = (this.Width - this.ClientSize.Width) + _progressbarMain.Width;
            this.Height = (this.Height - this.ClientSize.Height) + _progressbarMain.Height;
            this.Text   = "Exporting...";
            this.Icon   = BrandingManager.MainForm_Icon;

            this.StartPosition = FormStartPosition.Manual;

            var firstNetfabbProcess = Process.GetProcessesByName("netfabb").FirstOrDefault();

            //develop

            if (firstNetfabbProcess == null)
            {
                firstNetfabbProcess = Process.GetProcessesByName("autodesknetfabb_debug").FirstOrDefault();
            }

            if (firstNetfabbProcess != null)
            {
                foreach (var handle in NATIVE.EnumerateProcessWindowHandles(firstNetfabbProcess.Id))
                {
                    var windowTextLength = NATIVE.GetWindowTextLength(handle);
                    var windowText       = new StringBuilder(windowTextLength + 1);
                    NATIVE.GetWindowText(handle, windowText, windowTextLength);
                    if (windowText.ToString().ToLower().Contains("autodesk netfabb"))
                    {
                        var windowInfo = new NATIVE.WINDOWINFO();
                        var result     = NATIVE.GetWindowInfo(handle, ref windowInfo);
                        this.Left = windowInfo.rcClient.Left + ((windowInfo.rcWindow.Right - windowInfo.rcWindow.Left) / 2) - (this.Width / 2);
                        this.Top  = windowInfo.rcWindow.Top + ((windowInfo.rcWindow.Bottom - windowInfo.rcWindow.Top) / 2) + (this.Height / 2);
                        break;
                    }
                }
            }
        }
        private void MoveToButtonLocation(IntPtr handle, Rectangle bounds)
        {
            var location = new Point(frmStudioMain.SceneControl.ParentForm.Left + this.ParentControl.Location.X - this.Width - this.ToolTipOffsetX + 4, frmStudioMain.SceneControl.ParentForm.Top + this.ParentControl.Top + (int)this.Tracker._trackerRect.Y + ((int)this.Tracker._trackerRect.Height / 2) + 70 + 23);

            NATIVE.MoveWindow(handle, location.X, location.Y, bounds.Width, bounds.Height, false);
        }
        private void MoveToButtonLocation(IntPtr handle, Rectangle bounds)
        {
            var location = new Point(this.ParentToolbar.ParentForm.Left + this.ParentToolbar.Location.X - this.Width - this.ToolTipOffsetX, this.ParentToolbar.ParentForm.Top + this.ParentToolbar.Location.Y + 70 + this.Button.Location.Y + this.Button.Bounds.Height - 3);

            NATIVE.MoveWindow(handle, location.X, location.Y, bounds.Width, bounds.Height, false);
        }