|
in hyperterminal, it works fine, i need to set ascii characters, but it works fine in ht.
|
|
|
|
|
OK - I believe you're sending Unicode characters in this case, you'd need to build a byte [] or something to send ASCII ( or there are conversion classes in there somewhere )
Christian Graus - Microsoft MVP - C++
"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 )
|
|
|
|
|
Although MSDN states "By default, SerialPort uses ASCIIEncoding ..."
|
|
|
|
|
I am trying to setup an array of forms so that each uses the same original form yet will get different data.
I used the following command
List<form1> forms = new List<form1>();
Is this correct and if so how does this get assigned a different number to forms.
Each time I instantiate a new form it shows as "forms = 0".
How do I solve this problem.
Thanks,
Michael
|
|
|
|
|
MAW30 wrote: Each time I instantiate a new form it shows as "forms = 0".
Sounds to me like you expected creating forms to magically add them to this list. forms.Add(new Form1()) is how to add a form to the list, and create it.
I don't like your idea, you'd do better to have an array of data sources.
Christian Graus - Microsoft MVP - C++
"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 )
|
|
|
|
|
is there a way in c# to communicate to the serial port over tcp/ip?
|
|
|
|
|
Hi,
I am in bit of a trouble. I had made a flexible and all in all well working diagnostic tool that doubled as a fast prototype of the new functionality for my ongoing project.
The project is in C++, while the diagnostic tool is in C#. Both in .NET. Originally I planned to re-write the tool under C++, however few problems came up and my timeframe became smaller and smaller. Now onto my question:
Is there a way to package my C# diagnostic tool as a .DLL, and load that library in main project that is in C++. As far as I know the language in which library is written should be irrelevant, however upon looking all over the net I didn't find a proper solution to my problem.
wbr,
Victor
|
|
|
|
|
Just create a class library project, put the code in there, build it, and then import the dll into your C++ project.
Christian Graus - Microsoft MVP - C++
"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,
Well this is the gist of what I was trying to do, however I never done things to that regard, and could not find proper guides.
I am aware of how to compile a C# project into a DLL, however there are three sepcifics I am shaky about:
1) how do I mark functions I would like to export in C#?
(something similar to C++'s AFX_MANAGE_STATE(AfxGetStaticModuleState()); i guess?)
2) can I only export functions, or can I export and entire class?
3) in C++ do I just do #include <libname> and than define a class of the same name as one exported earlier?
Once again sorry for bombarding you with questions....
wbr,
Victor
|
|
|
|
|
1 - if they are public, they are exported
2 - the classes are also exported, if they are public. Basically, in .NET, a dll is referenced and everything in there is the same as if it was written into the project directly. The only point of difference is that anything marked internal is public inside the dll, and private outside it.
3 - I don't know, doesn't C++/CLI offer a list of references in the project ? I'd expect you'd add the dll as a reference, then you'd have access to the objects, same as I do in C#.
lechium121 wrote: Once again sorry for bombarding you with questions....
Not at all, that's why I'm here.
Christian Graus - Microsoft MVP - C++
"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!
This sounds much more straightforward operation that I expected. I shall try it, and report back with result later on.
wbr,
Victor
|
|
|
|
|
Hiya,
I am looking for some example application which uses SQL Server 2005 for its database. I want to learn how can i connect database with C#.Net application.
Note:= i dont want to use ASP.Net.
I want to write a software with database(sql server 2005)
My google friend is not helping me much in this..Can any body give me any good reference or any article from where i could learn more about it...
Thanks
SS
|
|
|
|
|
There is no difference between using SQL Server 2000 or 2005 in a C# application. Certainly your research has turned up at least one reference to using databases and c#
only two letters away from being an asset
|
|
|
|
|
Software_Specialist wrote: Note:= i dont want to use ASP.Net.
By and large, how you connect in ASP.NET and in winforms is the same, they use the same classes. The database doesn't care about the UI layer.
Software_Specialist wrote: My google friend is not helping me much in this
I don't see how that is possible.
Christian Graus - Microsoft MVP - C++
"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 )
|
|
|
|
|
I want to take picture using my digital camera usig C# application, suppose when i click on a button on a window form using c#, it should caoture picture which later on i could save.Please someone has any idea plz send me with source code o f VB.NET or Visual C#.
thanks.
|
|
|
|
|
salman_syed_01 wrote: I want to take picture using my digital camera usig C# application
So your camera provides an interface for doing this? Please provide a link to the documentation.
|
|
|
|
|
If it's a Canon camera, check out my wrapper article for the Canon SDK. If it's not, you can take a picture with most cameras with WMI, but not with the sort of control that Canon offers. Other manufacturers have had SDKs in the past, but none do now, that I know of.
Christian Graus - Microsoft MVP - C++
"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 )
|
|
|
|
|
In a DataGridViewComboColumn I can set a datasource for multiple choices for entring data and the drop down choices show me the display values to select from. The problem is the DataGridView cells, once not in edit mode, show me the actual database data instead of the DisplayMember's value. Is there a simple way to make the column show display values intead of the actual data ?
|
|
|
|
|
Don't answer to such a dum question!
I wasn't paying attention and data types were not matching
Sorry for wasting time
|
|
|
|
|
I need some help. I´m looking for a table with labeled rows and clomuns (like excel).
|
|
|
|
|
hi
this is a good example
http://www.codeproject.com/cs/miscctrl/csharpgridcontrol.asp
regards
|
|
|
|
|
When I run the following code I get the same number 36 times, but when I step through it in debug I get 'random' numbers?!?!
Any idea why?
for (int a = 0; a < 36; a++)<br />
{<br />
Random generator = new Random();<br />
int randomValue;<br />
randomValue = generator.Next(1, 20);<br />
list3.Add(a, randomValue);<br />
}
David Wilkes
|
|
|
|
|
|
Sorry, "list3" is a custom data type similar to a listbox.
David Wilkes
|
|
|
|
|
Hi,
you create a new random generator every time; they each start with a dfeault
seed value, which depends on the current time. As a result, while single stepping
it seems all right; when running it finishes in less than 1 second, so all
seeds are the same.
You should create and use only one generator outside the loop and keep using it.
|
|
|
|