Windows Win7:设置自定义文本大小更改按钮的位置';s形象

Windows Win7:设置自定义文本大小更改按钮的位置';s形象,windows,vb.net,winforms,image,button,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.Image

大家好!我有一个非常棘手的问题。 在我的应用程序中,我有一个内置图像的按钮。此按钮的所有属性:

    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%)时,我的图像突然变得更右更下。它发生在我的所有按钮的图像中。你能回答我为什么会发生这种情况,我如何解决这个问题?谢谢

可能是因为您将图像对齐到了第3行的右下角。。尝试将对齐方式更改为您想要的位置……是的,我考虑过了)您看,我不知道为什么,但右下对齐方式将我的图像放置在按钮的中心。这很奇怪。你如何设置文本大小?个性化->显示->设置自定义文本大小(DPI)参考这个问题。您可能必须禁用
表单上的自动缩放功能。