Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/283.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Can';在Visual Studio 2008中使用鼠标调整控件的大小(C#,.NET Compact)_C#_Winforms_Visual Studio 2008_Compact Framework_Windows Mobile 6 - Fatal编程技术网

Can';在Visual Studio 2008中使用鼠标调整控件的大小(C#,.NET Compact)

Can';在Visual Studio 2008中使用鼠标调整控件的大小(C#,.NET Compact),c#,winforms,visual-studio-2008,compact-framework,windows-mobile-6,C#,Winforms,Visual Studio 2008,Compact Framework,Windows Mobile 6,我正在Visual Studio 2008中为windows Mobile 6开发windows窗体应用程序。每个表单上都需要一些通用控件,例如徽标(PictureBox)、标题(Label)和小说明(也称为Label)。我决定用这些控件创建一个表单库,并从该库继承其他表单 问题是,由于某种原因,当我在继承的表单上放置按钮或其他控件时,我无法用鼠标调整其大小。我可以用键盘快捷键按Shift+Arrow来调整任何东西的大小,但鼠标不起作用 这对我和我团队中的其他开发人员来说都不是很方便 有什么建议

我正在Visual Studio 2008中为windows Mobile 6开发windows窗体应用程序。每个表单上都需要一些通用控件,例如徽标(PictureBox)、标题(Label)和小说明(也称为Label)。我决定用这些控件创建一个表单库,并从该库继承其他表单

问题是,由于某种原因,当我在继承的表单上放置按钮或其他控件时,我无法用鼠标调整其大小。我可以用键盘快捷键按Shift+Arrow来调整任何东西的大小,但鼠标不起作用

这对我和我团队中的其他开发人员来说都不是很方便

有什么建议吗

更新1 基本形式:

public class FormBase : Form
{
    public FormBase()
    {
        InitializeComponent();
    }


    /// <summary>
    /// Required designer variable.
    /// </summary>
    private System.ComponentModel.IContainer components = null;

    /// <summary>
    /// Clean up any resources being used.
    /// </summary>
    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
    protected override void Dispose(bool disposing)
    {
        if (disposing && (components != null))
        {
            components.Dispose();
        }
        base.Dispose(disposing);
    }

    #region Windows Form Designer generated code

    /// <summary>
    /// Required method for Designer support - do not modify
    /// the contents of this method with the code editor.
    /// </summary>
    private void InitializeComponent()
    {
        System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormBase));
        this.pictureLogo = new System.Windows.Forms.PictureBox();
        this.labelTitle = new System.Windows.Forms.Label();
        this.panelSeparator = new System.Windows.Forms.Panel();
        this.SuspendLayout();
        // 
        // pictureLogo
        // 
        this.pictureLogo.Image = ((System.Drawing.Image)(resources.GetObject("pictureLogo.Image")));
        this.pictureLogo.Location = new System.Drawing.Point(0, 0);
        this.pictureLogo.Name = "pictureLogo";
        this.pictureLogo.Size = new System.Drawing.Size(48, 48);
        // 
        // labelTitle
        // 
        this.labelTitle.Font = new System.Drawing.Font("Tahoma", 10F, System.Drawing.FontStyle.Bold);
        this.labelTitle.ForeColor = System.Drawing.Color.Black;
        this.labelTitle.Location = new System.Drawing.Point(54, 2);
        this.labelTitle.Name = "labelTitle";
        this.labelTitle.Size = new System.Drawing.Size(183, 16);
        this.labelTitle.Text = "Title";
        // 
        // panelSeparator
        // 
        this.panelSeparator.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                    | System.Windows.Forms.AnchorStyles.Right)));
        this.panelSeparator.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(35)))), ((int)(((byte)(44)))), ((int)(((byte)(75)))));
        this.panelSeparator.Location = new System.Drawing.Point(3, 50);
        this.panelSeparator.Name = "panelSeparator";
        this.panelSeparator.Size = new System.Drawing.Size(234, 1);
        // 
        // FormBase
        // 
        this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
        this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
        this.AutoScroll = true;
        this.BackColor = System.Drawing.Color.White;
        this.ClientSize = new System.Drawing.Size(240, 320);
        this.ControlBox = false;
        this.Controls.Add(this.panelSeparator);
        this.Controls.Add(this.labelTitle);
        this.Controls.Add(this.pictureLogo);
        this.ForeColor = System.Drawing.Color.Black;
        this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
        this.KeyPreview = true;
        this.Location = new System.Drawing.Point(0, 0);
        this.MinimizeBox = false;
        this.Name = "FormBase";
        this.Text = "FormBase";
        this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
        this.ResumeLayout(false);

    }

    #endregion

    private System.Windows.Forms.PictureBox pictureLogo;
    private System.Windows.Forms.Label labelTitle;
    private System.Windows.Forms.Panel panelSeparator;
}
公共类表单库:表单
{
公共表单库()
{
初始化组件();
}
/// 
///必需的设计器变量。
/// 
private System.ComponentModel.IContainer components=null;
/// 
///清理所有正在使用的资源。
/// 
///如果应释放托管资源,则为true;否则为false。
受保护的覆盖无效处置(布尔处置)
{
if(处理和(组件!=null))
{
组件。Dispose();
}
基地。处置(处置);
}
#区域Windows窗体设计器生成的代码
/// 
///设计器支持所需的方法-不修改
///此方法的内容与代码编辑器一起使用。
/// 
私有void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager资源=新的System.ComponentModel.ComponentResourceManager(typeof(FormBase));
this.pictureLogo=new System.Windows.Forms.PictureBox();
this.labelTitle=new System.Windows.Forms.Label();
this.panelSeparator=new System.Windows.Forms.Panel();
这个.SuspendLayout();
// 
//pictureLogo
// 
this.pictureLogo.Image=((System.Drawing.Image)(resources.GetObject(“pictureLogo.Image”));
this.pictureLogo.Location=新系统.Drawing.Point(0,0);
this.pictureLogo.Name=“pictureLogo”;
this.pictureLogo.Size=新系统.Drawing.Size(48,48);
// 
//标签
// 
this.labelTitle.Font=new System.Drawing.Font(“Tahoma”,10F,System.Drawing.FontStyle.Bold);
this.labelTitle.ForeColor=System.Drawing.Color.Black;
this.labelTitle.Location=新系统.图纸.点(54,2);
this.labelTitle.Name=“labelTitle”;
this.labelTitle.Size=新系统图纸尺寸(183,16);
this.labelTitle.Text=“Title”;
// 
//面板分离器
// 
this.panelSeparator.Anchor=((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|System.Windows.Forms.AnchorStyles.Right);
this.panelSeparator.BackColor=System.Drawing.Color.FromArgb(((int)((字节)(35)),((int)((字节)(44)),((int)((字节)(75)())))));
this.panelSeparator.Location=新系统.图纸.点(3,50);
this.panelSeparator.Name=“panelSeparator”;
this.panelSeparator.Size=新系统图纸尺寸(234,1);
// 
//FormBase
// 
this.AutoScaleDimensions=新系统.Drawing.SizeF(96F,96F);
this.AutoScaleMode=System.Windows.Forms.AutoScaleMode.Dpi;
this.AutoScroll=true;
this.BackColor=System.Drawing.Color.White;
this.ClientSize=新系统.Drawing.Size(240320);
this.ControlBox=false;
this.Controls.Add(this.panelSeparator);
this.Controls.Add(this.labelTitle);
this.Controls.Add(this.pictureLogo);
this.ForeColor=System.Drawing.Color.Black;
this.FormBorderStyle=System.Windows.Forms.FormBorderStyle.None;
this.KeyPreview=true;
此.Location=新系统图点(0,0);
this.ebox=false;
this.Name=“FormBase”;
this.Text=“FormBase”;
this.WindowState=System.Windows.Forms.FormWindowState.Maximized;
此选项为.resume布局(false);
}
#端区
private System.Windows.Forms.PictureBox pictureLogo;
private System.Windows.Forms.Label标签;
private System.Windows.Forms.Panel panelSeparator;
}
继承的形式:

public class FrontDoorForm : FormBase
{
    public FrontDoorForm()
    {
        InitializeComponent();
    }

    private void buttonQuit_Click(object sender, EventArgs e)
    {
        Close();
    }

    /// <summary>
    /// Required designer variable.
    /// </summary>
    private System.ComponentModel.IContainer components = null;

    /// <summary>
    /// Clean up any resources being used.
    /// </summary>
    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
    protected override void Dispose(bool disposing)
    {
        if (disposing && (components != null))
        {
            components.Dispose();
        }
        base.Dispose(disposing);
    }

    #region Windows Form Designer generated code

    /// <summary>
    /// Required method for Designer support - do not modify
    /// the contents of this method with the code editor.
    /// </summary>
    private void InitializeComponent()
    {
        this.buttonQuit = new System.Windows.Forms.Button();
        this.SuspendLayout();
        // 
        // buttonQuit
        // 
        this.buttonQuit.Location = new System.Drawing.Point(3, 54);
        this.buttonQuit.Name = "buttonQuit";
        this.buttonQuit.Size = new System.Drawing.Size(115, 46);
        this.buttonQuit.TabIndex = 2;
        this.buttonQuit.Text = "Quit";
        this.buttonQuit.Click += new System.EventHandler(this.buttonQuit_Click);
        // 
        // FrontDoorForm
        // 
        this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
        this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
        this.BackColor = System.Drawing.Color.White;
        this.ClientSize = new System.Drawing.Size(240, 320);
        this.Controls.Add(this.buttonQuit);
        this.Font = new System.Drawing.Font("Tahoma", 10F, System.Drawing.FontStyle.Regular);
        this.ForeColor = System.Drawing.Color.Black;
        this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
        this.Location = new System.Drawing.Point(0, 0);
        this.MinimizeBox = true;
        this.Name = "FrontDoorForm";
        this.Text = "FrontDoorForm";
        this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
        this.Controls.SetChildIndex(this.buttonQuit, 0);
        this.ResumeLayout(false);

    }

    #endregion

    private System.Windows.Forms.Button buttonQuit;
}
公共类FrontDoorForm:FormBase
{
公众前门表格()
{
初始化组件();
}
私有无效按钮取消单击(对象发送者,事件参数e)
{
Close();
}
/// 
///必需的设计器变量。
/// 
private System.ComponentModel.IContainer components=null;
/// 
///清理所有正在使用的资源。
/// 
///如果应释放托管资源,则为true;否则为false。
受保护的覆盖无效处置(布尔处置)
{
if(处理和(组件!=null))
{
组件。Dispose();
}
基地。处置(处置);
}
#区域Windows窗体设计器生成的代码
/// 
///设计器支持所需的方法-不修改
///此方法的内容与代码编辑器一起使用。
/// 
私有void InitializeComponent()
{
this.buttonkit=new System.Windows.Forms.Button();
这个.SuspendLayout();
// 
//巴顿基特
// 
this.buttonkit.Location=新系统图点(3,54);
this.buttonkit.Name=“buttonkit”;
this.buttonkit.Size=新系统图尺寸(115,46);
this.buttonkit.TabIndex=2;
this.buttonQuit.Text=“退出”;
this.buttonkit.Click+=new System.EventHandler(this.buttonkit\u Click);
// 
//前门模板
// 
this.AutoScaleDimensions=新系统.Drawing.SizeF(96F,96F);
this.AutoScaleMode=System.Windows.Forms.AutoScaleMode.Dpi;
这个,回来