473,411 Members | 2,530 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,411 software developers and data experts.

What is the replacement for BEEP() in VS ?

I am now using Beep to make a short warning-sound in my VB-Project
What is the aeqivalent command in VS.70, if i dont want use Visual Basic
Run-Time Library Members

Thanks Peter


Nov 21 '05 #1
12 5279
Peter,

Why you ask this when you don't want to use VBNet this in this newsgroup. Is
than the newsgroup for CSharp, JSharp or VC not more the newsgroup where you
ask this depending on the language you are using?

Cor
Nov 21 '05 #2
I am using VS 70 with VB
But i dont wnat use the old fashioned commands from VB 6.0
I only want use the NEW commands from VS.VB

Peter
"Cor Ligthert" <no************@planet.nl> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
Peter,

Why you ask this when you don't want to use VBNet this in this newsgroup.
Is than the newsgroup for CSharp, JSharp or VC not more the newsgroup
where you ask this depending on the language you are using?

Cor

Nov 21 '05 #3
Peter,
But i dont wnat use the old fashioned commands from VB 6.0
I only want use the NEW commands from VS.VB


There are not much replacements that I know.
The If, Else, + - * \ / ^ are complete the same as in VBclassic, VBA and
VBS.

Or do you mean commands as OrElse and AndAlso, there are not much like that.

I think that it is almost impossible to write a program without those I
showed first.

How do you do that?

Cor
Nov 21 '05 #4
This is one sample it's in C#.

using System.Runtime.InteropServices;

class Message
{
[DllImport("kernel32.dll")]
public static extern bool Beep(int Frequency, int Duration);

public static void Main()
{
Beep(220, 250);
}
}

The Beep API doesn't always work on all PC's , depends how the PC is setup.
The
MessageBeep is more reliable:

Public Enum MessageBeepEnum
Simple = -1
OK = &H0&
Hand = &H10&
Question = &H20&
Exclamation = &H30&
Asterisk = &H40
End Enum

Public Declare Function MessageBeep Lib "user32"(ByVal Beep As
MessageBeepEnum) As Int32

Hope this helps you.
"Peter Stojkovic" <Pe*************@gmx.net> wrote in message
news:eG**************@TK2MSFTNGP10.phx.gbl...
I am now using Beep to make a short warning-sound in my VB-Project
What is the aeqivalent command in VS.70, if i dont want use Visual Basic
Run-Time Library Members

Thanks Peter



Nov 21 '05 #5
Windows Forms Tips and Tricks has an article on using sound. Code is in VB
or C#.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.

"Peter Stojkovic" <Pe*************@gmx.net> wrote in message
news:eG**************@TK2MSFTNGP10.phx.gbl...
I am now using Beep to make a short warning-sound in my VB-Project
What is the aeqivalent command in VS.70, if i dont want use Visual Basic
Run-Time Library Members

Thanks Peter



Nov 21 '05 #6
Hi Cor

I need ONLY the function or sub in VS.VB that makes the same like in
earlier times the "beep()"
to give the user the info, there is a wrong input for example.

What is the new "beep()"-function.

I dont want use "beep", I want use the new function, the name i am looking
for

Peter


"Cor Ligthert" <no************@planet.nl> wrote in message
news:Ov**************@TK2MSFTNGP09.phx.gbl...
Peter,
But i dont wnat use the old fashioned commands from VB 6.0
I only want use the NEW commands from VS.VB


There are not much replacements that I know.
The If, Else, + - * \ / ^ are complete the same as in VBclassic, VBA and
VBS.

Or do you mean commands as OrElse and AndAlso, there are not much like
that.

I think that it is almost impossible to write a program without those I
showed first.

How do you do that?

Cor

Nov 21 '05 #7
Peter,

There was yesterday a long discussion thread about the same.
You are doing yourself not well by not using the Microsoft.VisualBasic
Namespace

http://msdn.microsoft.com/library/de...rykeywords.asp

Without any restriction can this namespace by the way as well used in C#.

Cor
Nov 21 '05 #8
"Peter Stojkovic" <Pe*************@gmx.net> schrieb:
I am now using Beep to make a short warning-sound in my VB-Project
What is the aeqivalent command in VS.70, if i dont want use Visual Basic
Run-Time Library Members


There is no managed replacement available. BTW: I strongly recommend to
rethink the decision to use only a part of Visual Basic .NET.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #9
The idea was not use OLD (OUTDATED) parts of VB.NET, that are cutted in next
release by microsoft.
Peter

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
"Peter Stojkovic" <Pe*************@gmx.net> schrieb:
I am now using Beep to make a short warning-sound in my VB-Project
What is the aeqivalent command in VS.70, if i dont want use Visual Basic
Run-Time Library Members


There is no managed replacement available. BTW: I strongly recommend to
rethink the decision to use only a part of Visual Basic .NET.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #10
Peter,

Any idea why Microsoft would do that. AFAIK is VBx the most used programming
language on PC.

Or do you have information that we oversee in this newsgroup? Because that
can really be interesting.

Cor
Nov 21 '05 #11
Peter,
The new method from VB.NET is oddly enough Beep also.

If you want to use Beep in C#, add a reference to Microsoft.VisuaBasic.dll,
then use Microsoft.VisuaBasic.Interaction.Beep.

Alternatively you can use a Win32 API as Pipo shows, if you need the extra
parameters...

Hope this helps
Jay
"Peter Stojkovic" <Pe*************@gmx.net> wrote in message
news:O7**************@TK2MSFTNGP14.phx.gbl...
I am using VS 70 with VB
But i dont wnat use the old fashioned commands from VB 6.0
I only want use the NEW commands from VS.VB

Peter
"Cor Ligthert" <no************@planet.nl> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
Peter,

Why you ask this when you don't want to use VBNet this in this newsgroup.
Is than the newsgroup for CSharp, JSharp or VC not more the newsgroup
where you ask this depending on the language you are using?

Cor


Nov 21 '05 #12
Peter,
The Microsoft.VisualBasic namespace is an integral part of VB.NET (and
..NET), types here will not be "cut".

The Microsoft.VisualBasic.Compatibility namespace is used in converted
projects, types here "should" only be used for projects converted from VB6.
I would not expect types here to be "cut" either.

http://msdn.microsoft.com/library/de...eReference.asp
The Microsoft.VisualBasic.Compatibility namespace is wholly contained in the
Microsoft.VisualBasic.Compatibility.dll, this dll is not normally deployed,
hence using it requires you to include it in your setup project. Where as
the Microsoft.VisualBasic namespace is wholly contained in the
Microsoft.VisualBasic.dll, which is installed as part of the framework
itself...
Beep is in the Interaction module in the Microsoft.VisualBasic namespace.
Ergo its safe to use.

Hope this helps
Jay

"Peter Stojkovic" <Pe*************@gmx.net> wrote in message
news:%2********************@TK2MSFTNGP14.phx.gbl.. .
The idea was not use OLD (OUTDATED) parts of VB.NET, that are cutted in
next release by microsoft.
Peter

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
"Peter Stojkovic" <Pe*************@gmx.net> schrieb:
I am now using Beep to make a short warning-sound in my VB-Project
What is the aeqivalent command in VS.70, if i dont want use Visual Basic
Run-Time Library Members


There is no managed replacement available. BTW: I strongly recommend to
rethink the decision to use only a part of Visual Basic .NET.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>


Nov 21 '05 #13

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

Similar topics

6
by: Leo | last post by:
hi there i want python to do a beep. in the docu i found in tkinter the method bell() but the script: import Tkinter Tkinter.bell() gives the error:
3
by: #Hai | last post by:
Hi, I want to throw out a series of 'beep..beep..beep' to the speaker. How to do that ? Thanks
19
by: Anon Email | last post by:
Hi everyone, Let's see, now. This question is about the capabilities of ANSI C++. I want to write and compile code in ANSI C++ that, when compiled, will make the computer speaker beep; or, at...
8
by: Marcia Gulesian | last post by:
How can I create a beep in javascript (I.E. 5.5 +) ?
1
by: Hai Ly Hoang | last post by:
Hi, I want to make a beep (like MS-DOS beep, not a beep from sound-card). How to do that ? Thanks
2
by: Hai Ly Hoang | last post by:
Hi, I want to make a beep from PC speaker (like C++ beep(), not a beep from sound-card). How to do that ? Thanks
4
by: Kartic | last post by:
Hi, My program needs to open another form(Form2) at form1 load. But Form2 always opens with a beep. How do I get rid of that beep. I tried to load form2 from Form1 activate also but with no...
9
by: Pradeep | last post by:
Hi all, One of our customers who has been using Access 97 for a long time has made a strategic decision to move to Oracle 10G. However, they are used to the simplicity of creating forms and...
5
by: =?Utf-8?B?UmFmYWVs?= | last post by:
I'm studying C# (I've been a VB developer). I'm making some tests and I need to use Console.Beep(), but it doesn't make any sound, no matter if I try it in VS2008 beta or VS2005. Could anybody...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
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,...
0
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...

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.