Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
D

darkyro

@darkyro
About
Posts
10
Topics
3
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • wait process , please help me
    D darkyro

    i resolved this problem using "While"

    .NET (Core and Framework) help database tutorial

  • how to insert image
    D darkyro

    hi i have one problem . how i can replace string for image for example : i write ":)" and i wan't replace to the image :) how can i do in a textbox or richtextbox ?

    .NET (Core and Framework) tutorial question help

  • WinForms ListView
    D darkyro

    in vb.net to get the items in listview take this

    dim name as string
    dim ind as integer

    for each items as listviewitem in listview1.items
    ' here you get the name of the item
    name = items.text ' or items
    'here your get the index
    ind = items.index

    next items

    .NET (Core and Framework) c++ csharp winforms question

  • wait process , please help me
    D darkyro

    i don't know how to insert. the button to shearch is here :

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
    Dim posicaoatual As String
    Dim itemselecionado As String
    Dim t As Thread
    For Each items As ListViewItem In lstrefresh.Items
    items.Selected = True
    For Each selecionado As ListViewItem In lstrefresh.SelectedItems
    Main.PosicaoEstacaoNoList = selecionado.Index
    Main.estacaoSelected = selecionado.SubItems.Item(2).Text
    Control.Ping_to_host()

                't = New Thread(AddressOf processo.Ping\_to\_host)
                ' MessageBox.Show(Main.estacaoSelected & vbCrLf & Main.PosicaoEstacaoNoList)
                't.Start()
    
            Next
    
        Next
    
    End Sub
    

    here i have the ping code :

    Public Sub Ping_to_host()

        Main.RichTextBox1.Clear()
        Dim vez As String = 3
    
        'Dim host As String = Main.estacaoSelected
        Dim ip As String = Main.estacaoSelected
        Dim ans, ans2
        Dim i As Integer
        'ans = InputBox("Digite o Endereço desejado", "Host", "www.google.com.br")
        ans = ip
        If ans = "" Then
    
            Exit Sub
        Else
            host = ans.ToString
            'ans2 = InputBox("Pro favor digite a quantidade de vezes para pingar", "Ping count", "1")
            ans2 = vez
            If ans2 = "" Then
                Exit Sub
            Else
                vezes = ans2.ToString
                ' For i = 0 To System.Convert.ToInt32(vezes.Text)
                ' For i = 1 To System.Convert.ToInt32(vezes.Text)
                Me.Timer3.Enabled = True
    
    
                'Me.Timer3.Start()
                'Next
    
            End If
    
        End If
    
    
    End Sub
    
    Private Sub Timer3\_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer3.Tick
        Dim lstText As String
        Dim i As Integer
    
    
        'Me.Timer3.Enabled = True
        'Me.Timer3.Start()
        For i = 1 To System.Convert.ToInt16(vezes)
    
    
            Try
                If My.Computer.Network.Ping(Me.host) Then
                    'MsgBox("Ping successfull", MsgBoxStyle.Information, "Successfull")
                    lstText = Now() & "  ---  " & host & " -- " & "Ping OK" & vbCrLf
                    ' MsgBox("oi")
                    Main.RichTextBox1.Text = LTrim
    
    .NET (Core and Framework) help database tutorial

  • wait process , please help me
    D darkyro

    hi i need help to how wait the process finish. for example.

    pc : is a string "contain ip pc"
    position : is integer "contain index number to know how item will change the imageindex of current item in other listviewitem1

    for each item as listviewitem in listview1.items
    pc = item.ToolTipText
    position = item.index

    ping_to_host() ' here i have a sub created to ping ip and in sub he change the imageindex in the other listview ( for exmaple : 0 is "off" and 1 is "on" )
    next

    OK the problem is not here , the problem is when he get de position and pc name he go to the ping_to_host() sub . this process is very fast for ping process can complete of the first ip recepted. when he are pinging to ip "1" the process can't complete because don't have time for complete . how i can set a time or wait to ping process complete for can jump for next item. SORRY , SO LONG TIME NO SPEAK ENGLISH

    .NET (Core and Framework) help database tutorial

  • window.showModalDialog?
    D darkyro

    is not show.Dialog ?

    .NET (Core and Framework) question javascript help

  • Problem with items for listview . if can't ,say me please [modified]
    D darkyro

    i'm used other code to resolve this problem . i'll post where for know how code i used.

    Private Sub ListView1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ListView1.SelectedIndexChanged

        lstestacoes.Clear()
        lstestacoes.View = View.LargeIcon
        Try
            If con.State = ConnectionState.Open Then con.Close()
            lstestacoes.Clear()
            lstestacoes.View = View.LargeIcon
            Dim ind As Integer
            Dim temp As String
            
            For Each item As ListViewItem In ListView1.SelectedItems
                If item.Selected = True Then
                    temp = item.SubItems(0).Text
                    Dim adptr As New OleDbDataAdapter("select \* from Estacao WHERE Grupo= '" & temp & "'", con)
                    Dim ds As New DataSet
                    Dim dr As DataRow
                    Dim dt As New DataTable
                    Dim imageListSmall As New ImageList()
                    Dim imageListLarge As New ImageList()
    
                    Dim grupoquant As Integer
                    Try
                        adptr.Fill(ds, "Grupo")
                        dt = ds.Tables(0)
                       
                        For Each dr In dt.Rows
                           
                          
                    
                            ind = ind + 1
                            Dim i As New ListViewItem(ind)
                            i.Text = dr.Item("Nome")
                            i.ImageIndex = 0
                           
                            lstestacoes.Items.AddRange(New ListViewItem() {i})
             
                        Next
    
                    Catch ex As Exception
            MsgBox(ex.Message)
    
        End Try
                End If
            Next
        Catch ex As Exception
            MsgBox(ex.Message)
    
        End Try
    
    
        con.Close()
    

    end sub

    .NET (Core and Framework) question database help

  • Problem with items for listview . if can't ,say me please [modified]
    D darkyro

    ok i will use. but in the data base the colunn idGrupo is "Lab1" for exemple not number. in group the items are inserted correctly but foe members no, why ? the problem is when the code are debugin only get one member "the first" is because i'm searching for string at database for example "Lab1" in colunn "idGrupo" ? i don't know why he get only the first provabily the code is wrong ^^"

    .NET (Core and Framework) question database help

  • Problem with items for listview . if can't ,say me please [modified]
    D darkyro

    hi i'm creating a program with two listview. one get the "Group" and other get the "members of the selected Group" but i have problem only get the first member .

    Private Sub ListView1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ListView1.SelectedIndexChanged

    lstestacoes.Clear()
    lstestacoes.View = View.LargeIcon
    Try
    If con.State = ConnectionState.Open Then con.Close()
    con.Open()
    Dim ind As Integer
    Dim temp As String

    For Each item As ListViewItem In ListView1.SelectedItems
    If item.Selected = True Then

    temp = item.SubItems(0).Text
    itemSelected = item.SubItems(0).Text
    Dim cmd As New OleDbCommand("select * from Estacao WHERE idGrupo= '" & temp & "'", con)

    Dim drdr As OleDbDataReader
    drdr = cmd.ExecuteReader
    If drdr.Read() Then
    ind = ind + 1
    Dim i As New ListViewItem(ind)
    i.Text = drdr.Item("Nome")
    i.ImageIndex = 0
    lstestacoes.Items.AddRange(New ListViewItem() {i})

    Else
    cmd.Cancel()
    con.Close()
    End If
    End If
    Next item

    Catch ex As Exception
    MsgBox(ex.Message)
    End Try

    End Sub

    My database have two tables "Grupo" and "Estacoes" obs : "Grupo" is the Group and "Estacoes" is the members at the group i have = id,name and in Estacoes i have = id,name,ip,descricao,grupo how can i set to get all members ? :doh:SORRY LONG TIME I'M NOT SPEAK ENGLISH:cool:

    modified on Friday, November 13, 2009 6:09 PM

    .NET (Core and Framework) question database help

  • A class for DataBase Connection Codes
    D darkyro

    yu can create a class with this code: Public con As New System.Data.OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=" & My.Settings.dbBase.ToString & ";Jet OLEDB:Database Password=" & My.Settings.dbBasePass.ToString & ";") where i use a settings option to store the informations converted to string : data base : My.Settings.dbBase.ToString password : My.Settings.dbBasePass.ToString i hope help you ^^ my english is not good too ^^" ;)

    .NET (Core and Framework) database csharp help tutorial
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups