Click here to Skip to main content
15,886,110 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Create columntype as checkbox in datagridview by coding Pin
Mycroft Holmes3-Nov-09 19:40
professionalMycroft Holmes3-Nov-09 19:40 
GeneralRe: Create columntype as checkbox in datagridview by coding Pin
dan!sh 3-Nov-09 19:47
professional dan!sh 3-Nov-09 19:47 
GeneralRe: Create columntype as checkbox in datagridview by coding Pin
KIDYA3-Nov-09 19:52
KIDYA3-Nov-09 19:52 
GeneralRe: Create columntype as checkbox in datagridview by coding Pin
dan!sh 3-Nov-09 20:27
professional dan!sh 3-Nov-09 20:27 
GeneralRe: Create columntype as checkbox in datagridview by coding Pin
KIDYA3-Nov-09 21:13
KIDYA3-Nov-09 21:13 
GeneralRe: Create columntype as checkbox in datagridview by coding Pin
dan!sh 3-Nov-09 21:30
professional dan!sh 3-Nov-09 21:30 
GeneralRe: Create columntype as checkbox in datagridview by coding Pin
KIDYA3-Nov-09 21:39
KIDYA3-Nov-09 21:39 
QuestionShow items in Listview of other form Pin
Gagan.203-Nov-09 17:52
Gagan.203-Nov-09 17:52 
Hi all.

I'm searching files whose code is written in form1 and displaying these files in the listview of form2.

This code is written in form2 :

Private Sub BGWorker_DoWork(ByVal sender As System.Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles BGWorker.DoWork
       
       For Each file As String In My.Computer.FileSystem.GetFiles(drive.Name, FileIO.SearchOption.SearchAllSubDirectories) 'drive.name is a directory

                    'Check for cancelation of Background worker.
                    If BGWorker.CancellationPending Then
                        e.Cancel = True
                        Exit Sub
                    End If

          Dim extn As String = IO.Path.GetExtension(file)

                    Try
if extn.toUpper=".GPS" then
                            Me.RefreshList(file, FileType)
                        End If
                   
                    Catch ex As Exception
                        MsgBox(ex.Message)
                    End Try
                Next
            End If
        Next
    End Sub

Delegate Sub UpdateList(ByVal [FileName] As String, ByVal [FileType] As String)

Private Sub RefreshList(ByVal [FileName] As String, ByVal [FileType] As String)
              If frmMain.Listview1.InvokeRequired Then
            Dim d As New UpdateList(AddressOf RefreshList)
            frmMain.Listview1.Invoke(d, New Object() {[FileName], [FileType]})
        Else
            frmMain.Listview1.Items.Add([FileName].subitems.add([ThreatType])
        End If
    End Sub


In RefreshList module, I used frmmain instead of Me because I want to display searched files on the listview of frmmain but this code is not working.

Suggest me what should I do.

Thanks.

Gagan
AnswerRe: Show items in Listview of other form Pin
Christian Graus3-Nov-09 18:12
protectorChristian Graus3-Nov-09 18:12 
GeneralRe: Show items in Listview of other form Pin
Gagan.203-Nov-09 18:15
Gagan.203-Nov-09 18:15 
GeneralRe: Show items in Listview of other form Pin
Christian Graus3-Nov-09 18:21
protectorChristian Graus3-Nov-09 18:21 
GeneralRe: Show items in Listview of other form Pin
Gagan.203-Nov-09 18:25
Gagan.203-Nov-09 18:25 
GeneralRe: Show items in Listview of other form Pin
Christian Graus3-Nov-09 18:31
protectorChristian Graus3-Nov-09 18:31 
GeneralRe: Show items in Listview of other form Pin
Gagan.203-Nov-09 18:34
Gagan.203-Nov-09 18:34 
GeneralRe: Show items in Listview of other form Pin
Christian Graus3-Nov-09 18:38
protectorChristian Graus3-Nov-09 18:38 
GeneralRe: Show items in Listview of other form Pin
Gagan.203-Nov-09 18:41
Gagan.203-Nov-09 18:41 
GeneralRe: Show items in Listview of other form Pin
Christian Graus3-Nov-09 18:42
protectorChristian Graus3-Nov-09 18:42 
GeneralRe: Show items in Listview of other form Pin
Gagan.203-Nov-09 18:45
Gagan.203-Nov-09 18:45 
GeneralRe: Show items in Listview of other form Pin
Christian Graus3-Nov-09 18:47
protectorChristian Graus3-Nov-09 18:47 
QuestionPrint Preview of 9000 Pages Pin
Anubhava Dimri3-Nov-09 17:22
Anubhava Dimri3-Nov-09 17:22 
AnswerRe: Print Preview of 9000 Pages Pin
Christian Graus3-Nov-09 18:11
protectorChristian Graus3-Nov-09 18:11 
GeneralRe: Print Preview of 9000 Pages Pin
Anubhava Dimri3-Nov-09 18:33
Anubhava Dimri3-Nov-09 18:33 
AnswerRe: Print Preview of 9000 Pages Pin
Dave Kreskowiak3-Nov-09 18:17
mveDave Kreskowiak3-Nov-09 18:17 
AnswerRe: Print Preview of 9000 Pages Pin
Thomas Krojer3-Nov-09 22:11
Thomas Krojer3-Nov-09 22:11 
Questiona visual program that run an aplication and when application exit then vb program gives a message Pin
master23233-Nov-09 11:38
master23233-Nov-09 11:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.