Solved

developing a software

Posted on 1998-12-08
4
164 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 50 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

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

688 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