|
|
when you press power button you will not have the power to detect anything
nelsonpaixao@yahoo.com.br
trying to help & get help
|
|
|
|
|
Thank you for the help, i have been trying out the system events and it seems to fulfil my requirements
p
|
|
|
|
|
Hi,
My name is Sandeep and I am developing an application in C# .NET, which talks to a piece of hardware. This hardware is called Loop Tester and it is connected to series (loop) of fire detector, smoke detector, etc. I am informed by the Line manager that there is no need to study the hardware. What is needed at the initial stage is to develop a program which talks to piece of hardware, connected through RS232, which forms the communication base of the project. After successfully developing it, I can write the remaining application i.e. add functionalities. I am confused as to how i can start writing the program. I have gone through the article by Tapan Dantre and got some idea. Can anybody help me out?
|
|
|
|
|
You can use SerialPort class in net framework for communicating with devices that are connected to serial port.
|
|
|
|
|
Thanks for your quick reply.
I do have a general idea of how to use SerialPort component for communicating with the deveices that are connected to serial port, but my problem is how to initiate the hardware to perform some function and then read the output from the hardware (loop tester).
I have few lines of code written in VB6, which talk to the hardware with which fire detectors are connected in loop. This piece of code initiates the hardware to detect the numbers of devices in loop and then gives them all address (in hexadecimal).
If you have some time from your busy schedule and are willing to view the code, I am ready to send you the code and output screen shots so that you have an idea of what i want to write exactly in C#. Let me know if you are interested and forward me your email address so that i can mail you the code .
Thanks
|
|
|
|
|
I'm not sure what else to say, as RS232 is just a physical communication protocol, which is layer one of the OSI model. The format of the data sent and received is per device, as well as it would be you who needs to implement layer two though seven.
To help with layer two through four use a state machine in your back end wrapped around the .NET serial port class. It is good to be safe because serial communication can be prone to transmission errors that can soft lock your application.
|
|
|
|
|
Thanks for your quick reply.
I do have a general idea of how to use SerialPort component for communicating with the deveices that are connected to serial port, but my problem is how to initiate the hardware to perform some function and then read the output from the hardware (loop tester).
I have few lines of code written in VB6, which talk to the hardware with which fire detectors are connected in loop. This piece of code initiates the hardware to detect the numbers of devices in loop and then gives them all address (in hexadecimal).
If you have some time from your busy schedule and are willing to view the code, I am ready to send you the code and output screen shots so that you have an idea of what i want to write exactly in C#. Let me know if you are interested and forward me your email address so that i can mail you the code .
Thanks
|
|
|
|
|
Using the WMI code creator, which namespace, class and property do I select to get the printer connections in the system?
Thanks
|
|
|
|
|
"google" (that's what I would have to do to answer your question, and there's no sense in both of us doing it).
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
The reason for my question is that the printers I added to a remote machine using code, are added to the following registry settings in that remote machine.
The registry setting is:
HKEY_CURRENT_USER\PRINTERS\Connections\
I have searched google for WMI to return the data in the above registry path but have not found anything.
Any suggestions please?
Thanks
|
|
|
|
|
I have one textbox when user come to textbox, means Textbox_Enter then The Control Transfer (Focus) to Combobox and User Select Value From Combo and The value is Replaced in Textbox.
I am not Getting Focus to Combo.
Best Regards,
Chetan Patel
|
|
|
|
|
Both of these work for me.
private void textBox1_Enter(object sender, EventArgs e)
{
comboBox1.Focus();
}
textBox1.GotFocus += new EventHandler(textBox1_GotFocus);
void textBox1_GotFocus(object sender, EventArgs e)
{
comboBox1.Focus();
}
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
i have problem in crystalreport.
error:Load report failed.
Vpost vpost = new Vpost();
int nopersoneli;
int.TryParse(vpost.txtNoPersoneli.Text.ToString(), out nopersoneli);
ReportDocument reportDocument = new ReportDocument();
ParameterField paramField = new ParameterField();
ParameterFields paramFields = new ParameterFields();
ParameterDiscreteValue paramDiscreteValue = new ParameterDiscreteValue();
paramField.Name = "@nopersoneli";
paramDiscreteValue.Value = nopersoneli;
paramField.CurrentValues.Add(paramDiscreteValue);
paramFields.Add(paramField);
crystalReportViewer1.ParameterFieldInfo = paramFields;
reportDocument.Load("PostCrystalReport1.rpt"); reportDocument.SetDatabaseLogon("", "", "niloofar\\i2", "vezaratekar", false);
crystalReportViewer1.ReportSource = reportDocument;
|
|
|
|
|
Hello,
You might have tried these suggestions already but here is what I would check for the error "Load Report Failed".
1. If you are loading the report from a file be positive the filepath is correct.
2. ASPNET account needs access to the TEMP directory on the server.
3. Make sure to set the reportviewer's reportsource in page_init.
Also, you can handle the reportviewers error event and see if a different exception is available there.
Hope this helps .
Regards,
John Adams
ComponentOne LLC
|
|
|
|
|
is it possible to separate the windows installed fonts in separate listboxes or comboz based on its language? I mean list the arabic fonts in a listbox, english fonts on another box and one box for all?
|
|
|
|
|
Hi Guys. I have a strange thing happening. I have written an App that writes the current date to an Access Db as part of a record. I am forcing the format of the date to "ddMMyyyy" which works fine on my PC but when the users saves a record to the DB it saves the Date as yyyy/MM/dd even though I am forcing tyhe format to be "ddMMyyyy".
See below.
drNewRow["DateConf"] = DateTime.Today.ToString("ddMMyyyy");
Now, if I can't get this work properly I would like to convert the date when I export the data from the DB. Can anybody tell me how I can do this? Below the Export portion but I can't see how I can convert this date to be "ddMMyyyy".
sfw.WriteLine(dr["HolderRef"].ToString().TrimStart(mychar) +
dr["DateConf"].ToString() + dr["MobileNum"].ToString().PadRight(20) +
dr["EmailAdd"].ToString().PadRight(80) + dr["Comms"].ToString() +
dr["Confirmed"].ToString() + dr["Via"].ToString() +
dr["DateConf"].ToString());
Your help would be greatly appreciated.
Cheers
Excellence is doing ordinary things extraordinarily well.
|
|
|
|
|
Databases dont store the format of a date, they just store the date. When inserting a date, you should get used to using the ISO format which will negate any confusion about dd/mm/yyyy and mm/dd/yyyy. The iso format can be obtained by using
drNewRow["DateConf"] = DateTime.Today.ToString("yyyyMMdd");
As for formatting this date when you pull it out of the database, well you already know how to do that as you've just done it above.
... dr["DateConf"].ToString("ddMMyyyy")
|
|
|
|
|
Hi J. Reason why I send the date in format "ddMMyyyy" is that the Application that I eventually export the date to expects it to be in that format. When setting the format when I pull it out I get a compiller error of "No overloaded method 'ToString' takes 1 arguments.
Any other Ideas?
Excellence is doing ordinary things extraordinarily well.
|
|
|
|
|
You've got to cast the db contents to a DateTime:
Convert.ToDateTime(dr["DateConf"]).ToString("ddMMyyyy")
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Thanks John. I tried that earlier and I think I got the cast wrong. I put the ')' after the ToString() instead of after the Column name.
Excellence is doing ordinary things extraordinarily well.
|
|
|
|
|
I don't know your code but ...
DataRows contain type information and the value from the collection in the row object is castable to it's underlying type. Basically, (string)dr["someValue"], or more importantly (DateTime)dr["someDate"].
While the code works, it masks what is being performed by performing a completely different operation.
BTW, the db date format is usually saved as a global DB setting that can be changed.
Need software developed? Offering C# development all over the United States, ERL GLOBAL, Inc is the only call you will have to make.
Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway
Most of this sig is for Google, not ego.
|
|
|
|
|
Hi
I'm a newbie c# programmer and have written a custom validator to validate 2 controls on a web form. I have other controls too on the same form which use the standard ASP.Net validation controls and they work perfectly however, although my custom validator works and writes the error messages to the web form, it also wants to fire off the addVehicleToDB method which is called by clicking the Submit button. This is ok of course if data entry is correct but it happens even when e.IsValid = false;! Obviously I am not fully understanding the order in which events happen so if someone could point me in the right direction that would be great.
Here is my custom validator function which is linked to a text box:
public void ValidateModelType(Object s, ServerValidateEventArgs e)
{
lblNoType.Text = "got here";
//if the text box is null
if (e.Value == "")
{
//check that model type has been selected from drop-down list
if (ddlModelTypes.SelectedItem == null)
{
lblNoType.Text = "not valid!";
e.IsValid = false;
}
else
{
lblNoType.Text = "all ok";
e.IsValid = true;
}
}
}
Thanks
Lorna
|
|
|
|
|
InvalidForumException was thrown by your question. Please make sure you post your question in correct forum. Your post has been terminated.
|
|
|
|
|
Hi Everyone,
I ve my c# application,
in that i want to set some settings in Registry.
To authenticate the user i want the user to enter
local system's current username and password.
How can i verify the entered username and password?
Any solution...?
Regards,
-SIFAR.
|
|
|
|