Click here to Skip to main content
15,889,034 members
Home / Discussions / C#
   

C#

 
GeneralRe: Filestream issue Pin
Anonymous4-Feb-05 4:57
Anonymous4-Feb-05 4:57 
GeneralRe: Filestream issue Pin
Heath Stewart4-Feb-05 6:20
protectorHeath Stewart4-Feb-05 6:20 
GeneralBeep() without using Windows.Forms Pin
Tim Gilbert4-Feb-05 4:32
Tim Gilbert4-Feb-05 4:32 
GeneralRe: Beep() without using Windows.Forms Pin
Anonymous4-Feb-05 4:39
Anonymous4-Feb-05 4:39 
GeneralRe: Beep() without using Windows.Forms Pin
Tim Gilbert4-Feb-05 4:48
Tim Gilbert4-Feb-05 4:48 
GeneralRe: Beep() without using Windows.Forms Pin
Dave Kreskowiak4-Feb-05 6:33
mveDave Kreskowiak4-Feb-05 6:33 
GeneralRe: Beep() without using Windows.Forms Pin
Nick Parker4-Feb-05 6:13
protectorNick Parker4-Feb-05 6:13 
GeneralRe: Beep() without using Windows.Forms Pin
Heath Stewart4-Feb-05 6:16
protectorHeath Stewart4-Feb-05 6:16 
A service can actually interact with the desktop because it can create a window station either one of two ways.
  • Run the service as SYSTEM and check the interactive option. This is highly discouraged, however, because a service rarely needs SYSTEM (like Administrative) privileges.
  • Run the service as a user with interactive login rights. That user can still login interactively, but the service runs as that user. A separate window station (which hosts a desktop) is created for both.
You can read more about Windows Services - in general - at http://msdn.microsoft.com/library/en-us/dllproc/base/services.asp[^].

I am planning on releasing a new article about this hopefully this weekend if I get time to finish it up, so keep an eye on my articles if you'd like.

You could simply P/Invoke the native Beep API:
[DllImport("kernel32.dll", SetLastError=true)]
static extern bool Beep(
  [MarshalAs(UnmanagedType.U4)] int dwFreq,
  [MarshalAs(UnmanagedType.U4)] int dwDuration);
public void Beep()
{
  if (!Beep(256, 500))
    throw new Win32Exception();
}
This is by far more simple.

This posting is provided "AS IS" with no warranties, and confers no rights.

Software Design Engineer
Developer Division Sustained Engineering
Microsoft

[My Articles] [My Blog]
GeneralRe: Beep() without using Windows.Forms Pin
Dave Kreskowiak4-Feb-05 6:35
mveDave Kreskowiak4-Feb-05 6:35 
GeneralLinkLabel size Pin
gantww4-Feb-05 3:39
gantww4-Feb-05 3:39 
GeneralRe: LinkLabel size Pin
Anonymous4-Feb-05 4:45
Anonymous4-Feb-05 4:45 
GeneralRe: LinkLabel size Pin
gantww4-Feb-05 7:54
gantww4-Feb-05 7:54 
GeneralImage Rectify or Panorama algorithm Pin
pxp4-Feb-05 3:15
pxp4-Feb-05 3:15 
GeneralRe: Image Rectify or Panorama algorithm Pin
pxp6-Feb-05 23:15
pxp6-Feb-05 23:15 
QuestionHow can I controle by resource in C# Pin
students552 university4-Feb-05 2:51
students552 university4-Feb-05 2:51 
AnswerRe: How can I controle by resource in C# Pin
Judah Gabriel Himango4-Feb-05 6:38
sponsorJudah Gabriel Himango4-Feb-05 6:38 
GeneralListView grouping Pin
dpmIris4-Feb-05 2:49
dpmIris4-Feb-05 2:49 
GeneralRe: ListView grouping Pin
Heath Stewart4-Feb-05 6:07
protectorHeath Stewart4-Feb-05 6:07 
GeneralRe: ListView grouping Pin
dpmIris6-Feb-05 22:01
dpmIris6-Feb-05 22:01 
GeneralRe: ListView grouping Pin
Heath Stewart7-Feb-05 6:47
protectorHeath Stewart7-Feb-05 6:47 
GeneralRe: ListView grouping Pin
Joel Lucsy4-Feb-05 9:51
Joel Lucsy4-Feb-05 9:51 
QuestionHow can I controle by resource in C# !!!! Pin
students552 university4-Feb-05 2:49
students552 university4-Feb-05 2:49 
AnswerRe: How can I controle by resource in C# !!!! Pin
Heath Stewart4-Feb-05 6:06
protectorHeath Stewart4-Feb-05 6:06 
GeneralUsing a View in SQL server and SqlCommandBuilder at the same time Pin
hajob4-Feb-05 2:13
hajob4-Feb-05 2:13 
GeneralRe: Using a View in SQL server and SqlCommandBuilder at the same time Pin
Heath Stewart4-Feb-05 6:02
protectorHeath Stewart4-Feb-05 6:02 

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.