佚名通过本文主要向大家介绍了虚心求教,求教,寇准求教,陈大慧向师父求教,求教的意思等相关知识,希望对您有所帮助,也希望大家支持linkedu.com www.linkedu.com
问题: 求教:将C#体温单程序改造成c++的activex组件
描述:
描述:
求指教,我该怎么入手。老师可以附送完整的源程序。
if (this.IsHandleCreated
&& this.Document != null
&& this.DesignMode == false )
{
using (Graphics g = pnlView.CreateGraphics())
{
// 计算页面框架视图边界
_PageBounds = new Rectangle(
10,
10,
(int)(g.DpiX * this.PageSettings.Bounds.Width / 100f),
(int)(g.DpiY * this.PageSettings.Bounds.Height / 100f));
if (_PageBounds.Width + 20 < this.ClientSize.Width)
{
_PageBounds.X = 10 + (this.ClientSize.Width - _PageBounds.Width) / 2;
}
// 计算文档视图边界
_DocumentBounds.X = _PageBounds.X + (int)(this.PageSettings.Margins.Left * g.DpiX / 100f);
_DocumentBounds.Y = _PageBounds.Y + (int)(this.PageSettings.Margins.Top * g.DpiY / 100f);
_DocumentBounds.Width = _PageBounds.Right - (int)(this.PageSettings.Margins.Right * g.DpiX / 100f) - _DocumentBounds.Left;
_DocumentBounds.Height = _PageBounds.Bottom - (int)(this.PageSettings.Margins.Bottom * g.DpiY / 100f) - _DocumentBounds.Top;
Size viewSize = new Size(
_PageBounds.Left + 10 ,
_PageBounds.Bottom + 10 );
if (pnlView.AutoScrollMinSize != viewSize)
{
pnlView.AutoScrollMinSize = viewSize;
}