The Real Challenge Slideshow

morphnike

Active member
Joined
Oct 8, 2005
Messages
25
Programming Experience
1-3
Hi Guys (and girls if there are any);)

If you are looking for a real challenge in VB, then you're at the right place.
I have a problem with an application. I need to create an application which can do the following:

- It must be able to select pictures from the hard drive and add them to the database (shouldn't be any problem, i can do that)
- But the problem is, lets say we have 12 pictures in our database. I need to make a presentation out of these pictures on a LCD Projector. How can I acchieve this??? Is it possible to create a flash file out of these pictures or a powerpoint? Or a presentation directly from VB. I need your help with this.

I believe in you guys. Show me what you're made of!!!
 
And you think we are so naive? hah dude, we are not kids here !
JK :D however good try Morphnike !!!
Ok, if you want an example let me know how do you want me to make it .. i.e pic gets changed within defined interval or you want to control the presentation by click next-previous buttons ... hmm or maybe just mouse click?

Regards ;)
 
Owh sorry, don't get me wrong Kulrom. I need help with this. I'm stuck.
it has to work on interval. but the pictures have to show on fullscreen, not on the form in a picturebox or something.
I would appreciate any help.

thx in advance.
morph
 
VB.NET slide show

Ok try this and tell me is that what you are looking for?

Regards ;)

P.S. notice that you are able to chage interval increaing or decreasing Thread.Sleep() 'by default is set to 3 seconds
Also i hope you will know how to add a pic's path into DB ... just a name of the image/s :)
 

Attachments

  • VB.NETSlideShow.zip
    53 KB · Views: 51
SlideShow Slide Show

for those who prefer to not download software from web:

VB.NET:
[SIZE=2][COLOR=#0000ff]Sub[/COLOR][/SIZE][SIZE=2] SlideShow()
[/SIZE][SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] path [/SIZE][SIZE=2][COLOR=#0000ff]As [/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]String
[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] i [/SIZE][SIZE=2][COLOR=#0000ff]As [/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Integer
[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]For[/COLOR][/SIZE][SIZE=2] i = 0 [/SIZE][SIZE=2][COLOR=#0000ff]To [/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=2].ListView1.Items.Count - 1
path = [/SIZE][SIZE=2][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=2].ListView1.Items(i).SubItems(0).Text
pbSlide.Image = Image.FromFile(Application.StartupPath & path)
Thread.Sleep(3000)
[/SIZE][SIZE=2][COLOR=#0000ff]Next
[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]End [/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Sub[/COLOR][/SIZE]

Usage:
VB.NET:
[SIZE=2][COLOR=#0000ff]Try
[/COLOR][/SIZE][SIZE=2]oledbcon.Open()
strSQL = "SELECT URL FROM Images" [COLOR=darkgreen]'images are not stored into DB but rather their paths[/COLOR]
Reading(strSQL)
[/SIZE][SIZE=2][COLOR=#0000ff]While[/COLOR][/SIZE][SIZE=2] objRead.Read
[/SIZE][SIZE=2][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=2].ListView1.Items.Add(objRead("URL") & "")
[/SIZE][SIZE=2][COLOR=#0000ff]End [/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]While
[/COLOR][/SIZE][SIZE=2]objRead.Close()
[/SIZE][SIZE=2][COLOR=#0000ff]Catch[/COLOR][/SIZE][SIZE=2] ex [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] Exception
MessageBox.Show(ex.Message)
[/SIZE][SIZE=2][COLOR=#0000ff]Finally
[/COLOR][/SIZE][SIZE=2]oledbcon.Close()
[/SIZE][SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] myThread [/SIZE][SIZE=2][COLOR=#0000ff]As [/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=2] Thread([/SIZE][SIZE=2][COLOR=#0000ff]AddressOf[/COLOR][/SIZE][SIZE=2] SlideShow)
myThread.Start()
[/SIZE][SIZE=2][COLOR=#0000ff]End [/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Try[/COLOR][/SIZE]

 
Damn Kulrom, you're good at this.
Thank you very very very very very much
I was wondering if you could let the slideshow repeat itself continuously until I press the escape key (what is the VB-key for escape-button, I thought the enter-button was 13 or something).

Another thing I was thinking of: is it possible in VB to create something like the "Add/Remove Programs"-list in Windows? So I can see the thumbnail of my image and next to the image the title. So if I have 5 pictures, these 5 pictures are listed under eachother and if I add a new pictures it comes into the list.

Thx in advance, you have been a great help. Thank you again

Greetz
Morph
 
Nevermind the repeat slideshow question, I found it. Rather focus on the second problem "Add/Remove Programs".



VB.NET:
 [LEFT]Sub SlideShow()
 
Dim path As String
Dim i As Integer
Dim aant as Integer = Me.ListView1.Items.Count - 1
For i = 0 To aant
path = Me.ListView1.Items(i).SubItems(0).Text
pbSlide.Image = Image.FromFile(Application.StartupPath & path)
Thread.Sleep(3000)
If i = aant Then
i = 0
End If
Next
End Sub
[/LEFT]
 
I beleive you should send more details if you want some help on Add/Remove Programs. Means, how you add the images in DB (explain as detailed as possible) because if you want to make it appears as small image of the original picture then you need to use thumbnails and stuff ... Waiting for your feedback

Regards ;)
 
I assume how the "Add/remove Program" looks like in windows.
I'm planning to make something similar like that. So I am able to see a thumbnail of the image and the name of the file. So if I have 5 pictures in my database, there must be 5 thumbnails showing with the 5 filenames.
tonight I will make a screenshot of what I'm planning of.

c ya
 
Well here's an image of what I mean:
 

Attachments

  • layout.jpg
    layout.jpg
    95.7 KB · Views: 120
Back
Top