What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » Need VB help(Visual Basic)

Pages: (5): « First [ 1 ] 2 3 4 5 » Last »
Need VB help(Visual Basic)
Author: Message:
dylan!
Senior Member
****

Avatar
l33t p4int3r

Posts: 665
Reputation: 30
– / Male / Flag
Joined: Jan 2005
O.P. Need VB help(Visual Basic)
well i just started learning VB the other day and im starting on little projects and im on a cd player thing im making using a guideline kinda of and i need you guys to help me get it to work:P

code:
Private Sub Combo1_Change()
' to determine file type

If ListIndex = 0 Then
File1.Pattern = ("*.wma")
ElseIf ListIndex = 1 Then
File1.Pattern = ("*.mp3")
Else
Fiel1.Pattern = ("*.*")
End If

End Sub


Private Sub Dir1_Change()

'To change directories and subdirectories(or folders and subfolders)


File1.Path = Dir1.Path
If Combo1.ListIndex = 0 Then
File1.Pattern = ("*.wma")
ElseIf Combo1.ListIndex = 1 Then
File1.Pattern = ("*.mp3")
Else
File1.Pattern = ("*.*")
End If
End Sub

Private Sub Drive1_Change()

'To change drives

Dir1.Path = Drive1.Drive

End Sub

Private Sub File1_Click()
If Combo1.ListIndex = 0 Then
File1.Pattern = ("*.wma")
ElseIf Combo1.ListIndex = 1 Then
File1.Pattern = ("*.mp3")
Else
File1.Pattern = ("*.*")
End If

If Right(File1.Path, 1) <> "\" Then
filenam = File1.Path + "\" + File1.FileName
Else
filenam = File1.Path + File1.FileName
End If
Text1.Text = filenam

End Sub


Private Sub Form_Load()

'To center the Audioplayer startup page


Left = (Screen.Width - Width) \ 2
Top = (Screen.Height - Height) \ 2
Combo1.Text = "*.wav"
Combo1.AddItem "*.wma"
Combo1.AddItem "*.mp3"
Combo1.AddItem "All files"

End Sub

Private Sub AudioPlayer_Click()

End Sub


Private Sub Command1_Click()

'To play Windows Media Player file or MPEG layer 3 Audio


If Combo1.ListIndex = 0 Then
AudioPlayer.DeviceType = ".wma"
ElseIf Combo1.ListIndex = 1 Then
AudioPlayer.DeviceType = ".mp3"
End If
AudioPlayer.FileName = Text1.Text
AudioPlayer.Command = "Open"
AudioPlayer.Command = "Play"

End Sub


Private Sub Command2_Click()
If AudioPlayer.Mode = 524 Then Exit Sub
If AudioPlayer.Mode <> 525 Then
AudioPlayer.Wait = True
AudioPlayer.Command = "Stop"
End If
AudioPlayer.Wait = True
AudioPlayer.Command = "Close"
End Sub

Private Sub Command3_Click()
End
End Sub


the part that it says is invalid or w.e that wont make it work is the BOLD text near the top about the file types
08-22-2005 07:26 AM
Profile E-Mail PM Find Quote Report
segosa
Community's Choice
*****


Posts: 1407
Reputation: 92
Joined: Feb 2003
RE: Need VB help(Visual Basic)
File1.Pattern = "*.wma"

etc
The previous sentence is false. The following sentence is true.
08-22-2005 07:33 AM
Profile PM Find Quote Report
dylan!
Senior Member
****

Avatar
l33t p4int3r

Posts: 665
Reputation: 30
– / Male / Flag
Joined: Jan 2005
O.P. RE: Need VB help(Visual Basic)
thats what i have?:S:S
08-22-2005 07:34 AM
Profile E-Mail PM Find Quote Report
Dempsey
Scripting Contest Winner
*****

Avatar
http://AdamDempsey.net

Posts: 2395
Reputation: 53
37 / Male / Flag
Joined: Jul 2003
RE: Need VB help(Visual Basic)
without brackets I think Seggeh means
SoundPacks   -   Scripts   -   Skins

that's not a bug, thats an unexpected feature
08-22-2005 07:43 AM
Profile E-Mail PM Web Find Quote Report
dylan!
Senior Member
****

Avatar
l33t p4int3r

Posts: 665
Reputation: 30
– / Male / Flag
Joined: Jan 2005
O.P. RE: Need VB help(Visual Basic)
now it when i start my .mp3 files it says theres and error with
code:
AudioPlayer.DeviceType = (".mp3")
:S:Sand i assume if i search for .wma the same problem will occure for the otehr line


heres a screeny of what i have and if you wanna try and make it and get it to work i would appreciate it:D
[Image: attachment.php?pid=517813]

.jpg File Attachment: screeny.JPG (34.35 KB)
This file has been downloaded 1094 time(s).

This post was edited on 08-22-2005 at 07:51 AM by dylan!.
08-22-2005 07:48 AM
Profile E-Mail PM Find Quote Report
Dempsey
Scripting Contest Winner
*****

Avatar
http://AdamDempsey.net

Posts: 2395
Reputation: 53
37 / Male / Flag
Joined: Jul 2003
RE: Need VB help(Visual Basic)
remove the brackets too

quote:
AudioPlayer.DeviceType = ".mp3"
SoundPacks   -   Scripts   -   Skins

that's not a bug, thats an unexpected feature
08-22-2005 07:50 AM
Profile E-Mail PM Web Find Quote Report
dylan!
Senior Member
****

Avatar
l33t p4int3r

Posts: 665
Reputation: 30
– / Male / Flag
Joined: Jan 2005
O.P. RE: Need VB help(Visual Basic)
:@:@:@:S:S now i removed the bbrackets and it says theres an error with the code
code:
AudioPlayer.Command = "Open"
:@:@:S
08-22-2005 07:55 AM
Profile E-Mail PM Find Quote Report
spokes
Full Member
***

Avatar
I <3 Rollerblading

Posts: 423
Reputation: 10
33 / Male / Flag
Joined: May 2004
RE: Need VB help(Visual Basic)
hmm, just wondering, are you using media player control?

also, i suggest u put variations in the file pattern thing

because it wont find .MP3 or .WMA files otherwise, some songs have upper case extensions

example

File1.Pattern = "*.mp3;*.MP3"

etc...

what error is it giving you wivout the brackets?

[Image: sig15ws.png]
08-22-2005 08:26 AM
Profile E-Mail PM Web Find Quote Report
dylan!
Senior Member
****

Avatar
l33t p4int3r

Posts: 665
Reputation: 30
– / Male / Flag
Joined: Jan 2005
O.P. RE: Need VB help(Visual Basic)
runtime error '424':
Object required

and the code that has teh error is
code:
AudioPlayer.DeviceType = ".mp3"

and im using Microsoft Multimedia Control 6.0

its just set to invisible

This post was edited on 08-22-2005 at 08:32 AM by dylan!.
08-22-2005 08:30 AM
Profile E-Mail PM Find Quote Report
spokes
Full Member
***

Avatar
I <3 Rollerblading

Posts: 423
Reputation: 10
33 / Male / Flag
Joined: May 2004
RE: Need VB help(Visual Basic)
hmm, i'm sorry, i can't help you with that, i always use the media player control


www.pscode.com might have something useful

[Image: sig15ws.png]
08-22-2005 08:36 AM
Profile E-Mail PM Web Find Quote Report
Pages: (5): « First [ 1 ] 2 3 4 5 » Last »
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On