Hello ,
I am facing a weird problem. I am using the MouseDown event handler to detect a mouse press on a particular button.
This code works on one PC but does not work on the other.
Both the PCs work on Windows XP OS.
Is there anything I am missing?
Thank you very much in advance
Venksys
The sample code is elow:
private
void startButton_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e) {
Cursor.Current = Cursors.WaitCursor;
string Channel_Text_Start; bool[] dataArray = new bool[1]; dataArray[0]=
true; try {
reset_Indicator_high =
new Task("DO_pin_17_high"); Channel_Text_Start="Dev1/port1/line7";
reset_Indicator_high.DOChannels.CreateChannel(Channel_Text_Start,"Start_Channel_high",ChannelLineGrouping.OneChannelForEachLine); DigitalSingleChannelWriter writer =
new DigitalSingleChannelWriter(reset_Indicator_high.Stream); writer.WriteSingleSampleMultiLine(
true, dataArray); //enable the timer loopTimer.Enabled =
true; }
catch(DaqException exception) {
loopTimer.Enabled =
false; MessageBox.Show(exception.Message);
//dispose task reset_Indicator_high.Dispose();
}