<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
		<id>http://www.vbex.ru/index.php?action=history&amp;feed=atom&amp;title=VB.Net%2FGUI%2FComboBox</id>
		<title>VB.Net/GUI/ComboBox - История изменений</title>
		<link rel="self" type="application/atom+xml" href="http://www.vbex.ru/index.php?action=history&amp;feed=atom&amp;title=VB.Net%2FGUI%2FComboBox"/>
		<link rel="alternate" type="text/html" href="http://www.vbex.ru/index.php?title=VB.Net/GUI/ComboBox&amp;action=history"/>
		<updated>2026-04-06T04:11:05Z</updated>
		<subtitle>История изменений этой страницы в вики</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>http://www.vbex.ru/index.php?title=VB.Net/GUI/ComboBox&amp;diff=562&amp;oldid=prev</id>
		<title> в 16:40, 26 мая 2010</title>
		<link rel="alternate" type="text/html" href="http://www.vbex.ru/index.php?title=VB.Net/GUI/ComboBox&amp;diff=562&amp;oldid=prev"/>
				<updated>2010-05-26T16:40:06Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;ru&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Предыдущая&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Версия 16:40, 26 мая 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; style=&quot;text-align: center;&quot; lang=&quot;ru&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(нет различий)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
			</entry>

	<entry>
		<id>http://www.vbex.ru/index.php?title=VB.Net/GUI/ComboBox&amp;diff=563&amp;oldid=prev</id>
		<title>Admin: 1 версия</title>
		<link rel="alternate" type="text/html" href="http://www.vbex.ru/index.php?title=VB.Net/GUI/ComboBox&amp;diff=563&amp;oldid=prev"/>
				<updated>2010-05-26T12:44:31Z</updated>
		
		<summary type="html">&lt;p&gt;1 версия&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Get selected Item from ComboBox==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;vbnet&amp;quot;&amp;gt;&lt;br /&gt;
Imports System.Windows.Forms&lt;br /&gt;
&lt;br /&gt;
Module Module1&lt;br /&gt;
    Sub Main()&lt;br /&gt;
        Application.Run(New Form1)&lt;br /&gt;
    End Sub&lt;br /&gt;
End Module&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Public Class Form1&lt;br /&gt;
    Inherits System.Windows.Forms.Form&lt;br /&gt;
#Region &amp;quot; Windows Form Designer generated code &amp;quot;&lt;br /&gt;
    Public Sub New()&lt;br /&gt;
        MyBase.New()&lt;br /&gt;
        &amp;quot;This call is required by the Windows Form Designer.&lt;br /&gt;
        InitializeComponent()&lt;br /&gt;
        &amp;quot;Add any initialization after the InitializeComponent() call&lt;br /&gt;
    End Sub&lt;br /&gt;
    &amp;quot;Form overrides dispose to clean up the component list.&lt;br /&gt;
    Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)&lt;br /&gt;
        If disposing Then&lt;br /&gt;
            If Not (components Is Nothing) Then&lt;br /&gt;
                components.Dispose()&lt;br /&gt;
            End If&lt;br /&gt;
        End If&lt;br /&gt;
        MyBase.Dispose(disposing)&lt;br /&gt;
    End Sub&lt;br /&gt;
    &amp;quot;Required by the Windows Form Designer&lt;br /&gt;
    Private components As System.ruponentModel.IContainer&lt;br /&gt;
    &amp;quot;NOTE: The following procedure is required by the Windows Form Designer&lt;br /&gt;
    &amp;quot;It can be modified using the Windows Form Designer.  &lt;br /&gt;
    &amp;quot;Do not modify it using the code editor.&lt;br /&gt;
    Friend WithEvents ComboBox1 As System.Windows.Forms.ruboBox&lt;br /&gt;
    Friend WithEvents Button1 As System.Windows.Forms.Button&lt;br /&gt;
    &amp;lt;System.Diagnostics.DebuggerStepThrough()&amp;gt; Private Sub InitializeComponent()&lt;br /&gt;
        Me.ruboBox1 = New System.Windows.Forms.ruboBox()&lt;br /&gt;
        Me.Button1 = New System.Windows.Forms.Button()&lt;br /&gt;
        Me.SuspendLayout()&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;ComboBox1&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.ruboBox1.Items.AddRange(New Object() {&amp;quot;A&amp;quot;, &amp;quot;B&amp;quot;, &amp;quot;C&amp;quot;, &amp;quot;D&amp;quot;, &amp;quot;E&amp;quot;})&lt;br /&gt;
        Me.ruboBox1.Location = New System.Drawing.Point(32, 32)&lt;br /&gt;
        Me.ruboBox1.Name = &amp;quot;ComboBox1&amp;quot;&lt;br /&gt;
        Me.ruboBox1.Size = New System.Drawing.Size(136, 21)&lt;br /&gt;
        Me.ruboBox1.TabIndex = 0&lt;br /&gt;
        Me.ruboBox1.Text = &amp;quot;A&amp;quot;&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;Button1&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.Button1.Location = New System.Drawing.Point(128, 112)&lt;br /&gt;
        Me.Button1.Name = &amp;quot;Button1&amp;quot;&lt;br /&gt;
        Me.Button1.TabIndex = 1&lt;br /&gt;
        Me.Button1.Text = &amp;quot;Done&amp;quot;&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;Form1&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)&lt;br /&gt;
        Me.ClientSize = New System.Drawing.Size(328, 173)&lt;br /&gt;
        Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.Button1, Me.ruboBox1})&lt;br /&gt;
        Me.Name = &amp;quot;Form1&amp;quot;&lt;br /&gt;
        Me.Text = &amp;quot;ComboBoxDemo&amp;quot;&lt;br /&gt;
        Me.ResumeLayout(False)&lt;br /&gt;
    End Sub&lt;br /&gt;
#End Region&lt;br /&gt;
    Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click&lt;br /&gt;
        If (ComboBox1.SelectedItem &amp;lt;&amp;gt; &amp;quot;&amp;quot;) Then&lt;br /&gt;
            MessageBox.Show(&amp;quot;You selected: &amp;quot; &amp;amp; ComboBox1.SelectedItem)&lt;br /&gt;
        Else&lt;br /&gt;
            MessageBox.Show(&amp;quot;You must select an item&amp;quot;)&lt;br /&gt;
        End If&lt;br /&gt;
    End Sub&lt;br /&gt;
End Class&lt;br /&gt;
           &lt;br /&gt;
       &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Using ComboBox to select shape to draw==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;vbnet&amp;quot;&amp;gt;&lt;br /&gt;
Imports System&lt;br /&gt;
Imports System.Drawing&lt;br /&gt;
Imports System.Windows.Forms&lt;br /&gt;
Public Class MainClass&lt;br /&gt;
   Shared Sub Main()&lt;br /&gt;
        Dim myform As Form = New FrmComboBox()&lt;br /&gt;
        Application.Run(myform)&lt;br /&gt;
   End Sub &amp;quot; Main&lt;br /&gt;
End Class&lt;br /&gt;
Public Class FrmComboBox&lt;br /&gt;
   Inherits Form&lt;br /&gt;
#Region &amp;quot; Windows Form Designer generated code &amp;quot;&lt;br /&gt;
   Public Sub New()&lt;br /&gt;
      MyBase.New()&lt;br /&gt;
      &amp;quot;This call is required by the Windows Form Designer.&lt;br /&gt;
      InitializeComponent()&lt;br /&gt;
      &amp;quot;Add any initialization after the InitializeComponent() call&lt;br /&gt;
   End Sub&lt;br /&gt;
   &amp;quot;Form overrides dispose to clean up the component list.&lt;br /&gt;
   Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)&lt;br /&gt;
      If disposing Then&lt;br /&gt;
         If Not (components Is Nothing) Then&lt;br /&gt;
            components.Dispose()&lt;br /&gt;
         End If&lt;br /&gt;
      End If&lt;br /&gt;
      MyBase.Dispose(disposing)&lt;br /&gt;
   End Sub&lt;br /&gt;
   Friend WithEvents cboImage As System.Windows.Forms.ruboBox&lt;br /&gt;
   &amp;quot;Required by the Windows Form Designer&lt;br /&gt;
   Private components As System.ruponentModel.Container&lt;br /&gt;
   &amp;quot;NOTE: The following procedure is required by the Windows Form Designer&lt;br /&gt;
   &amp;quot;It can be modified using the Windows Form Designer.  &lt;br /&gt;
   &amp;quot;Do not modify it using the code editor.&lt;br /&gt;
   &amp;lt;System.Diagnostics.DebuggerStepThrough()&amp;gt; Private Sub InitializeComponent()&lt;br /&gt;
      Me.cboImage = New System.Windows.Forms.ruboBox()&lt;br /&gt;
      Me.SuspendLayout()&lt;br /&gt;
      &amp;quot;&lt;br /&gt;
      &amp;quot;cboImage&lt;br /&gt;
      &amp;quot;&lt;br /&gt;
      Me.cboImage.DropDownWidth = 121&lt;br /&gt;
      Me.cboImage.Items.AddRange(New Object() {&amp;quot;Circle&amp;quot;, &amp;quot;Square&amp;quot;, &amp;quot;Ellipse&amp;quot;, &amp;quot;Pie&amp;quot;, &amp;quot;Filled Circle&amp;quot;, &amp;quot;Filled Square&amp;quot;, &amp;quot;Filled Ellipse&amp;quot;, &amp;quot;Filled Pie&amp;quot;})&lt;br /&gt;
      Me.cboImage.Location = New System.Drawing.Point(24, 16)&lt;br /&gt;
      Me.cboImage.Name = &amp;quot;cboImage&amp;quot;&lt;br /&gt;
      Me.cboImage.Size = New System.Drawing.Size(121, 21)&lt;br /&gt;
      Me.cboImage.TabIndex = 0&lt;br /&gt;
      &amp;quot;&lt;br /&gt;
      &amp;quot;FrmComboBox&lt;br /&gt;
      &amp;quot;&lt;br /&gt;
      Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)&lt;br /&gt;
      Me.ClientSize = New System.Drawing.Size(292, 273)&lt;br /&gt;
      Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.cboImage})&lt;br /&gt;
      Me.Name = &amp;quot;FrmComboBox&amp;quot;&lt;br /&gt;
      Me.Text = &amp;quot;ComboBoxTest&amp;quot;&lt;br /&gt;
      Me.ResumeLayout(False)&lt;br /&gt;
   End Sub&lt;br /&gt;
#End Region&lt;br /&gt;
   Private Sub cboImage_SelectedIndexChanged _&lt;br /&gt;
      (ByVal sender As System.Object, _&lt;br /&gt;
      ByVal e As System.EventArgs) _&lt;br /&gt;
      Handles cboImage.SelectedIndexChanged&lt;br /&gt;
      Dim myGraphics As Graphics = MyBase.CreateGraphics()&lt;br /&gt;
      Dim myPen As New Pen(Color.Red)&lt;br /&gt;
      Dim mySolidBrush As New SolidBrush(Color.Red)&lt;br /&gt;
      Dim x As Integer&lt;br /&gt;
      Dim y As Integer&lt;br /&gt;
      Dim width As Integer&lt;br /&gt;
      Dim height As Integer&lt;br /&gt;
      &lt;br /&gt;
      x = 50&lt;br /&gt;
      y = 50&lt;br /&gt;
      width = 150&lt;br /&gt;
      height = 150&lt;br /&gt;
      myGraphics.Clear(Color.Black)&lt;br /&gt;
      Select Case cboImage.SelectedIndex&lt;br /&gt;
         Case 0 &lt;br /&gt;
            myGraphics.DrawEllipse(myPen, x, y, width, height)&lt;br /&gt;
         Case 1 &lt;br /&gt;
            myGraphics.DrawRectangle(myPen, x, y, width, height)&lt;br /&gt;
         Case 2 &lt;br /&gt;
            myGraphics.DrawEllipse(myPen, x, y, width, 75)&lt;br /&gt;
         Case 3 &lt;br /&gt;
            myGraphics.DrawPie(myPen, x, y, width, height, 0, 45)&lt;br /&gt;
         Case 4 &lt;br /&gt;
            myGraphics.FillEllipse(mySolidBrush, x, y, width, height)&lt;br /&gt;
         Case 5 &lt;br /&gt;
            myGraphics.FillRectangle(mySolidBrush, x, y, width, height)&lt;br /&gt;
         Case 6 &lt;br /&gt;
            myGraphics.FillEllipse(mySolidBrush, 50, 85, 150, 115)&lt;br /&gt;
         Case 7 &lt;br /&gt;
            myGraphics.FillPie(mySolidBrush, 50, 50, 150, 150, 0, 45)&lt;br /&gt;
      End Select&lt;br /&gt;
   End Sub&lt;br /&gt;
End Class&lt;br /&gt;
           &lt;br /&gt;
       &amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	</feed>