Click here to Skip to main content
15,895,746 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: VB .NET: XML to Datagrid Pin
Anonymous14-Jul-05 9:57
Anonymous14-Jul-05 9:57 
GeneralRe: VB .NET: XML to Datagrid Pin
Anonymous14-Jul-05 9:59
Anonymous14-Jul-05 9:59 
GeneralProblem in Query Pin
eshban28414-Jul-05 9:47
eshban28414-Jul-05 9:47 
GeneralRe: Problem in Query Pin
Christian Graus14-Jul-05 11:27
protectorChristian Graus14-Jul-05 11:27 
GeneralRe: Problem in Query Pin
J4amieC15-Jul-05 1:37
J4amieC15-Jul-05 1:37 
GeneralRe: Problem in Query Pin
Anonymous15-Jul-05 3:34
Anonymous15-Jul-05 3:34 
GeneralRe: Problem in Query Pin
eshban28415-Jul-05 7:43
eshban28415-Jul-05 7:43 
GeneralExplorer-Style ListView Pin
Brad Fackrell14-Jul-05 8:26
Brad Fackrell14-Jul-05 8:26 
I have an Explorer-Style ListView and I use

ListView1.View = View.Details<br />
ListView1.View = View.LargeIcon<br />
ListView1.View = View.List<br />
ListView1.View = View.SmallIcon


to update the respective view.

I added the ability to view thumbnails with this code:

Dim fullPath As String
Dim di As New DirectoryInfo(fpath)
Dim fi As FileInfo
Dim i As Integer

fullPath = GetPathFromNode(TreeView1.SelectedNode)
ListView1.Items.Clear()

'*** Loop to get the "jpg" files
Try
    For Each fi In di.GetFiles("*.jpg") ' if path will contain link files, change from jpg to lnk
        ImageList3.ImageSize = New Size(96, 96)
        Try
            CreateThumbNail(fpath & "\" & fi.Name) ' This returns the thumbnail images

            With ListView1 ' set the properties for for the ListView ListView1
                .Items.Add(fi.Name, i)
                .LargeImageList = ImageList3
                .ForeColor = Color.Blue
                .Scrollable = True
            End With
        Catch
            Exit Try
        End Try

        i += 1
    Next ' cycle through fpath until no more *.jpg.lnk files are found
Catch
    MsgBox("No image files are located in this directory.", MsgBoxStyle.Exclamation, "Thumbnails")
    Exit Try
End Try

Private Sub CreateThumbNail(ByVal filepath As String)
    Dim myImage As New Bitmap(filepath)
    Dim MyThumbNail As Image
    '*** ThumbNail
    MyThumbNail = myImage.GetThumbnailImage(96, 96, AddressOf Thumbnailabort, Nothing)
    '*** Fill the ImageList with Image Collection
    ImageList3.Images.Add(MyThumbNail)
End Sub


The four ListView1.View = * work just fine until I execute the routine to view thumbnails. After viewing thumbnails the four ListView1.View = * routines do not work properly. Among the problems is that only jpg’s are listed in the ListView.

Any ideas or suggestions?

Thanks
Brad
GeneralComboBox binding Pin
dptalt14-Jul-05 8:24
dptalt14-Jul-05 8:24 
GeneralRe: ComboBox binding Pin
Anonymous14-Jul-05 10:53
Anonymous14-Jul-05 10:53 
GeneralValidating textbox value against a db Pin
spettiford14-Jul-05 8:12
spettiford14-Jul-05 8:12 
GeneralRe: Validating textbox value against a db Pin
Christian Graus14-Jul-05 11:28
protectorChristian Graus14-Jul-05 11:28 
GeneralRe: Validating textbox value against a db Pin
spettiford15-Jul-05 2:20
spettiford15-Jul-05 2:20 
GeneralRe: Validating textbox value against a db Pin
Dave Kreskowiak15-Jul-05 3:51
mveDave Kreskowiak15-Jul-05 3:51 
GeneralRe: Validating textbox value against a db Pin
spettiford15-Jul-05 4:20
spettiford15-Jul-05 4:20 
GeneralRe: Validating textbox value against a db Pin
spettiford15-Jul-05 5:07
spettiford15-Jul-05 5:07 
Generalmonitoring/manipulating packets Pin
buzzbusy14-Jul-05 5:55
buzzbusy14-Jul-05 5:55 
GeneralRe: monitoring/manipulating packets Pin
Dave Kreskowiak14-Jul-05 6:43
mveDave Kreskowiak14-Jul-05 6:43 
GeneralBackColor Pin
Brad Fackrell14-Jul-05 5:51
Brad Fackrell14-Jul-05 5:51 
GeneralRe: BackColor Pin
Dave Kreskowiak14-Jul-05 6:06
mveDave Kreskowiak14-Jul-05 6:06 
GeneralRe: BackColor Pin
Brad Fackrell14-Jul-05 7:20
Brad Fackrell14-Jul-05 7:20 
GeneralListBox Question Pin
Anonymous14-Jul-05 5:48
Anonymous14-Jul-05 5:48 
GeneralRe: ListBox Question Pin
Brad Fackrell14-Jul-05 5:56
Brad Fackrell14-Jul-05 5:56 
GeneralRe: ListBox Question Pin
Anonymous14-Jul-05 9:41
Anonymous14-Jul-05 9:41 
GeneralI could not load the data in CrystalReport Pin
Jeeva Jose14-Jul-05 5:40
Jeeva Jose14-Jul-05 5:40 

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.