|
In case you're using Visual Studio it's pretty simple. Design your form as usual with the wanted default language. If your finished, select your form and go to the properties editor. Apply true to the Localizable property and for every additional language apply the according region code to the Language property and translate all UI controls. You find more detailed information on MSDN. Just search for Globalization or Localization.
At the end some advertisment: If you're interested in allowing the user to change the language at runtime take a look at my article covering this topic here on CP: UICultureChanger component[^]
Good luck
"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." - Rick Cook www.troschuetz.de
|
|
|
|
|
hi all,
i have a few questions to ask about listview component.
i have a listview with two columns(item, price).
i want to let users change the price but not the item fields.
(but in price field, they should only type characters from 0 to 9)
secondly i dont want users to resize the listview's columnheaders.
(this is an easy thing but i couldnt find that in property window)
the first one is so important!
hope that u gonna help me...
thanks in advance,
bye.
|
|
|
|
|
Mehmet Fatih Akbulut wrote: i want to let users change the price but not the item fields.
Easiest way is to put it as the first column, the subitems can't be edited I seem to remember.
Mehmet Fatih Akbulut wrote: but in price field, they should only type characters from 0 to 9
There should be an AfterLabelEdit event, you can use this to check the characters entered.
Mehmet Fatih Akbulut wrote: secondly i dont want users to resize the listview's columnheaders
I think you can set HeaderStyle to NonClickable to accomplish this.
Formula 1 - Short for "F1 Racing" - named after the standard "help" key in Windows, it's a sport where participants desperately search through software help files trying to find actual documentation. It's tedious and somewhat cruel, most matches ending in a draw as no participant is able to find anything helpful. - Shog9
Ed
|
|
|
|
|
Hi guys,
I am getting this message when I try to run my custom tool to generate code for my crystal report. I just migrated from VS2003 to 2005. Please help, I am clueless on this.
Thanks
sasa
|
|
|
|
|
|
Is that possible in C#, to search for objects of a certain type that are currently alive (in memory).
|
|
|
|
|
kASTRATOR wrote: objects
If you mean .NET objects then...
You can use the System.Diagnostics namespace to get process information. From there you can get the paths of any executables or dlls etc, you can load these using the System.Reflection namespace and then scan through the assemblies using Reflection for the objects you want. You probably can't get a copy of the objects currently in memory as Windows and the framework will disallow this (although there might be a way).
Formula 1 - Short for "F1 Racing" - named after the standard "help" key in Windows, it's a sport where participants desperately search through software help files trying to find actual documentation. It's tedious and somewhat cruel, most matches ending in a draw as no participant is able to find anything helpful. - Shog9
Ed
|
|
|
|
|
Hi;
Thanks for your answer.
I did study this possibility but I could'nt find a way to get references to .NET Objects.
By Reflection all I can have is the structure of the loded modules but I can't actually see which calsses have been instanciated , how many times and what are the references to these instances.
I know it is possible though because CLR Profiler can generate a snapshot graph of managed memory with the reference and memory adresses of each .NET object.
|
|
|
|
|
kASTRATOR wrote: CLR Profiler
Yes but is that using Managed or Unmanaged code. If it's C++ with some C++/CLI involved then it might be able to since it can inject itself into processes.
I havn't tried any of this, just giving you my thoughts. I havn't even used the CLR Profiler.
If the profiler is managed (which I doubt) then you can take a look through it's code with Reflector.
Did you know that you can get the source code to the profiler. Just google for CRL Profiler and the first result will be for .NET 1.1. A few results later (~5) there is a blog which contains a link to one for .NET 2.0.
Maybe this will help you if you look through the source code.
|
|
|
|
|
As you advised; I just took a look to see how CLR Profiler manage scanning memory.
It seems he's using a C++ unmanaged library that goes with pointers arithmetics.
I would like to avoid going through pointers; I'd rather find a solution to do it in C#.
|
|
|
|
|
To be honest I don't think that you'll be able to avoid using pointers, the only way would be to use a wrapper around some stuff that did use pointers
Formula 1 - Short for "F1 Racing" - named after the standard "help" key in Windows, it's a sport where participants desperately search through software help files trying to find actual documentation. It's tedious and somewhat cruel, most matches ending in a draw as no participant is able to find anything helpful. - Shog9
Ed
|
|
|
|
|
I'll try to implement an algo similar to GarbageCollector one. With root references and scanning through the tree structure of each root. It won't be as generic as I wanted to. But going through pointers woul be very expensive in time for me.
|
|
|
|
|
kASTRATOR wrote: But going through pointers woul be very expensive in time for me.
That's whats most important
Formula 1 - Short for "F1 Racing" - named after the standard "help" key in Windows, it's a sport where participants desperately search through software help files trying to find actual documentation. It's tedious and somewhat cruel, most matches ending in a draw as no participant is able to find anything helpful. - Shog9
Ed
|
|
|
|
|
Hello,
I am developing a web app and trying to use Enterprise Library 2.0. I am using it for logging for now. I achived the logging on a flat file but when I tried to start doing the logging by using a DataBase Listener. I failed.
Here's how I am using it after including all possible references to my web app.
I configured a datasource with following attributes setup:
-Server (my server name)
-Database (my database in my server)
-Integrated Security (I used API.. something, false, true and I even tested after removing this tag aswell).
-user (my user name)
-pwd (my password)
Then I configured a Database Listner and gave the reference of my datasource.
Then I configured a Logging block by adding different categories and then I added reference to my Database listner in categories.
I also tested by adding and removing following in web.config within CodeDom tag:
type="Microsoft.CSharp.CSharpCodeProvider,
System, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089"
compilerOptions="/d:TRACE" />
----------------
After doing this all when I try to log an entry after specifing the category to the entry and other required attributes. NOTHING HAPPENS in tables I generated after running the script file provided by Best Patterns and Practices team. I couldnt log any data.
Is there anybody who can help me or tell me what I am doing wrong?
|
|
|
|
|
Hi every body!
I need the C# code to back up a database and to restore it including sql code(using sql server). There should be ways to select the back up location and to select the backup file to restore. I'm thankful in advance if somebody can kindly provide me this help....please.
-- modified at 9:17 Wednesday 26th July, 2006
|
|
|
|
|
There are articles all over the web on how to do this. Just fire up Google or Search through the articles on this site.
Formula 1 - Short for "F1 Racing" - named after the standard "help" key in Windows, it's a sport where participants desperately search through software help files trying to find actual documentation. It's tedious and somewhat cruel, most matches ending in a draw as no participant is able to find anything helpful. - Shog9
Ed
|
|
|
|
|
In which situation we have to use abstract class & interface?
lavate
|
|
|
|
|
lavate malllik wrote: In which situation we have to use abstract class & interface?
It depends on your requirements, some times they can be interchanged, some times they cant.
|
|
|
|
|
Probably this can help you:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vbconabstractclassesversusinterfaces.asp
http://www.codeproject.com/csharp/abstractsvsinterfaces.asp
|
|
|
|
|
1) An abstract class is like an interface with some fuctionality predefined (something an interface cannot have).
2) Multiple inheritance of classes is not possible.
3) Multiple implementation of interfaces is possible.
With these 3 bits of information you should be able to answer your own question.
|
|
|
|
|
Hi all,
I'm fresh man of OOP. so I want know When use static method and when use non static method ?
Any guidelines for use non static method or static method?
c# code sample:
class myclass
{
public myclass() {}
private int _i= 0;
public int Value
{
get { return _i;}
set {_i= value; }
}
public static int GetDoubleValue(int value)
{
return 2 * value;
}
public static int GetDoubleValue(myclass c)
{
return 2 * c.Value;
}
}
class myclass
{
public myclass() {}
private int _i= 0;
public int Value
{
get { return _i;}
set {_i= value; }
}
public int GetDoubleValue()
{
return 2 * this.Value;
}
}
|
|
|
|
|
Use static methods where you imagine the method would be called by someone who doesn't have an instance of your class. For example, a method that creates a class instance needs to be static. Often, a method is static because it's the only method a user is likely to call in a given instance, it doesn't require any state ( static objects are not tied to an instance, and so have no state beyond static variables ) and so a static method means they are not forced to create an instance just to call a method.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Hi Christian Graus,
Thanks for your reply.
I know that differents between static method and non static, just be at a loss to when use a static method or non static one.
Christian Graus wrote: static objects are not tied to an instance
This is best answer about this question. I will spend more time think about it.
do you have any guideline about it?
Thanks again.
|
|
|
|
|
Here is a great example:
http://www.pp.rhul.ac.uk/~george/PH2150/html/node48.html[^]
The way I understand it, static methods are not object-specific. A static method will always only have one instance, irrespective of what object invokes it.
(Look at the sheep example, old McDonald explains it better than I do)
you can't forget something you never knew...
|
|
|
|
|
hi evilnoodle,
Thanks for your reply.
I have read the article your gave. It's simple but helpful for me.
-- modified at 8:58 Wednesday 26th July, 2006
|
|
|
|