|
-
Apr 9th, 2000, 01:49 PM
#1
Thread Starter
Frenzied Member
Hey guys,
does anybody know how I can add a series of strings together (for example record lines from another file that have been assigned to a string array) into one string and assign that string to be the caption of a text box such that it would appear line by line the way it was taken out of the original file? When I do this, the lines connect end to end to make one really long line.
second question,
I am using this format to play a midi in a game I am writing :
Private Declare Function mciSendString Lib "winmm.dll" Alias _
"mciSendStringA" (ByVal lpstrCommand As String, _
ByVal lpstrReturnString As String, ByVal uReturnLength As Long, _
ByVal hwndCallback As Long) As Long
Dim ret As Long
Private Const SND_ASYNC = &H1
Private Const SND_NODEFAULT = &H2
ret = mciSendString("open e:\vb5cce\dance.rmi type sequencer alias myfile", 0&, 0, 0)
ret = mciSendString("play myfile wait", 0&, 0, 0)
ret = mciSendString("close myfile", 0&, 0, 0)
Question is how can I get this midi (rmi) in the background so that the game can go on. Currently it stops to play the entire midi . also, I would like for the midi to loop.
Any thoughts?
-
Apr 9th, 2000, 02:09 PM
#2
Hyperactive Member
In answer to your first question...
Instead of appending your lines together like this :
Code:
String = "First one " & "Second One"
Add them together like this :
Code:
String = "First one " & vbCR & "Second One"
But putting them into a "textbox" might not be pretty unless you have it set for multiple lines.
As for your second question the procedures you are using are waiting for the Midi to stop before giving control back to your application. The functions you are using might not let the program run while you are playing the Midi because they were designed to wait for it to finish...
Have a read through this site on things like "Multi-Threading" and the like to see if it helps.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|