|
Hey, .NET source code!
Where can I get it?
Thanks,
Alvaro
When birds fly in the right formation, they need only exert half the effort. Even in nature, teamwork results in collective laziness. -- despair.com
|
|
|
|
|
Alvaro Mendez wrote:
Where can I get it?
Check out :Anakrino[^], or you could always try to read ILDasm.exe output.
-Nick Parker
|
|
|
|
|
A waiter asks a patron, “May I take your order, sir?”
“Yes,” the man replies. “I’m just wondering, how exactly do you prepare your chickens?”
“Nothing special, sir. We just tell them straight out that they’re going to die.”
now for the serious stuff
Is it possible and where Do I look to be able to modify the .exe file as the program is running. Such as is it possible to add the date the program was first run, and then later to be able to check that date? or maybe keep a table of High Scores? Can you tell me where to go to find information on this sort of thing
Thanks for any info you can send my way.
Matthew
"When I was young we had a quicksand box - I was an only child, eventually" - Steven Wright
|
|
|
|
|
I don't think you can modify the executable.
You can, however, put all the data you want to store and recover into an object, and use serialization to save and load it.
|
|
|
|
|
I was wondering what is the best way to deal with database connections in c# windows application.
Is it good practice or not to pass a connection string through the application and open a connection object when you need to query the database or is it better to keep a database connection open throughout the application.
It is my understanding that it is better to open a connection when you need it.
Is there any security risks in accessing a connection string through a static property in my application or is there a better way of accessing the connection string throughout the application?
I would be interested to hear any-bodies suggestions.
Thanks
|
|
|
|
|
We use a configuration file for the connection information. The strings are encrypted for security. if there is a change, we can adjust the connection strings without compiling and deploying.
ed
Regulation is the substitution of error for chance.
|
|
|
|
|
The application uses the username and password that the user provides, not a default system account. Therefore it picks up the database security/permissions to tables/views etc.
Any thoughts about securing the connection string in this sort system.
Thanks
|
|
|
|
|
Build your connection string externally and use tokens for the username and password that can be replaced through code before they are used. I like to use [%USERNAME%] and [%PASSWORD%] as my tokens.
Paul Watson wrote:
"At the end of the day it is what you produce that counts, not how many doctorates you have on the wall."
George Carlin wrote:
"Don't sweat the petty things, and don't pet the sweaty things."
Jörgen Sigvardsson wrote:
If the physicists find a universal theory describing the laws of universe, I'm sure the a**hole constant will be an integral part of that theory.
|
|
|
|
|
At the moment I have a private member variable with I store the connection string in. I make this variable accessible through a public static property.
What are the benefits of using the token methods?
Is the static property a good or bad way to store the connection string.
Getting back to the orignal post what do people think good practice is for handling database connections?
|
|
|
|
|
Are there any converters for C++ to C#?
I googled but didn't come across any.
Anybody know one?
Don't and drive.
|
|
|
|
|
- code converter ? the whole point of the CLR (Common Language run-time) is to make assemblies interoperable. Build one with MC++, another using C# and also using the first assembly. IJW!
- automatic method call converter (better known as P/Invoke) ? Not yet. Here is an interesting site[^].
|
|
|
|
|
.S.Rod. wrote:
code converter ?
Yes. Actually I need to convert the existing VC++ project to C#.NET
As I am newbie to C#, it's giving me lot of headaches.
.S.Rod. wrote:
Build one with MC++, another using C# and also using the first assembly. IJW!
Any samples?
Don't and drive.
|
|
|
|
|
Kant wrote:
Yes. Actually I need to convert the existing VC++ project to C#.NET
As I am newbie to C#, it's giving me lot of headaches.
It's good to learn, but unless it's real work, you might uselessly have to cope with structures that in C++ world are tightly coupled with memory and buffers, while .NET and C# in particular provides less access to it. (in practice, you can do anything you want, just like with C++, but you need to go pretty much hardcore and doing so there is no point in doing C# at all).
In case you want to go on with brutal code conversion, don't hesitate to have a look in MSDN first. There are a few interesting type mapping tables to learn.
Kant wrote:
Any samples?
There are simple steps.
- start VS.NET, create a MC++ user library project. Add your code. Get the assembly compiled. Let's call it Assembly1.
- create a C# project, for instance using the Windows Application template. Add a reference to Assembly1, and add using Assembly1; in your code. Doing so, automagically intellisense brings you all types from the Assembly1 metadata. Add code, compile, run. You've got your first language interoped sample!
A sample of MC++ mix mode ? Nish has one[^] for you.
|
|
|
|
|
Thanks S. Rod.
Are you by any chance MCP.net?
If not, by your replies in this board you deserve to be
Code Project MVP.net...
Don't and drive.
|
|
|
|
|
Yep, S.Rod. is definetely the man.
Regards,
Alvaro
When birds fly in the right formation, they need only exert half the effort. Even in nature, teamwork results in collective laziness. -- despair.com
|
|
|
|
|
Eh eh, the only label I would accept is Bill Sergio's son. Just kidding, bwahahahahahahaha!!!!
Seriously though there are so many MCPs or whatever so-called experienced guy around, that there is no point any longer in being one. Often they are experienced, but I wonder whzt it brings them in the end. It is my experience that diplomas or labels are one thing, and the ability to communicate is another. What brings value is, and this is not going to change anytime soon, is a good asset of relations and friends in other companies.
|
|
|
|
|
I've installed VS .NET on my machine. As I started up .NET, the Startpage only shows "My Profile" on the left menu. I was used that the last opened projects were listed on the right.
The settings for the startpage are correct. Setting "Reset Window Layout" does nothing change.
Does anybody know how to solve this problem or to reforce VS .NET to show the correct entry-page?
Thanks!
Stefan
|
|
|
|
|
um, under tools and options, and in th Enfironment under General, there is a drop down with a heading of "At startup:" and you can specify the last loaded solution.
I hope this is what you need.
"When I was young we had a quicksand box - I was an only child, eventually" - Steven Wright
|
|
|
|
|
When I try to access Excel 2000 cell values from my applicaton I allways get the same result - "System._ComObject". What is it??? How can I get the cell value itself?
What I do is
ExcellWorkbook.Names.item(22,0,null).RefersToRange.Cells[1,1].ToString()!!!!
|
|
|
|
|
.Value ?
"When the only tool you have is a hammer, a sore thumb you will have."
|
|
|
|
|
I think it's actually .Value2...
|
|
|
|
|
ah, silly me
"When the only tool you have is a hammer, a sore thumb you will have."
|
|
|
|
|
What were you thinking? Who could possibly expect that the value would be stored in "Value"?
|
|
|
|
|
I guess thats why I'm not allowed to design frameworks...
p.s. how is this going to be handled in .net? is their an artical dealing with how the framework will handle this?
"When the only tool you have is a hammer, a sore thumb you will have."
|
|
|
|
|
Hey guys,
I'm trying to develop a C# User Control that allows me to send key events. I can use SendKeys.Send() no problem, but it focuses the button so that the button recieves the keydown/keyup/keypress events. I've tried to make my own button and override WndProc(). I'm blocking WM_FOCUS = 7, but no luck. Does anyone have an idea?
Thanks,
Steven
|
|
|
|