Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

developing a software

Posted on 1998-12-08
4
Medium Priority
?
176 Views
Last Modified: 2010-05-03
i am currently developing a software which will involve a lot of graphics, animation and sound. i am thinking about an idea of creating a blank form and import any picture that i want at any time so that i have no need to create a number of forms with pictures stay still on them, as those forms might have similar functions. in that case, i need to create a file where i will store all the pictures inside for future access. my problem is, how am i going to access the picture that i want in the form and then clear it to access the other picture in the same form?
another problem is that how to import sound into my software?
thanks!
0
Comment
Question by:lslim
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 4

Accepted Solution

by:
idcanada earned 100 total points
ID: 1448923

You MUST use a Resouce file for all of this.
Should you not know how, simply post a comment,
and I will give you instructions on how to create, add and read.


0
 
LVL 3

Expert Comment

by:Sendoh
ID: 1448924
Hi !
I thought you can just using imagelist control for graphics and multimedia control for sound ??
Much more easier than resource right ??
0
 
LVL 14

Expert Comment

by:waty
ID: 1448925
Save all in ressource files. You could even store your bitmaps in imagelist.

For the sound, do as follow to play them

' #VBIDEUtils#************************************************************
' * Programmer Name  : Waty Thierry
' * Web Site         : www.geocities.com/ResearchTriangle/6311/
' * E-Mail           : waty.thierry@usa.net
' * Date             : 20/11/98
' * Time             : 09:33
' * Module Name      : Multimedia_Module
' * Module Filename  : Multimedia.bas
' **********************************************************************
' * Comments         : Contains several multimedia functions
' *
' *
' **********************************************************************

Option Explicit

Private Const SND_ALIAS = &H10000
Private Const SND_ASYNC = &H1
Private Const SND_FILENAME = &H20000
Private Const SND_LOOP = &H8
Private Const SND_NODEFAULT = &H2
Private Const SND_MEMORY = &H4
Private Const SND_NOSTOP = &H10
Private Const SND_NOWAIT = &H2000
Private Const SND_SYNC = &H0

Private Declare Function PlaySound Lib "winmm.dll" Alias "PlaySoundA" (ByVal lpszName As String, ByVal hModule As Long, ByVal dwFlags As Long) As Long
Private Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long

Private Declare Function waveOutGetNumDevs Lib "winmm" () As Long
Private Declare Function midiOutGetNumDevs Lib "winmm" () As Integer

Private Declare Function midiOutGetVolume Lib "winmm.dll" (ByVal uDeviceID As Long, lpdwVolume As Long) As Long
Private Declare Function waveOutGetVolume Lib "winmm.dll" (ByVal uDeviceID As Long, lpdwVolume As Long) As Long

Private Declare Function midiOutSetVolume Lib "winmm.dll" (ByVal uDeviceID As Long, lpdwVolume As Long) As Long
Private Declare Function waveOutSetVolume Lib "winmm.dll" (ByVal uDeviceID As Long, lpdwVolume As Long) As Long

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

Private Const MMSYSERR_NOERROR = 0

Public Const AUDIO_NONE = 0
Public Const AUDIO_WAVE = 1
Public Const AUDIO_MIDI = 2

Public Sub PlayWaveRes(vntResourceID As Variant, Optional vntFlags)
   ' #VBIDEUtils#************************************************************
   ' * Programmer Name  : Waty Thierry
   ' * Web Site         : www.geocities.com/ResearchTriangle/6311/
   ' * E-Mail           : waty.thierry@usa.net
   ' * Date             : 3/12/98
   ' * Time             : 09:47
   ' * Module Name      : Multimedia_Module
   ' * Module Filename  : Multimedia.bas
   ' * Procedure Name   : PlayWaveRes
   ' * Parameters       :
   ' *                    vntResourceID As Variant
   ' *                    Optional vntFlags
   ' **********************************************************************
   ' * Comments         :
   '           If you want to play sound files asynchronously in
   '           Win32, then you MUST change bytSound() from a local
   '           variable to a module-level or static variable. Doing
   '           this prevents your array from being destroyed before
   '           sndPlaySound is complete. If you fail to do this, you
   '           will pass an invalid memory pointer, which will cause
   '           a GPF in the Multimedia Control Interface (MCI).
   ' *
   ' *
   ' **********************************************************************

   Dim bytSound() As Byte ' Always store binary data in byte arrays!
   
   bytSound = LoadResData(vntResourceID, "WAVE")
   
   If IsMissing(vntFlags) Then
      vntFlags = SND_NODEFAULT Or SND_SYNC Or SND_MEMORY
   End If
   
   If (vntFlags And SND_MEMORY) = 0 Then
      vntFlags = vntFlags Or SND_MEMORY
   End If
   
   sndPlaySound bytSound(0), vntFlags
   
End Sub

0
 
LVL 1

Author Comment

by:lslim
ID: 1448926
idcanada,
       i will be very much grateful if you could give me more instructions on that. i am just a beginner using vb...i look forward to your prompt reply...

0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

604 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question