Click here to Skip to main content
16,007,126 members
Home / Discussions / Visual Basic
   

Visual Basic

 
Generaldatagrid - sync scroll Pin
Member 58350920-Oct-03 21:55
Member 58350920-Oct-03 21:55 
GeneralArrays in VB.Net Pin
Rip V. Winkle20-Oct-03 10:52
Rip V. Winkle20-Oct-03 10:52 
GeneralRe: Arrays in VB.Net Pin
Nick Seng21-Oct-03 20:32
Nick Seng21-Oct-03 20:32 
GeneralRe: Arrays in VB.Net Pin
Rip V. Winkle22-Oct-03 4:11
Rip V. Winkle22-Oct-03 4:11 
GeneralRe: Arrays in VB.Net Pin
Dave Kreskowiak22-Oct-03 7:37
mveDave Kreskowiak22-Oct-03 7:37 
GeneralRe: Arrays in VB.Net Pin
Mike Ellison22-Oct-03 8:48
Mike Ellison22-Oct-03 8:48 
GeneralRe: Arrays in VB.Net Pin
CybrWeez30-Oct-03 9:49
CybrWeez30-Oct-03 9:49 
Generalsound api to work in win98 Pin
pedagogy20-Oct-03 5:43
pedagogy20-Oct-03 5:43 
Dear Ladies|Gentlemen:


I developed a visual basic program in VB4
on Win3.11 (16 bit)incorporating an API
call to produce a 'siren' effect.
The executible worked fine in the 16 bit
environment but upon running it under
Win98 and Win98se the 'siren' effect
doesn't work! There are no 'run time'
errors... just no 'siren'!

The API is defined in 'general declarations':

Option Explicit

'api for sound.drv (called by subroutine 'racket')
'resides in module.bas

Declare Function opensound% Lib "sound.drv" ()
Declare Function setvoicesound% Lib "sound.drv" (ByVal nsource%, ByVal freq&, ByVal nduration%)
Declare Function startsound% Lib "sound.drv" ()
Declare Function closesound% Lib "sound.drv" ()
Declare Function waitsoundstate% Lib "sound.drv" (ByVal state%)

'The 'siren', named 'racket' is conditionally called from a subroutine:

Public Sub racket()
Dim t, n2, n3
Dim frequency As Long
Dim duration As Integer

t = opensound() 'start freq

again: 'label to repeat for siren effect

'n3 = frequency; here set in a for-next loop
'n2 = duration in 1/10th sec; + _
set here; now = to .3 sec
n2 = 8 'duration;
duration = n2
For n3 = 500 To 1200 Step 50 'freq in a for next loop
frequency = n3 * 65536
t = setvoicesound(1, frequency, duration)
t = startsound()
While (waitsoundstate(0) <> 0): Wend
't = closesound() stops frequency
DoEvents
Next n3
GoTo again
End Sub

How do I make this API work in windows 98 and 98se?
Thank you, Ralph










Thank you, Pedagogy
GeneralRe: sound api to work in win98 Pin
Dave Kreskowiak20-Oct-03 6:16
mveDave Kreskowiak20-Oct-03 6:16 
Questionhow write and add uninstaller by vb.net ? Pin
Tridip Bhattacharjee20-Oct-03 2:28
professionalTridip Bhattacharjee20-Oct-03 2:28 
AnswerRe: how write and add uninstaller by vb.net ? Pin
Dave Kreskowiak20-Oct-03 6:05
mveDave Kreskowiak20-Oct-03 6:05 
Questionhow to customize my setup.exe ? Pin
Tridip Bhattacharjee20-Oct-03 2:24
professionalTridip Bhattacharjee20-Oct-03 2:24 
Generalsetup related question Pin
Tridip Bhattacharjee20-Oct-03 2:19
professionalTridip Bhattacharjee20-Oct-03 2:19 
Question) how to change look and feel of the scrollbar of internet explorer ?? Pin
Tridip Bhattacharjee20-Oct-03 2:15
professionalTridip Bhattacharjee20-Oct-03 2:15 
AnswerRe: ) how to change look and feel of the scrollbar of internet explorer ?? Pin
Nic Rowan20-Oct-03 2:44
Nic Rowan20-Oct-03 2:44 
AnswerRe: ) how to change look and feel of the scrollbar of internet explorer ?? Pin
Member 46017421-Oct-03 22:05
Member 46017421-Oct-03 22:05 
GeneralLicence problem Pin
imran18920-Oct-03 1:43
imran18920-Oct-03 1:43 
GeneralVB.NET equivalent Syntax Pin
bora3ee18-Oct-03 12:27
bora3ee18-Oct-03 12:27 
GeneralRe: VB.NET equivalent Syntax Pin
Mike Ellison18-Oct-03 15:04
Mike Ellison18-Oct-03 15:04 
GeneralRe: VB.NET equivalent Syntax Pin
bora3ee19-Oct-03 11:40
bora3ee19-Oct-03 11:40 
GeneralLoading images from SQL 2000 to VB6 Pin
vbrookie_tx18-Oct-03 4:33
vbrookie_tx18-Oct-03 4:33 
GeneralTransposing columns and rows Pin
SolomonSvn17-Oct-03 5:38
SolomonSvn17-Oct-03 5:38 
QuestionInstaller class related question? Pin
Tridip Bhattacharjee17-Oct-03 2:56
professionalTridip Bhattacharjee17-Oct-03 2:56 
AnswerRe: Installer class related question? Pin
Dave Kreskowiak17-Oct-03 4:58
mveDave Kreskowiak17-Oct-03 4:58 
AnswerPunctuation marks Pin
Nick Seng17-Oct-03 15:16
Nick Seng17-Oct-03 15:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.