• 28-12-2014, 03:20:08
    #1
    Merhaba arkadaşlar,

    3 gündür arıyorum bulamıyorum. Rica etsem bana yardımcı olabilirmisiniz?

    Yaptım.
    1. Form1'de Button1'i Form2'ye gönderiyorum. O konuda sıkıntım yok ama Form2'de ki Listbox1'i Form1'de ki Textbox4'e çekemiyorum. Aradım araştırdım bulamadım. Kafam karıştı.
    Form2 adlı üyeden alıntı:
    Public Class Form2
    Private Sub Form2_Load(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Load
    End Sub
    Private Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button1.Click
    Me.Close()
    Form1.TextBox4.Text = ListBox1.SelectedItem
    End Sub
    Private Sub ListBox1_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs)
    Label2.Text = ListBox1.SelectedItem.ToString()
    End Sub

    Private Sub ListBox1_SelectedIndexChanged_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox1.SelectedIndexChanged

    End Sub

    Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
    With ListBox1
    .SelectedIndex = -1 '// -1 Index ='s No.Item.Selected.
    Dim bulunanlar = From i In ListBox1.Items Where i.ToString().StartsWith(TextBox1.Text) Select i
    If Not TextBox1.Text = "" Then
    For Each itm As String In .Items '// loop thru items.
    If itm.ToLower = TextBox1.Text.ToLower Then '// Case inSensitive search.
    .SelectedItem = itm '// select item.
    Exit For '// exit loop since item located.
    End If
    Next
    Exit Sub '// just.because the next 2 lines are not worth reading.
    End If
    End With
    End Sub
    End Class
    2. Form2'de ki Listbox1'i seçerken İD numarasını seçebiliyormuyum ?

    Örnek;

    Alıntı
    İstanbul=1
    İzmir=2
    Ankara=3
    Bu şekilde değil de sadece 1,2,3 rakamını alabilirmiyim ?

    3. ComboBox'da da böyle "2" de ki gibi yapabiliyormuyuz ?

    4. Form1'de textboxları vs. hepsini hallettim. Listbox'a çektim ve Listboxdan çekerken not defterine yazdırıyorum ama doldurduğum gibi yazıyor. Ben şöyle istiyorum;

    Örnek;

    Alıntı
    "KULLANCI_EKLE" "Ali" "Veli" "Listbox1" "Combobox1"
    Bu şekilde doldurduklarımı not defterinde tırnak içinde alabiliyormuyum?

    Son not defterine dökerken adımı nasıl yazıyorum

    Yazdırma kodum;

    Alıntı
    Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
    Dim Yazdir As New IO.StreamWriter("C:\Documents and Settings\Admin\Desktop\Regen.txt")
    Dim i As Integer
    For i = 0 To ListBox1.Items.Count - 1
    Yazdir.WriteLine(ListBox1.Items.Item(i))
    Next
    Yazdir.Close()
    End Sub
    Biraz çok fazla isteklerim oldu ama nolur idare edin. Bu 1. haftam VB ile yardımlarınızı bekliyorum
  • 28-12-2014, 13:24:57
    #2
    Lütfen yardım bekliyorum. Abi 3 tane farklı konu açtım. Hiç bir yardım gelmedi. Bende mi bir sorun var :/