Click here to Skip to main content
15,921,028 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: oracle on linux Pin
Dave Kreskowiak15-Jul-05 1:40
mveDave Kreskowiak15-Jul-05 1:40 
Generalhelp on crystal report Pin
fire8514-Jul-05 20:27
fire8514-Jul-05 20:27 
GeneralRe: help on crystal report Pin
Rizwan Bashir14-Jul-05 21:57
Rizwan Bashir14-Jul-05 21:57 
GeneralMultithread Pin
hung_ngole14-Jul-05 18:50
hung_ngole14-Jul-05 18:50 
GeneralRe: Multithread Pin
rwestgraham14-Jul-05 19:50
rwestgraham14-Jul-05 19:50 
GeneralRe: Multithread Pin
hung_ngole15-Jul-05 15:58
hung_ngole15-Jul-05 15:58 
GeneralRe: Multithread Pin
rwestgraham16-Jul-05 23:45
rwestgraham16-Jul-05 23:45 
GeneralAdd records to DB Table usin VB.Net Pin
JERUSHA14-Jul-05 18:30
JERUSHA14-Jul-05 18:30 
GeneralRe: Add records to DB Table usin VB.Net Pin
Anonymous15-Jul-05 23:20
Anonymous15-Jul-05 23:20 
Generalset ms.word to different orientation in different page Pin
IvanChang14-Jul-05 18:04
IvanChang14-Jul-05 18:04 
GeneralArray Pin
hung_ngole14-Jul-05 17:48
hung_ngole14-Jul-05 17:48 
GeneralRe: Array Pin
Christian Graus14-Jul-05 17:56
protectorChristian Graus14-Jul-05 17:56 
GeneralVB.Net inherited from GroupBox but if I drag a control onto it at design time it is added to form's controls collection Pin
SBendBuckeye14-Jul-05 12:55
SBendBuckeye14-Jul-05 12:55 
GeneralRe: VB.Net inherited from GroupBox but if I drag a control onto it at design time it is added to form's controls collection Pin
vtalau14-Jul-05 18:34
vtalau14-Jul-05 18:34 
GeneralVB .NET: XML to Datagrid Pin
Anonymous14-Jul-05 9:54
Anonymous14-Jul-05 9:54 
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 

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.