Need help with split, listview, and imagelist!

My program is allows user to grab media from the net!

Page 1 of 1

0 Replies - 3203 Views - Last Post: 11 August 2008 - 10:11 AM Rate Topic: -----

#1 EvolutionMedia  Icon User is offline

  • D.I.C Head

Reputation: 3
  • View blog
  • Posts: 125
  • Joined: 11-August 08

Need help with split, listview, and imagelist!

Posted 11 August 2008 - 10:11 AM

Hey guys!

Here's the whole story-my program which allows user to download media such as pictures, music, clips and ext. It's nto a p2p nor does it go onto a p2p network. It goes into main sites that allow FREE content.

So, I've been toying with listview component and imagelist component. My original idea was to have the browser control grab all the media, add it to the image list then have listview display them.

Here's the DoSearch() command:


Sub DoSearch(ByVal url As String, ByVal type As String)

		Dim i As Short
		Dim site_images As New ImageList









		Select Case type
			Case "Image"
				'UPGRADE_WARNING: Screen property Screen.MousePointer has a new behavior. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6BA9B8D2-2A32-4B6E-8D36-44949974A5B4"'
				System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.WaitCursor
				System.Windows.Forms.Application.DoEvents()

				' Open the URL.
				main_form.WebBrowser1.Navigate(New System.Uri(url))

				' Wait until the document is loaded.
				Do While main_form.WebBrowser1.ReadyState <> System.Windows.Forms.WebBrowserReadyState.Complete
					System.Windows.Forms.Application.DoEvents()
				Loop

				' List the links available.
				main_form.ListView1.Items.Clear()
				'UPGRADE_WARNING: Couldn't resolve default property of object wbrSource.document.links. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
				For i = 0 To main_form.WebBrowser1.document.Domdocument.images.length - 1			'UPGRADE_WARNING: Couldn't resolve default property of object wbrSource.document.links. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'


					main_form.ListView1.Items.Add(main_form.WebBrowser1.document.Domdocument.images(i).href)


				Next i

				' Reenable the button.

				'UPGRADE_WARNING: Screen property Screen.MousePointer has a new behavior. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6BA9B8D2-2A32-4B6E-8D36-44949974A5B4"'
				System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.Default

		End Select

	End Sub



now there's multiple things I wanna do with this routine:

1) Add a split function to one get the media the file is associated with.
2) Check the media file type (JPG, MP3, whatever)
3) Be able to either download it to temp folder so it will then be able to displayed on listviiew.

Also, I've noticed that I can add a web image to a imagelist-but if there is a way then good!

I put in PNG files into a image list and tried to check it the file was a jpg or gif. Which nothing turned up! :(

So let me guys know how to fix this problems! Thanx!

-EM

Is This A Good Question/Topic? 1

Page 1 of 1