|
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.
|
|
|
|
|
Luc Pattyn wrote: you create a new random generator every time;
I totally missed that!
|
|
|
|
|
That makes total sense.
Figured it was something simple.
Thanks!!!
David Wilkes
|
|
|
|
|
Random generator = new Random();
for (int a = 0; a < 36; a++)
{
int randomValue;
randomValue = generator.Next(1, 20);
list3.Add(a, randomValue);
}
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios[ ^]
|
|
|
|
|
Hello all,
I am having 5 combo Boxes in my Form1.cs whose values are not selected.
I have set SelectedIndex = -1.
After this i am opening another form. Doing some operation and closing it.
When the Control returns to Form1.cs all the combo Boxs are having 1st value selected.
I have checked none of the events are getting fired. But by default all the combo boxes are set to SelectedIndex = 0.
Any help regarding this behaviour of ComboBox Values being selected on another form closing would be highly appreciated.
Thanks in Advance.
--Bhoomi
|
|
|
|
|
I am not sure but I think you will have to reset the SelectedIndex agin when the form becomes active. I think it has to do with how forms work ie STA threading model.
|
|
|
|
|
Hi bhoomi
I think you want to select values of combos on first form on the closing of second form....
is it???
Atul
|
|
|
|
|
What is the behaviour of STA Threading Model. Does it fill up 1st values of the attached Datasource on Activate?
Then it is a dangerours thing.
If any user has set out ComboBox to be blank and opens another form then those Blanks goes away. How is the user supposed to know which all values might have changed.
Is there any solution for this??
Any help would be highly appreciated.
Regards,
Bhoomi.
|
|
|
|
|
Hi Bhoomi
I think u want to change the index of combos of first form on closing of second form. If this is question then events and delegates are used int this scenario....
Atul Kumar
|
|
|
|