0
if you provide me sample code project relates this, it's very convenient for me.
0
Hi altaf ,
thanks for solution,
i am getting error this line
"string ModelPath = new Model().GetInfo().ModelPath; ". because "Model()" could not found refrence of model() method .
and i am calling method s:
in program file main method , am i using in right place
code:
static void Main()
{
Process proc = GetExactProcess();
User32.SetForegroundWindow(proc.MainWindowHandle);
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Login());
}
0
Hi Shefali Lahariya,
First Create a Form for Notification, Design this as it look like notification, Add two button Accept and Ignore, if you are creating calling App so its required user login, and for login details you must create a common database. whenever someone call you can notify it simply doing some change in your database like setting flag or something like this.
So whenever you get the call, you have to open your notification form. and set its window on focus or set forground window so, notification window will show on the top:
You can Use following code :
- Process proc = Process.GetProcessesByName("YourApplicationName")[0];
- User32.SetForegroundWindow(proc.MainWindowHandle);
- private class User32
- {
- [StructLayout(LayoutKind.Sequential)]
- public struct Rect
- {
- public int left;
- public int top;
- public int right;
- public int bottom;
- }
-
- [DllImport("user32.dll")]
- public static extern IntPtr GetWindowRect(IntPtr hWnd, ref Rect rect);
-
- [DllImport("user32.dll")]
- public static extern bool SetForegroundWindow(IntPtr hWnd);
- }
And for sound Notification you can use
SystemSounds as
Padmalatha suggest you...

0
Hi Padmalatha,
thanks for suggestion.
but how i can identify the some one call me from other side, like when i am running another desktop app and some one call me on skype so, i am getting notification so, how to implement this feature.
0
Hi Lahariya,
For your requirement, you can play ringing sound as notification to user when call is started in your application.
There are three ways you can notify user by playing sound when video call is started in your windows application
1. Printing the character \a plays the beep sound.
Console.WriteLine("\a");
2. There are some sounds inside SystemSounds class inside System.Media Namespace which can be played.
SystemSounds.Beep.Play() plays the sound.
3. We can create a SoundPlayer located in System.Media Namespace and load a sound manually with it.
new System.Media.SoundPlayer(@"C:\Windows\Media\ringout.wav").Play();
For your requirement, as it for calling sound, you can use ringout file (resembles calling sound) which is present in Windows\Media path.