拜托

解决方案 »

  1.   

    这是form 2.0带的帮助内容我只是加了combobox,还需要什么?
    Option ExplicitDim MyArray(6, 3)Private Sub Form_Load()
    Dim i As Single    ListBox1.ColumnCount = 3        '第一个列表框包含三个数据列
        ListBox2.ColumnCount = 6        '第二个框包含六个数据列    '把整数值加载到 MyArray 的第一列
        For i = 0 To 5
            MyArray(i, 0) = i
        Next i    '加载 MyArray 的列 2 和列 3
        MyArray(0, 1) = "Zero"
        MyArray(1, 1) = "One"
        MyArray(2, 1) = "Two"
        MyArray(3, 1) = "Three"    MyArray(4, 1) = "Four"
        MyArray(5, 1) = "Five"    MyArray(0, 2) = "Zero"
        MyArray(1, 2) = "Un ou Une"
        MyArray(2, 2) = "Deux"
        MyArray(3, 2) = "Trois"
        MyArray(4, 2) = "Quatre"
        MyArray(5, 2) = "Cinq"    '把数据加载到 ListBox1 和 ListBox2和ComboBox1
        ListBox1.List() = MyArray
        ListBox2.Column() = MyArray
        ComboBox1.Column() = MyArray
        End Sub
    ==天下本无事,庸人自扰之==
    试着自己找方法解决问题比提出问题后等着别人给答案的人,更让人有想帮助
    的感觉,所以试着自己解决问题,你会有意想不到的收获!
    [email protected]
      

  2.   

    这也是你为什么还要到其他地方找帮助form_load中  
      Label1.Left = 18
        Label1.Top = 12
        Label1.Height = 12
        Label1.Width = 190
        Label1.Caption = "Select picture placement relative to the caption."
        
        '把列表条目加入组合框。每一条目的值符合
        '组合框中对应的 ListIndex 的值。
        ComboBox1.AddItem "Left Top"        'ListIndex = 0
        ComboBox1.AddItem "Left Center"     'ListIndex = 1
        ComboBox1.AddItem "Left Bottom"     'ListIndex = 2
        ComboBox1.AddItem "Right Top"       'ListIndex = 3ComboBox1.AddItem "Right Center"    'ListIndex = 4
        ComboBox1.AddItem "Right Bottom"    'ListIndex = 5
        
        ComboBox1.AddItem "Above Left"      'ListIndex = 6
        ComboBox1.AddItem "Above Center"    'ListIndex = 7
        ComboBox1.AddItem "Above Right"    'ListIndex = 8
        ComboBox1.AddItem "Below Left"      'ListIndex = 9
        ComboBox1.AddItem "Below Center"    'ListIndex = 10
        ComboBox1.AddItem "Below Right"    'ListIndex = 11
        
        ComboBox1.AddItem "Centered"        'ListIndex = 12ComboBox1.Style = fmStyleDropDownList  '使用下拉列表    ComboBox1.BoundColumn = 0            '组合框值是 ListIndex 值
        ComboBox1.ListIndex = 0              '把组合框设置为第一个条目
        ComboBox1.Left = 18
        ComboBox1.Top = 36
        ComboBox1.Width = 90
        ComboBox1.ListWidth = 90
        
        '初始化 CommandButton1
        CommandButton1.Left = 230
        CommandButton1.Top = 36
        CommandButton1.Height = 120
        CommandButton1.Width = 120'注意:确认引用的位图文件是存在于系统中的,并在文件名中包括路径
        CommandButton1.Picture = LoadPicture("c:\windows\1STBOOT.BMP")
        CommandButton1.PicturePosition = ComboBox1.Value
    End SubPrivate Sub ComboBox1_Click()
        Select Case ComboBox1.Value
        Case 0  '上左
            CommandButton1.Caption = "Left Top"
            CommandButton1.PicturePosition = fmPicturePositionLeftTop
        
        Case 1  '中左
            CommandButton1.Caption = "Left Center"
            CommandButton1.PicturePosition = fmPicturePositionLeftCenterCase 2  '下左
            CommandButton1.Caption = "Left Bottom"
            CommandButton1.PicturePosition = fmPicturePositionLeftBottom
            
        Case 3  '上右
            CommandButton1.Caption = "Right Top"
            CommandButton1.PicturePosition = fmPicturePositionRightTop
        
        Case 4  '中右
            CommandButton1.Caption = "Right Center"
            CommandButton1.PicturePosition = fmPicturePositionRightCenter
        
        Case 5  '下右
            CommandButton1.Caption = "Right Bottom"CommandButton1.PicturePosition = fmPicturePositionRightBottom
        
        Case 6  '左上
            CommandButton1.Caption = "Above Left"
            CommandButton1.PicturePosition = fmPicturePositionAboveLeft
        
        Case 7  '中上
            CommandButton1.Caption = "Above Center"
            CommandButton1.PicturePosition = fmPicturePositionAboveCenter
            
        Case 8  '右上
            CommandButton1.Caption = "Above Right"
            CommandButton1.PicturePosition = fmPicturePositionAboveRightCase 9  '左下
            CommandButton1.Caption = "Below Left"
            CommandButton1.PicturePosition = fmPicturePositionBelowLeft
        
        Case 10 '中下
            CommandButton1.Caption = "Below Center"
            CommandButton1.PicturePosition = fmPicturePositionBelowCenter
        
        Case 11 '右下
            CommandButton1.Caption = "Below Right"
            CommandButton1.PicturePosition = fmPicturePositionBelowRight
        
        Case 12 '中
            CommandButton1.Caption = "Centered"CommandButton1.PicturePosition = fmPicturePositionCenter
        
        End Select==天下本无事,庸人自扰之==
    试着自己找方法解决问题比提出问题后等着别人给答案的人,更让人有想帮助
    的感觉,所以试着自己解决问题,你会有意想不到的收获!
    [email protected]
      

  3.   

    Private Sub Command1_Click()
    Dim i As Integer
    ComboBox1.ColumnCount = 3
    For i = 0 To 10
    ComboBox1.AddItem i
    ComboBox1.Column(1, i) = i * 2
    ComboBox1.Column(2, i) = i * 3NextPrivate Sub ComboBox1_Click()
    Text1.Text = ComboBox1.Text
    Text2.Text = ComboBox1.Column(1)
    Text3.Text = ComboBox1.Column(2)
    End Sub