Welcome to the site. How are you distinguishing in code between the two monitors?
Hi kenobewan ,
thx for responding to my query.........i am searching in different sites....but i did not get..
Here i wil explain..
please go through it..
for the cpu...i connected the monitors..using a circuit..it gives the no to each monitor..
In my project i have the two applications..one should run on first monitor...second should run on the second monitor.
for that..i wrote the code..like this i have 2 forms..like
frmpatient.cs (1 monitor)and
frmphysician.cs(second monitor).
and i created a class is
using System.Data;
using Microsoft.Win32;
namespace ECSPatient
{
/// <summary>
/// Summary description for CoreApplication.
/// </summary>
public class CoreApplication
{
#region Main Function
[STAThread]
static void Main(string[] args)
{
//XmlWriteKeyboard();
try
{
Thread thirdThread = new Thread(new ThreadStart(RunfrmPatient));
thirdThread.Start();
// Thread secondThread = new Thread(new ThreadStart(RunfrmApplication));
// secondThread.Start();
// secondThread.Priority = ThreadPriority.Highest;
}
catch(Exception ex)
{
MessageBox.Show("Exception main : " + ex.Message);
}
}
#endregion
#region XmlWriteKeyboard
//
// public static void XmlWriteKeyboard()
// {
// XmlDocument xmlConfigDoc=new XmlDocument();
//
// xmlConfigDoc.Load(AppDomain.CurrentDomain.BaseDire ctory + "\\status.xml");
//
// XmlNode xnDevice=xmlConfigDoc.DocumentElement.SelectSingle Node("//Xml");
//
// foreach (XmlNode node in xnDevice)
// {
// if(node.Name=="keyboard")
// node.ChildNodes[0].Value=strKeyStatus;
// }
// xmlConfigDoc.Save(AppDomain.CurrentDomain.BaseDire ctory + "\\status.xml");
// }
//
#endregion
#region Run OHM Application
/* Name : RunOHMApplication
* Purpose : Function which displays the forms of both Presentation 1 and Presentation 2
*
* */
protected static void RunfrmPatient()
{
// change the frmhome(1) to frmhome(0) while working in the local system.
//While doing install shield set it to frmhome(1) to run the patient application in the second monitor.
System.Windows.Forms.Application.Run(new frmpatient(0));
//System.Windows.Forms.Application.Run(new frmOHMPresentationA(0, contentCollection, strFirstLoopStatus));
}
#endregion
and in the frmpatient.cs code in the constructor is
#region "Overwrite the construction to identify which screen the patient appln should show
public frmpatient(int intScreen)
{
InitializeComponent();
ScreenNumber = intScreen;
}
#endregion
and this is in pageload
this.Bounds =Screen.AllScreens[ScreenNumber].Bounds;
please go through this
THANKS Ramesh d