Win7:设置自定义文本大小更改按钮图像的位置

时间:2013-07-05 10:01:49

标签: windows vb.net winforms image button

美好的一天!我有一个非常棘手的问题。 在我的应用程序中,我有里面的图像按钮。该按钮的所有属性:

    Me.cmdSelectAll.BackColor = System.Drawing.SystemColors.Control
    Me.cmdSelectAll.Image = CType(resources.GetObject("cmdSelectAll.BackgroundImage"), System.Drawing.Image)
    Me.cmdSelectAll.ImageAlign = Drawing.ContentAlignment.BottomRight
    Me.cmdSelectAll.Cursor = System.Windows.Forms.Cursors.Default
    Me.cmdSelectAll.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
    Me.cmdSelectAll.ForeColor = System.Drawing.SystemColors.ControlText
    Me.cmdSelectAll.Location = New System.Drawing.Point(0, 282)
    Me.cmdSelectAll.Name = "cmdSelectAll"
    Me.cmdSelectAll.Padding = New System.Windows.Forms.Padding(0, 0, 0, 0)
    Me.cmdSelectAll.RightToLeft = System.Windows.Forms.RightToLeft.No
    Me.cmdSelectAll.Size = New System.Drawing.Size(22, 22)
    Me.cmdSelectAll.TabIndex = 11
    Me.cmdSelectAll.TabStop = False
    Me.ToolTip1.SetToolTip(Me.cmdSelectAll, "Select All Channels")
    Me.cmdSelectAll.UseVisualStyleBackColor = False

当我以默认文本大小win7运行它时,图像出现在中心,一切正常。但是当我设置一些文本大小的自定义值(115%)时,我的图像突然变得更加正确和向下。它出现在我的所有按钮图像中。你能否回答我为什么会这样?我该如何解决这个问题?感谢

0 个答案:

没有答案