473,581 Members | 3,043 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Voice Recorder For Pocket PC (VB.NET version)

Okay we have here a VB.NET version of the .net compact framework voice
recorder sample that uses open net CF
c# version at:

get it to record, save, play back, etc?

' Q: Once we have a voice recorder object, how do you then pass messages
to it??
' A: Im working on that... Essentially the sendmessage api function will
need to
' be p/invoked. The voicerecordercr eate function has returned the hwnd
' messages can be sent to this. The voice recorder messages are
documented in
' the sdk
' I haven't had much luck with the sendmessage function - everytime I
try to
' send a message to the voicerecorder, it just closes the
voicerecorder.. ...
' I got this code to run. This code seems to record to files in \\My
' Documents\~VRec _* where * is a number.
' Alan, did you install the Speech.NET or Speech API?
' The files ~VRec_* are temporary files that the voice recorder uses to
' the data while it is recording. Sometimes, depending on how the
recorder is
' terminated, they get converted to recording*.wav
' Take a look here:
' http://www.innovativedss.com/forums/...sp?TOPIC_ID=80
' for an example of playing .WAV sounds.

' ported to vb.net by
' Tom Shelton (to*@YOUKNOWTHE DRILLmtogden.co m)
' Off the top of my head... I'm not sure why the original code is using
' unsafe code. There doesn't seem to be anything used that would require
' - but, I don't know much about the Pocket PC environment. If the
unsafe is
' required for some reason on PPC, then you have to use C#.
' with additional help from
' "Ken Tucker" <vb***@bellsout h.net>

Imports System
Imports System.Data
Imports System.Runtime. InteropServices
Public Class VoiceRecorder
<StructLayout(L ayoutKind.Seque ntial)> _
Protected Structure CM_VOICE_RECORD ER
Public cb As Integer
Public dwStyle As Integer
Public xPos As Integer
Public yPos As Integer
Public hwndParent As IntPtr
Public id As Integer
Public lpszRecordFileN ame As String
End Structure
<DllImport("voi cectl.dll", CallingConventi on:=CallingConv ention.Winapi)>
Private Shared Function VoiceRecorder_C reate _
(ByRef myVoiceRecorder As CM_VOICE_RECORD ER) As IntPtr
End Function
Private voicerec As CM_VOICE_RECORD ER
Private handle As IntPtr
Public Sub New()
With voicerec
.cb = Marshal.SizeOf( voicerec)
.lpszRecordFile Name = "\My Documents\Voice Control.wav"
.xPos = -1
.yPos = -1
End With
End Sub
Public Sub Show()
handle = VoiceRecorder_C reate(voicerec)
End Sub
End Class

'************** *************** *************** *************** ************
'code for Button1 codebehind to record & save a voice memo to
"myfile.wav "
'currently we can only create an instance of VoiceRecorder
'how do you get it to record, save, play back, etc?
'************** *************** *************** *************** ************
Private Sub Button1_Click(B yVal sender As System.Object, ByVal e As
System.EventArg s) Handles Button1.Click
Dim VoiceRecorder1 As VoiceRecorder
VoiceRecorder1 = New VoiceRecorder
'VoiceRecorder1 .???
End Sub

*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 20 '05 #1
0 1930

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: Mad Scientist Jr | last post by:
Can someone convert this code to vb.net? it is a voice recorder for pocket pc. many thanks ! source: http://www.opennetcf.org/forums/topic.asp?TOPIC_ID=62 the code: using System;
by: Oliver Huppert | last post by:
Hi all, can someone tell me what I need to develop applications for PPC2003 with C#? I have read several meanings about this topic. Do I need Visual Studio .NET or is Visual C# .NET Standard enough?? thanks regards
by: Jon Lehrer | last post by:
Hoping for some advice: I would like to write some code that controls the "window's sound recorder" that I embedded in my program with OLE. I can do this with Excel (OLE1.Object.Parent.Activecell.Formula = "Hi") because I know the commands from VBA in Excel. Is there a way to do this with Windows Sound Recorder? Some line of code that...
by: Mad Scientist Jr | last post by:
hi can someone possibly convert this to vb.net ? it is c# code that lets the pocket pc access the voice recorder... many thanks... source: wapboy http://www.opennetcf.org/forums/topic.asp?TOPIC_ID=62
by: Mad Scientist Jr | last post by:
I'm trying to record a voice memo on a Pocket PC (2000) from VB.NET (smart device application from vs.net 2003). Tom Shelton did an initial conversion to VB.NET which I am trying to run, but am getting errors I don't quite understand (I've never done anything like this before)... Any help would be appreciated in getting this to work... ...
by: Kent Briggs | last post by:
I'm a Delphi programmer with a need to create a Pocket PC app. Since full support for the .NET Compact Framework won't be added to Delphi for another year, I'm looking at learning VB. Apparently I can get that in Visual Studio 2005 Standard via a competitive upgrade for under $200, is that correct? I went ahead and downloaded the free VB...
by: Fab | last post by:
Hi, What is the best (or simple!) way to make some voice recording in C# ? Thanks.
by: markmcgookin | last post by:
Hi Folks, I was hoping to get a little help here. I have recently foun the following code (here: http://www.opennetcf.org/forums/topic.asp?TOPIC_ID=160) public class VoiceRecorder { #region API prototypes private unsafe static extern IntPtr VoiceRecorder_Create(CM_VOICE_RECORDER* voicerec);
by: Terry Metcalfe | last post by:
I have an Asus A696 pocket PC. I have written a small test program in VB6 called "Pocket PC" and compiled it just as I would normally do to run on my desk top. It runs on my desk top perfectly normally. I then copied the application file to my Pocket PC. When I try to run it on my Pocket PC I get the error message " 'Pocket PC' is not a...
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.