|
C# programming wrote: And I have VS 2003. Is that class here?
That would explain it. That method is only available in framwork 2.
---
single minded; short sighted; long gone;
|
|
|
|
|
There are several articles on this topic. Search CP !
|
|
|
|
|
Hi
I am looking for some basic tutorial to send data[SMS] to mobile via COM port. Any help will be appreciated.
Thanks
|
|
|
|
|
Hi,
Can anybody tell me that how i can communicate with the USB port ?i want to make a simple program (at that time) in the visual studio c# ,such program has ability to on/off the LED connected to the USB port. Please guide me..........
|
|
|
|
|
Ummm, I don't think "simple" describes what your trying to achieve.
You will need some kind of develepment baord which will contain some kind of usb controller. Some of these use flash firmare which you can rebuild to your own requirements (perform your functions).
The .net framework was not designed to perform low level usb communications so you'll probably end up using a third party library.
A quick search on google pulled up these links:
Basic USB - Using Microchip Stack and C#.Net - Hardware
USB and C#
The USB library for .NET
Regards
Wayne Phipps
____________
Time is the greatest teacher... unfortunately, it kills all of its students
View my Blog
|
|
|
|
|
i want to save entire data from my system to remote system. is it posible? can anybody guide me? by using remoting we can access remote system files. but i want save into the remote system. how can i?
|
|
|
|
|
Yes, it's more than possible. I don't know your specific requirements, but I can suggest some general approaches we normally use:
1) Using OS service directly, such as network drive mapping.
2) Using low-level IPC, such as socket and RPC.
3) Using high-level IPC, such as Remoting, DCOM and Web Service.
Best,
Jun
|
|
|
|
|
Hi guys,
i'am looking for a tutorial / reference
to make application SMS receiver
using .NET(C#)
i never do that before,
so i want to find a simple basic learning from site,
did anyone have a clue / recommended site?
thanks guys.
|
|
|
|
|
You have the chioce of using a GSM modem or a SMS gateway service.
A GSM modem will use an AT command set similar to a traditional modem which would allow you to 'query' the modem perhaps using a serial COM port.
A SMS gateway is likely to impliment thier own API or Web Service which you would consume in your application.
In both cases, the implimentation is likely to differ based on the service or hardware your use. You will therefor need to refer to the documentation provided by the manufacturer or service provider.
The following links may help:
SMS Gateway
GSM Modem
Introduction to SMS Messaging
Hope this helps
Regards
Wayne Phipps
____________
Time is the greatest teacher... unfortunately, it kills all of its students
View my Blog
|
|
|
|
|
Hi, i have a listview with paths to programs. I want to create a loop which opens the program, and when it closes opens the next.
<br />
foreach(ListViewItem lvi in listView1.Items)<br />
{<br />
Process.Start("\"" + lvi.SubItems[0].Text + "\"");<br />
}<br />
How do i detect then the program closes?
|
|
|
|
|
You need to get a handle to the process you start and watch if it closes. I know how to do this in C++, not sure about C#
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Could you please provide the code in C++?
Is it something like this?
[DllImport("user32.dll")]<br />
static extern uint FindWindow(string lpClassName, string lpWindowName);<br />
<br />
int handle = FindWindowEx(0, 0, "Notepad", null)
Then detect if it closed?
Not sure how to do that anyway.
|
|
|
|
|
No, you can call a variation of shellexecute that returns the handle and then you call an API that waits for that process to finish.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Process.Start returns an instance of the Process class representing the program you started. Hence this should work (at least the idea, I did not run it):
Process.Start("\"" + lvi.SubItems[0].Text + "\"").WaitForExit();
|
|
|
|
|
Figured it out using HasExited. Thanks all.
|
|
|
|
|
I'm having trouble trying to determine if some arbitrary object can convert to type decimal. The underlying TypeConverters for int and decimal seem to think that an int can't be converted to a decimal. Now we all know that Convert.ToDecimal(someInt32Value) works just fine, but consider the following piece of code:
int n = 5;<br />
TypeConverter tc = TypeDescriptor.GetConverter(n);<br />
bool canConvert = tc.CanConvertTo(typeof(decimal));<br />
Can anyone see what I'm doing wrong? Is this a framework bug, or have I missed something?
NATHAN RIDLEY
Web Application Developer
email: snowdevil [@] gmail.com
!! Are you a skilled ASP.Net programmer or web designer and would like to help bring the best new ASP.Net CMS ( http://www.sprocketcms.com[ ^]) into the forefront of the ASP.Net community? Please contact me and let me know.
|
|
|
|
|
use ToString and then decimal.TryParse
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Thanks Christian. Seems like a bit of a roundabout way of doing it though. I ended up opting for a small function which simply compares the type to the list of existing types and does the conversion directly if it's a numeric type.
NATHAN RIDLEY
Web Application Developer
email: snowdevil [@] gmail.com
!! Are you a skilled ASP.Net programmer or web designer and would like to help bring the best new ASP.Net CMS ( http://www.sprocketcms.com[ ^]) into the forefront of the ASP.Net community? Please contact me and let me know.
|
|
|
|
|
Hello everybody.
I have a TabControl with two TabPages each contains one DatagridView control.
I want that, when i click on a row in First Datagridview (Customers),
Second DatagridView (Shopping List) refresh to show the according to that row.
I can do this, but I want to show "Date of shopping" in second Datagridview
RowHeader's Cell, When i'm going to TabPage2 i see all rows with
empty RowHeade. But when i back to TabPage1 and change the row and back again
to TabPage2 I can see RowHeader's value now!
Why i should click on some rows of first to setting RowHeader's
Value on second? How can i solve this?
<br />
dGridViewShopping.DataSource = ds;<br />
dGridViewShopping.DataMember = ds.Tables["tblShopping"].TableName;<br />
dGridViewShopping.Columns["date"].Visible = false;<br />
<br />
foreach (DataGridViewRow dgRow in dGridViewShopping.Rows)<br />
{<br />
if (dgRow.Index != dGridViewShopping.Rows.Count - 1)<br />
{<br />
dgRow.HeaderCell.Value = dgRow.Cells["date"].Value.ToString();<br />
}<br />
}<br />
Tanx
|
|
|
|
|
I'm trying to figure out why it is, when I close one form - which is supposed to set a property in my Main form to true - the property reverts back to false. The form is a basic logon screen that is supposed to return "true" to the Main form, and the main form is supposed to display itself. However the only way to get the main form to display itself is if I code the following:
if (!AuthenticUser)
{
copyrightRichTextBox.LoadFile(@"..\..\Supporting Files\Copyright.rtf");
}
This doesn't make logical sense to me. Can someone explain what may be happening here? Thanks.
Dre---
=======================
Every experience in life is a lesson to be learned
A. Stevens
B.S., Computer Science
|
|
|
|
|
if(!false)
{
dadada dada...
}
what's so "logically incorrect"??
Smile: A curve that can set a lot of things straight!
(\ /)
(O.o)
(><)
|
|
|
|
|
DRAYKKO wrote: I'm trying to figure out why it is, when I close one form - which is supposed to set a property in my Main form to true - the property reverts back to false.
You're probably setting the property on a different instance of the form. Can you post that code ?
The code that sets the value of Authenticated user is what we really need to see here, I suspect.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
private void OK_Click(object sender, EventArgs e)
{
Main userAuthentication = new Main();
userAuthentication.AuthenticUser = CheckUser();
if (userAuthentication.AuthenticUser)
{
this.Close();
}
else
{
if (Tries < 2)
{
MessageBox.Show("That was an invalid user name or password. Try again...");
++Tries;
CheckUser();
}
else
{
userAuthentication.AuthenticUser = false;
this.Close();
}
}
}
public bool CheckUser()
{
if ((usernameTextBox.Text == "User1") && (passwordTextBox.Text == "User1"))
return true;
else if ((usernameTextBox.Text == "User2") && (passwordTextBox.Text == "User2"))
return true;
else
{
usernameTextBox.Text = "";
passwordTextBox.Text = "";
usernameTextBox.Focus();
return false;
}
}
This code, from the Logon form, is supposed to alert the Main form whether the user typed in a valid username and password. And when I "trace" it, it does set AuthenicUser to true. But it seems that when I close the logon form the property reverts back to false (and I'm not sure why).
BTW: Is there a way to send attachments here?
=======================
Every experience in life is a lesson to be learned
A. Stevens
B.S., Computer Science
|
|
|
|
|
DRAYKKO wrote: Main userAuthentication = new Main();
Like I thought. You're creating a new instance of the Main class, which has absolutely NOTHING to do with the instance in which you check this variable. You should create a variable inside this form and check it from your main instance, when you close the login dialog. Or, set up a delegate that gets called if login is successful.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Thank you Christian!
I see the problem now.
As a solution I made the property and it's subsequent variable static bool (rather than just bool), so that they were accessible from the Logon form.
Thanks for your input, and help!!
Dre---
=======================
Every experience in life is a lesson to be learned
A. Stevens
B.S., Computer Science
|
|
|
|