This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#26 2011-02-18 17:24:33

thebuilderdd
Scratcher
Registered: 2008-01-26
Posts: 1000+

Re: JaysonNT (First Software!)

WindozeNT wrote:

Not from me.  sad  I'm a VB6er.

Maybe the script is still the same in VB 2008.

Offline

 

#27 2011-02-18 17:29:33

WindozeNT
Scratcher
Registered: 2010-06-05
Posts: 1000+

Re: JaysonNT (First Software!)

Add this procedure call to support playing WAV sound files:

Code:

Option Explicit

Private Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long
Private Const SND_ASYNC = &H1         '  play sounds asynchronously

Alright, now create a Timer on the form to play a sound. Set the interval to the length of the song in milliseconds. Then in the Form's Load event, type this in (assuming the file is C:\Sound.wav and the timer name is Timer1):

Code:

Call sndPlaySound("C:\Sound.wav", SND_ASYNC)
Timer1.Enabled = True

In the Timer's event, put this in:

Code:

Call sndPlaySound("C:\Sound.wav", SND_ASYNC)

Get the sound to stop with this:

Code:

On Error Resume Next ' Enable error catching if it isn't already (required)
Call sndPlaySound("Null", SND_ASYNC) ' Stop Playing
On Error GoTo 0 ' Disable error catching (optional)

Hope that helps!
WindozeNT

P.S. That is VB6 code so it might not work.

Last edited by WindozeNT (2011-02-18 17:37:58)


http://i48.tinypic.com/rlyo80.png
Ever since Misc was killed, I've pretty much stopped going to Scratch Forums...

Offline

 

#28 2011-02-18 17:47:54

thebuilderdd
Scratcher
Registered: 2008-01-26
Posts: 1000+

Re: JaysonNT (First Software!)

WindozeNT wrote:

Add this procedure call to support playing WAV sound files:

Code:

Option Explicit

Private Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long
Private Const SND_ASYNC = &H1         '  play sounds asynchronously

Alright, now create a Timer on the form to play a sound. Set the interval to the length of the song in milliseconds. Then in the Form's Load event, type this in (assuming the file is C:\Sound.wav and the timer name is Timer1):

Code:

Call sndPlaySound("C:\Sound.wav", SND_ASYNC)
Timer1.Enabled = True

In the Timer's event, put this in:

Code:

Call sndPlaySound("C:\Sound.wav", SND_ASYNC)

Get the sound to stop with this:

Code:

On Error Resume Next ' Enable error catching if it isn't already (required)
Call sndPlaySound("Null", SND_ASYNC) ' Stop Playing
On Error GoTo 0 ' Disable error catching (optional)

Hope that helps!
WindozeNT

P.S. That is VB6 code so it might not work.

Got errors SIGH.

Offline

 

#29 2011-02-18 17:59:23

WindozeNT
Scratcher
Registered: 2010-06-05
Posts: 1000+

Re: JaysonNT (First Software!)

^ Where? What error did it say?


http://i48.tinypic.com/rlyo80.png
Ever since Misc was killed, I've pretty much stopped going to Scratch Forums...

Offline

 

#30 2011-02-18 18:00:09

thebuilderdd
Scratcher
Registered: 2008-01-26
Posts: 1000+

Re: JaysonNT (First Software!)

WindozeNT wrote:

^ Where? What error did it say?

ERRORS:
Error    1    Statement is not valid inside a method.    C:\Users\Thebuilderddd\AppData\Local\Temporary Projects\Bill Nye Forever\Form1.vb    4    9    Bill Nye Forever
Error    2    Keyword is not valid as an identifier.    C:\Users\Thebuilderddd\AppData\Local\Temporary Projects\Bill Nye Forever\Form1.vb    6    9    Bill Nye Forever
Error    3    'Private' is not valid on a local constant declaration.    C:\Users\Thebuilderddd\AppData\Local\Temporary Projects\Bill Nye Forever\Form1.vb    7    9    Bill Nye Forever

Offline

 

#31 2011-02-18 18:36:06

WindozeNT
Scratcher
Registered: 2010-06-05
Posts: 1000+

Re: JaysonNT (First Software!)

Here is a sample project doing exactly what you are looking for. Enjoy!


http://i48.tinypic.com/rlyo80.png
Ever since Misc was killed, I've pretty much stopped going to Scratch Forums...

Offline

 

#32 2011-02-20 14:15:33

WindozeNT
Scratcher
Registered: 2010-06-05
Posts: 1000+

Re: JaysonNT (First Software!)

bumpz


http://i48.tinypic.com/rlyo80.png
Ever since Misc was killed, I've pretty much stopped going to Scratch Forums...

Offline

 

#33 2011-02-20 14:36:07

thebuilderdd
Scratcher
Registered: 2008-01-26
Posts: 1000+

Re: JaysonNT (First Software!)

WindozeNT wrote:

bumpz

What does bump mean?

Offline

 

#34 2011-02-20 14:38:54

werdna123
Scratcher
Registered: 2010-06-12
Posts: 1000+

Re: JaysonNT (First Software!)

thebuilderdd wrote:

WindozeNT wrote:

bumpz

What does bump mean?

bring up my post
FMI wiki it.

Offline

 

#35 2011-02-20 14:43:11

thebuilderdd
Scratcher
Registered: 2008-01-26
Posts: 1000+

Re: JaysonNT (First Software!)

werdna123 wrote:

thebuilderdd wrote:

WindozeNT wrote:

bumpz

What does bump mean?

bring up my post
FMI wiki it.

I can't find it.

Offline

 

#36 2011-02-22 22:33:48

WindozeNT
Scratcher
Registered: 2010-06-05
Posts: 1000+

Re: JaysonNT (First Software!)

So did the sample work?


http://i48.tinypic.com/rlyo80.png
Ever since Misc was killed, I've pretty much stopped going to Scratch Forums...

Offline

 

#37 2011-02-25 14:38:41

thebuilderdd
Scratcher
Registered: 2008-01-26
Posts: 1000+

Re: JaysonNT (First Software!)

WindozeNT wrote:

So did the sample work?

No, it just gave me a new thing ith code.

Offline

 

#38 2011-02-25 22:07:07

WindozeNT
Scratcher
Registered: 2010-06-05
Posts: 1000+

Re: JaysonNT (First Software!)

^ ????


http://i48.tinypic.com/rlyo80.png
Ever since Misc was killed, I've pretty much stopped going to Scratch Forums...

Offline

 

#39 2011-02-25 22:10:21

thebuilderdd
Scratcher
Registered: 2008-01-26
Posts: 1000+

Re: JaysonNT (First Software!)

WindozeNT wrote:

^ ????

It opened in a new file with just coding.

Offline

 

#40 2011-02-25 23:47:28

thebuilderdd
Scratcher
Registered: 2008-01-26
Posts: 1000+

Re: JaysonNT (First Software!)

What can I do for my next app?

Offline

 

#41 2011-02-28 19:20:13

thebuilderdd
Scratcher
Registered: 2008-01-26
Posts: 1000+

Re: JaysonNT (First Software!)

Check out the website!

Last edited by thebuilderdd (2011-02-28 19:20:36)

Offline

 

#42 2011-02-28 19:47:18

thebuilderdd
Scratcher
Registered: 2008-01-26
Posts: 1000+

Re: JaysonNT (First Software!)

I will get Vb 2010 full and recompile!

Offline

 

#43 2011-03-05 20:57:18

thebuilderdd
Scratcher
Registered: 2008-01-26
Posts: 1000+

Re: JaysonNT (First Software!)

Bumpz!

Offline

 

#44 2011-03-08 19:48:25

thebuilderdd
Scratcher
Registered: 2008-01-26
Posts: 1000+

Re: JaysonNT (First Software!)

Bumpz!

Offline

 

#45 2011-03-17 03:43:52

rdococ
Scratcher
Registered: 2009-10-11
Posts: 1000+

Re: JaysonNT (First Software!)

WindozeNT wrote:

thebuilderdd wrote:

WindozeNT wrote:

Just to make sure -- Are you copying me?

Errr.... No. well your making Fakera1n, I am making fakepois0n (Just so we are the same) and Notepad me! Was really one of my first VB 2008 apps, so no I am NOT copying you! Maybe we can Hamachi together to work with each other.

Perhaps... But ditch MediaFire and use something like Tiny Upload. I refuse to download from MF.

I'd also ditch Tiny Upload; I now use 4shared to upload my PowerPoint files.

Offline

 

#46 2011-03-17 14:55:36

thebuilderdd
Scratcher
Registered: 2008-01-26
Posts: 1000+

Re: JaysonNT (First Software!)

rdococ wrote:

WindozeNT wrote:

thebuilderdd wrote:


Errr.... No. well your making Fakera1n, I am making fakepois0n (Just so we are the same) and Notepad me! Was really one of my first VB 2008 apps, so no I am NOT copying you! Maybe we can Hamachi together to work with each other.

Perhaps... But ditch MediaFire and use something like Tiny Upload. I refuse to download from MF.

I'd also ditch Tiny Upload; I now use 4shared to upload my PowerPoint files.

Try 2shared.

Offline

 

#47 2011-03-17 22:01:57

thebuilderdd
Scratcher
Registered: 2008-01-26
Posts: 1000+

Re: JaysonNT (First Software!)

B
U
M
P

Offline

 

#48 2011-04-12 18:34:03

rdococ
Scratcher
Registered: 2009-10-11
Posts: 1000+

Re: JaysonNT (First Software!)

thebuilderdd wrote:

rdococ wrote:

WindozeNT wrote:


Perhaps... But ditch MediaFire and use something like Tiny Upload. I refuse to download from MF.

I'd also ditch Tiny Upload; I now use 4shared to upload my PowerPoint files.

Try 2shared.

2shared doesn't work either.

Offline

 

#49 2011-04-12 18:38:38

thebuilderdd
Scratcher
Registered: 2008-01-26
Posts: 1000+

Re: JaysonNT (First Software!)

rdococ wrote:

thebuilderdd wrote:

rdococ wrote:


I'd also ditch Tiny Upload; I now use 4shared to upload my PowerPoint files.

Try 2shared.

2shared doesn't work either.

Your own website? Dropbox?

Offline

 

#50 2011-04-12 18:59:24

WindozeNT
Scratcher
Registered: 2010-06-05
Posts: 1000+

Re: JaysonNT (First Software!)

thebuilderdd wrote:

WindozeNT wrote:

^ ????

It opened in a new file with just coding.

Just put that into the Sub requiring the code.


http://i48.tinypic.com/rlyo80.png
Ever since Misc was killed, I've pretty much stopped going to Scratch Forums...

Offline

 

Board footer