如果在"按钮列表"控件,如果2003中的Toolbar,里面有自带..

解决方案 »

  1.   

    如果在"按钮列表"控件,如果2003中的Toolbar,里面有自带..++++++++++++++++++++++++++++++那个是放在工具栏中吧
    可这个图并不是
    只是排列在一起
      

  2.   

    自行作一个,也不复杂简单的很
    把我的源代码给你吧,这种按钮,随便绘制一下,效果就出来了。Imports System.ComponentModel
    Imports System.Drawing.ColorTranslator
    <System.ComponentModel.DefaultEvent("Click")> Public Class MyIMGButton
        Enum State
            [Default]
            Down
            MoveIn
        End Enum    Dim CurState As State
        Dim BtnPic As Image = Nothing    <Category("杂项"), Browsable(True), Description("背景图片")> Public Property Image() As Image
            Get
                Return BtnPic
            End Get
            Set(ByVal value As Image)
                BtnPic = value
                Invalidate()
            End Set
        End Property    Private Sub MyIMGButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Click
            CurState = State.Default
            Invalidate()
        End Sub    Private Sub MyIMGButton_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.LostFocus
            CurState = State.Default
            Invalidate()
        End Sub    Private Sub MyIMGButton_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseDown
            CurState = State.Down
            Invalidate()
        End Sub    Private Sub MyIMGButton_MouseEnter(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.MouseEnter
            CurState = State.MoveIn
            Invalidate()
        End Sub    Private Sub MyIMGButton_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.MouseLeave
            CurState = State.Default
            Invalidate()
        End Sub    Private Sub MyIMGButton_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseMove
            If Me.ClientRectangle.Contains(e.Location) = False Then
                If Not CurState = State.Default Then
                    CurState = State.Default
                    Invalidate()
                End If
            Else
                If Not e.Button = Windows.Forms.MouseButtons.None Then
                    If Not CurState = State.Down Then
                        CurState = State.Down
                        Invalidate()
                    End If
                End If
            End If
        End Sub    Private Sub MyIMGButton_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseUp
            CurState = State.MoveIn
            Invalidate()
        End Sub    Private Sub MyIMGButton_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Me.Paint
            Dim MoveSize As Integer
            If CurState = State.Down Then
                MoveSize = 1
            Else
                MoveSize = 0
            End If
            If Not BtnPic Is Nothing Then
                Dim Rect As System.Drawing.Rectangle
                Rect.Location = New Point(CInt((Me.Width - BtnPic.Width) / 2 + MoveSize), CInt((Me.Height - BtnPic.Height) / 2 + MoveSize))
                Rect.Size = New Size(BtnPic.Width, BtnPic.Height)
                e.Graphics.DrawImage(BtnPic, Rect)
            End If
            Select Case CurState
                Case State.Default
                Case State.Down
                    e.Graphics.DrawLine(New Pen(FromHtml("#808080"), 1), New Point(0, 0), New Point(0, Me.Height - 1))
                    e.Graphics.DrawLine(New Pen(FromHtml("#808080"), 1), New Point(0, 0), New Point(Me.Width - 1, 0))
                    e.Graphics.DrawLine(New Pen(Color.White, 1), New Point(0, Me.Height - 1), New Point(Me.Width - 1, Me.Height - 1))
                    e.Graphics.DrawLine(New Pen(Color.White, 1), New Point(Me.Width - 1, 0), New Point(Me.Width - 1, Me.Height - 1))
                Case State.MoveIn
                    e.Graphics.DrawLine(New Pen(Color.White, 1), New Point(0, 0), New Point(0, Me.Height - 1))
                    e.Graphics.DrawLine(New Pen(Color.White, 1), New Point(0, 0), New Point(Me.Width - 1, 0))
                    e.Graphics.DrawLine(New Pen(FromHtml("#808080"), 1), New Point(0, Me.Height - 1), New Point(Me.Width - 1, Me.Height - 1))
                    e.Graphics.DrawLine(New Pen(FromHtml("#808080"), 1), New Point(Me.Width - 1, 0), New Point(Me.Width - 1, Me.Height - 1))
            End Select
        End Sub
    End Class============================================
    技术交流不该有界限 资源共享不该有条件
    http://blog.csdn.net/lovingkiss
    http://download.csdn.net/user/lovingkiss
    Email:loving-kiss@163.com
    本人说明:<我的帖子我做主>
    1、欢迎一切问题有关的交流——无论答案对错;
    2、不欢迎 顶、Mark、支持之类口水混分的人;
    我保留对非<散分贴>蹭分者的厌恶和鄙视...
    ============================================
      

  3.   

    你要的功能和它类似,唯一区别就是我的自动弹起,你要的是不弹起来的。略为改动一下就Ok了============================================
    技术交流不该有界限 资源共享不该有条件
    http://blog.csdn.net/lovingkiss
    http://download.csdn.net/user/lovingkiss
    Email:loving-kiss@163.com
    本人说明:<我的帖子我做主>
    1、欢迎一切问题有关的交流——无论答案对错;
    2、不欢迎 顶、Mark、支持之类口水混分的人;
    我保留对非<散分贴>蹭分者的厌恶和鄙视...
    ============================================
      

  4.   

    http://www.developerfusion.co.uk/utilities/convertvbtocsharp.aspx你自己进行转换吧——可能会略有出入
      

  5.   

    方法有很多 看了你的图片 我想起winform 里有个显示多个标签页的控件 MD叫啥忘了 好久没winform了 那个控件可以设置标签按钮的样式 有一种就是这样滴
      

  6.   

    最简单的办法
    单选radioButton的appearanc属性改为button就可以了
    效果就是点一下陷下去
    再点就突出来
      

  7.   

    你用label,down的时候把style改一下,不就可以了
      

  8.   

    button不是有屬性可設置的嗎?
    具體哪個屬性你找一下就是了
      

  9.   

     private void button1_Click(object sender, EventArgs e)
            {
                if (this.button1.FlatStyle == FlatStyle.Popup)
                {
                    this.button1.FlatStyle = FlatStyle.Standard;
                }
                else
                {
                    this.button1.FlatStyle = FlatStyle.Popup;
                }
            }