Home | News | Downloads | GamersHell.com TV | Feedback | Casual Games | Forums
  PC Games Nintendo Wii Playstation 3 XBox 360 Playstation 2 Xbox Mobile PSP DS

Go Back   GamersHell.com Community Forums > GamersHell.com Community > GamersHell.com Forum > Smokin' Software

Reply
 
LinkBack Thread Tools Display Modes
Old 10-22-2009, 01:54 PM   #1 (permalink)
is on the 3rd circle: Gluttony
 
RaiZen18's Avatar
 
Join Date: Nov 2008
Location: South Africa
Posts: 489
Hellbux: 9,670
Send a message via Skype™ to RaiZen18
Default C#

Hey everybody!

I need help with C# programming. What I have is a program that links to a database from access and display the list of my movies in the database, now what I am wanting is to have a link with it so I can click it and play the movie. THanks for the help!
__________________
RaiZen18 is offline   Reply With Quote
Old 10-22-2009, 07:56 PM   #2 (permalink)
is on the 3rd circle: Gluttony
 
Join Date: Jun 2005
Location: Finland
Posts: 477
Hellbux: 9,127
Default

Why use access as the database. Couldn't ya just make a text/xml file as a "database" instead? I'm sure you have a reason but still a waste of space, slow while also complicating things a bit.
I'm also assuming that you went and stored the files into the database rather than just having directories for them?

I haven't toyed around with drag and drop programming languages in ages and there could be some errors or could be all together wrong but try fetching the files from their designated access fields with oledbdatareader and adding them to listboxes or what ever and write a simple code to play them by clicking at the item.
So in .NET it should look something like this and because .Net and C# are almost "indentical" it shouldn't be that hard to ficure out how to transfer this sample to it. Theres even online converters floating around if I remember correctly.

Private Sub RaiZensTop5PornVideos_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim con As OleDbConnection = New OleDbConnection("Your Database")
Dim cmd As OleDbCommand = New OleDbCommand("Your Table, con)
con.Open()
Dim Video_Data As OleDbDataReader = cmd.ExecuteReader
While Video_Data.Read
ListBoxVideo.Items.Add(Video_Data.Item("Animal_Pr0n"))
End While
End Sub

Private Sub ListBoxVideo_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBoxVideo.SelectedIndexChanged
Process.Start(ListBoxVideo.SelectedItem.ToString)
End Sub
__________________
HD0087 is offline   Reply With Quote
Old 10-22-2009, 09:11 PM   #3 (permalink)
is on the 3rd circle: Gluttony
 
RaiZen18's Avatar
 
Join Date: Nov 2008
Location: South Africa
Posts: 489
Hellbux: 9,670
Send a message via Skype™ to RaiZen18
Default

thanks for the post, but I got database connection working this afternoon, now I need to know how to open the movie file, so the link is there and I click it and it plays the movie.... but now how? struggling to get this 2 work. don't know where to start lol!
__________________
RaiZen18 is offline   Reply With Quote
Old 10-22-2009, 09:37 PM   #4 (permalink)
is on the 3rd circle: Gluttony
 
Join Date: Jun 2005
Location: Finland
Posts: 477
Hellbux: 9,127
Default

So you have stored the files into access?
The Process.Start command in my sample should start the video file from the Access "Animal_Pr0n" Item into what ever app your defined to open the file format in your system. "Process.Start command should be same in C#"
This method just assumes that you have put the files into their own Items in Access for it to work.
__________________
HD0087 is offline   Reply With Quote
Old 10-23-2009, 05:29 AM   #5 (permalink)
is on the 3rd circle: Gluttony
 
RaiZen18's Avatar
 
Join Date: Nov 2008
Location: South Africa
Posts: 489
Hellbux: 9,670
Send a message via Skype™ to RaiZen18
Default

k kwl but wat do you mean stored the files in access? you mean included the link for it in a field or wat?
__________________
RaiZen18 is offline   Reply With Quote
Old 10-23-2009, 06:14 AM   #6 (permalink)
is on the 3rd circle: Gluttony
 
Join Date: Jun 2005
Location: Finland
Posts: 477
Hellbux: 9,127
Default

Stored as in the files are actually in there. I was assuming that was the case for somereason.
Okay so it should be alot easyer then.. you have the link in the database and your abel to fetch it from the database to your app since you have the database connection working and all? So you could display the path in a text box for instance? so the only thing you would have to do is to pass the same argument you use to fetch that to Process,Start()
I'm too lazy to write any code at this hour so I hope ya understood.
__________________
HD0087 is offline   Reply With Quote
Reply



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Powered by vBulletin Copyright 2000 - 2008, Jelsoft Enterprises Ltd
Template-Modifikationen durch TMS
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
Quick Links: PC Games | MAC Games | Playstation 2 | XBox | XBox 360 | Casual Games | Wii | Mobile | DS | GBA | Playstation 3 | GamersHell.com TV
Copyright © 1999-2009 GamersHell.com. All rights reserved. | Contact Page | E.U.L.A. | Advertise | Privacy Statement | Search (Top 100) | Link Us

Search Engine Optimization by vBSEO 3.1.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47