venomocity -8 Newbie Poster

Alright, I'm at it again, trying another version of my game. Sorry, it's been a while since I've been here and while I tried checking to see if anyone else had asked about this, I didn't see anything that was to the point.

I'm trying to play an mp3 or wav file by simply mousing over a label, thus using the below:

Private Sub Label1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)

But I'm confused as to how to what I play this with. I don't want a player, just a song to play. I'd like it as simple as possible as I'm not the brightest bulb. I've tried such things as below:

Private Sub Command1_Click()

Dim sCmd As String

sCmd = "mplayer.exe /Play c:your.mp3"

Shell sCmd, vbMinimizedNoFocus

End Sub

or this one:

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 asynchronously

Private Sub Form_Load()
  Call sndPlaySound("C:\Windows\Media\Explode.wav", SND_ASYNC)
End Sub

But I'm getting errors all over the place. I'd really love some help please.

venomocity -8 Newbie Poster

Ah, thanks SlyMaelstrom! You were right, he didn't leave blank, but I overlooked a Filename where I didn't enter the path. But I like your string as well. I'll keep both for the future! And thanks for the suggestion vb5prgrmr. I appreciate all the help!

venomocity -8 Newbie Poster

What I was asking for, is maybe you could provide it in a frm like in a zip or something. Cuz I'm too retarded to fill in the blanks I guess.

venomocity -8 Newbie Poster

Well from my understanding of evolution it is about the development of living organisms and I wouldn't call a PC or a cabin a living organism. There for evolution wins again.

You will probably find that the origin of species is largley impaction on what happened during the time we know as the big bang. The beginning of the universe when planets suddenly came into existance probably from something in the parallel universe going terribly wrong.

Ok, so why don't we still see apes evolving? Some half man, half ape? What stopped the process? I haven't seen anything lately of it. I understand the process of evolution that we can push everything away and say that we forced ourselves where we are today, that basically environment created us. But how could that have happened? You telling me that nothing existed in space for millenia's yet one day pop Sun created itself, earth created itself, then built an oxygen supply, after that an ameba crawled from the ocean and soon sprouted legs and then before you know it ape, and then from that man. Why dont we still see that happening today? What stopped that process? It never happened that way thats why, but I respect others thinking, please dont think I want to enforce my thoughts on someone else, I just wanted to share in the discussion. If asked, I believe in creation. The body is too well designed to be an accident or to have evolved from nothing.

venomocity -8 Newbie Poster

I believe in creation. Simply put, you don't come across a cabin in the woods and think, "wow, it must have built itself!" (Same fits a well designed PC...like mine! hehe) When you look at the fact of how the world works in the design itself, it didn't just happen, it had to be constructed. The exact distance from the sun to survive, not freeze to death or burn up, the oxygen levels not too much not too low, water. These things didn't just POP and now we have a perfect home, it was created.

Salem commented: Read Dawkins "The blind watchmaker" and get a clue. -6
Rashakil Fol commented: Learn some probability before talking about probability. -2
venomocity -8 Newbie Poster

Comatose you always come through for me, but I have failed. I downloaded MCI Conversation which came with a frm and other things but I couldn't seem to understand how it was to work. I tried your code but it failed. I know its me and sorry to pester but would you have an example of how it should look with a test song or something? Just in a standard Form Load or something?

Thanks for all your help!

venomocity -8 Newbie Poster

Alright my family of geniuses here is my new dilemma.

In a card game I have created via VB6 I thought it would be great to spiff it up with music during game play. The problem however is I have no idea where to begin. I have read some posts but nothing really grabbed me as to what to do.

Here is what I'm trying to do, I want a built in player if you will, with a list of songs to choose from and to be able to pause and skip to the next song via this built in player. (Hopefully I'm not crazy and asking the impossible)

I figure it would just start automatically in the Form Load.

Thanks in advance

venomocity -8 Newbie Poster

Thanks Comatose I was working for a while on trying to figure out how to make it look like real code. I guess I'm more of a noob than I'd like to admit but I appreciate the help. Thanks for the answer as well I haven't tried it yet, but I will soon. I just want to make sure I do it right before I sign off on the question.

Thanks!

venomocity -8 Newbie Poster

I'm working on designing a game, the problem now is that while I have a code for randomizing a number, its the same series every time. This isn't good for random, to know what you're going to roll before you hit the button sucks. Is there anything to help with this?

(If this is a redundant question that has been asked before, I apologize. Just direct me in the right direction. Thanks)

Here is what my code for random looks like;

Private Sub Attack_Click()

Value = Int((6 - 0) * Rnd + 0)

A1.Caption = Int((6 - 0) * Rnd + 0)
End Sub

venomocity -8 Newbie Poster

I figured it out. I knew I had it wrote down somewhere! And thus here is the answer.

aroll.Caption = Int((21 - 10) * Rnd + 10)

Thanks anyway!

venomocity -8 Newbie Poster

I'm back after being gone for a while. Thus I haven't played with VB in some time. Thus my brain strength has gone out with it. I'm still working on my game and trying to make the system choose a number between 10 to 21 then put that into a label.caption. In so doing, I've tried certain formulas but it just isn't working. Here is something like I thought it would look like:

aroll.Caption = Str(Int(Rnd * 21 - 10))

Obviously the formula is wrong, but I can't seem to figure out where.

Thanks in advance for any help.

venomocity -8 Newbie Poster

First of all let me say I love this forum, everyone has been very nice and extremely helpful! Now to my question.

I got help with a question like this before and the answer I got worked perfectly. However I have a new angle. I'm wanting to take and subtract from a caption but after a random number has been chosen. Thus lets say at the click of a button a random number of 6 is picked. I want that to be subtracted from a caption that is set at 100. Thanks in advance for all the help!

venomocity -8 Newbie Poster

Alright, I dont know if this can be done or not, but can you say, take either a caption or the text in a text box and add or subtract from what's in it, with a click of a button? Allow me to explain, lets say I have a text box with "100" as the text in it. Can I, with a click of a button, make it subtract from that 100?

venomocity -8 Newbie Poster

Alright, I have an MCSE and A+ education, but nothing is as confusing as script for VB. Well, I take that back it can be pretty simple but sometimes I just can't see the forrest for the trees. I'm trying to copy the data from a text box named creditbox in form1 and copy into the text box named creditbox in form2 how can I do that? I dont know where to start, but I want it to be copied over as soon as form2 is opened. Both forms will be kept opened so I need a button that can retrieve the data later as well. Please Help!

venomocity -8 Newbie Poster

Thank you very much. That worked. The one I needed was the ElseIf. Thus you could click the button and it applies once each time its clicked. Im sure it was simple for you guys, but I couldn't tell how to terminate it from continuing the If statement. I can setup such things like a random pick between a set of numbers and display that, like in a roll of the dice but just couldn't figure that out. Thanks

venomocity -8 Newbie Poster

I'm trying to write a game for fun. I've been able to get some lines of code from other friends who have been able to help. But they couldn't help me with this. I'm trying to write the code to where, when you click on the button it should change the caption one time. Thus you click on the button and it starts at 1 and stays at one. However it instead runs through all of the If commands and instead of stopping at 1, it proceeds all the way to 3. Here is a copy of the code:

Private Sub Tornado_Click()
If Me.TL.Caption = "" Then
Me.TL.Caption = 1
End If

If Me.TL.Caption = 1 Then
Me.TL.Caption = 2
End If

If Me.TL.Caption = 2 Then
Me.TL.Caption = 3
End If
End Sub