private void SetLocation() { DataTable dt = new DataTable(); int left = txtNewLeft.Text != "" ? (int)dt.Compute(txtNewLeft.Text, "") : m_WindowRect.Left; int top = txtNewTop.Text != "" ? (int)dt.Compute(txtNewTop.Text, "") : m_WindowRect.Top; int width = txtNewWidth.Text != "" ? (int)dt.Compute(txtNewWidth.Text, "") : m_WindowRect.Width - m_WindowRect.Left; int height = txtNewHeight.Text != "" ? (int)dt.Compute(txtNewHeight.Text, "") : m_WindowRect.Height - m_WindowRect.Top; User32Windows.SetWindowPos(m_Hwnd, User32Windows.HWND_TOP, left, top, width, height, User32Windows.SWP_NOZORDER); GetCharacteristics(); }