[ telefon ] /
Makaleler-Article(s)
telefon ile ilgili toplam 1 makale bulundu ! (A total of 1 article(s) about telefon was(were) found in all of articles!)
Article |
---|
İl Adını Girip İl Trafik Kodu ve Telefon Kodunu Almak Bu örnekte İl adını yazdığımızda, o ile ait telefon kodunu alacağız. Formunuza 1 adet TextBox,ListBox ve Button ekleyin. Aşağıdaki şekilleri inceleyin.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click, Button2.Click
Dim itemIndex As Integer
itemIndex = ListBox1.FindString(TextBox1.Text)
ListBox1.SelectedIndex = itemIndex
Dim telefon() As String = {322, 416, 272, 472, 382, 358, 312, 242, 478, 466, 256, 266, 378, 488, 458, 228, 426, 434, 374, 248, 224, 286, 376, 364, 258, 412, 380, 284, 424, 446, 442, 222, 342, 454, 456, 438, 326, 476, 246, 212, 232, 344, 370, 338, 474, 366, 352, 318, 288, 386, 348, 262, 332, 274, 422, 236, 482, 324, 252, 436, 384, 388, 452, 328, 464, 264, 362, 484, 368, 346, 414, 486, 282, 356, 462, 428, 276, 432, 226, 354, 372}
Dim ilkodu() As String = {1, 2, 3, 4, 68, 5, 6, 7, 75, 8, 9, 10, 74, 72, 69, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 81, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 76, 32, 34, 35, 46, 78, 70, 36, 37, 38, 71, 39, 40, 79, 41, 42, 43, 44, 45, 47, 33, 48, 49, 50, 51, 52, 80, 53, 54, 55, 56, 57, 58, 63, 73, 59, 60, 61, 62, 64, 65, 77, 66, 67}
MessageBox.Show("İl Adı:" & ListBox1.SelectedItem & vbCrLf & "Telefon Kodu:" & telefon(ListBox1.SelectedIndex) & vbCrLf & "İl Trafik Kodu:" & ilkodu(ListBox1.SelectedIndex), "İl Bilgi", MessageBoxButtons.OK)
End Sub
Bir sonraki makalede görüşmek üzere. Bahadır |
|