|
Is there some tutorial on how to do that? I can't really hit the right keyword on Google...
|
|
|
|
|
It's super easy. Create controls instead of forms, make them the same size, ise the visible property to make sure one is always visible and they are never both visible at once.
But, I think for what you want to do, I'd google C# Wizard.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
|
Hi,
I am using DataGridView in C# for windows application. I want to align the column header as ceneter. But I am not able to find any of the property to align the header text of column. It automatically aligned left. You have any solution for this.
Regards
A AntonySP
Good Is Not Good When Better Is Expected.
|
|
|
|
|
If their is not a property already for the control then you will have to resort to either WinAPI, or text padding (adding extra spaces to manually center it).
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 everyone,
Suppose we have a class which is derived from ServiceBase, which provides Windows Service. My question is, what is the best practices that what kind of code to put into constructor of the class, and what kind of code to put into OnStart method of the class?
thanks in advance,
George
|
|
|
|
|
|
Cool, Thanks Mark!
regards,
George
|
|
|
|
|
Hi,
Is there a good and free .Net profiler?
Thanks
|
|
|
|
|
Hi
When you want a full fledge profiler with some extra features the I would suggest you try ANTS Profiler. However, you may try any of the following available tools:
1- NCover
2- NDepend
3- ANTS Profiler
4- .NET Memory Profiler
5- AQtime .NET Edition 2 - Automated Profiling and Debugging
6- Compuware DevPartner Studio Professional Edition
7- Compuware DevPartner Profiler
8- Allocation Profiler
9- CoverageEye.NET
10- NProf
Hope this helps .
Regards,
John Adams
ComponentOne LLC
|
|
|
|
|
|
|
Hello everyone,
For the following code, it is correct to say that,
1. obj1 will be instialized when .NET Runtime loads class Foo and before any instance is created?
2. obj2 will be created each time we create an instance of Foo, and obj2 will be called before constructor?
My question is whether my understanding (1) and (2) are correct?
class Foo
{
static private object obj1 = new object();
private object obj2 = new object();
public Foo()
{
}
}
thanks in advance,
George
|
|
|
|
|
Yeah, I believe so. You can write your own classes in place of the objects, and check it for yourself.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Cool, Christian!
Question answered.
regards,
George
|
|
|
|
|
George_George wrote: 1. obj1 will be instialized when .NET Runtime loads class Foo and before any instance is created?
No. The obj1 member will be initialised before any member of the Foo class is used, but not necessarily when the assembly is loaded.
George_George wrote: 2. obj2 will be created each time we create an instance of Foo, and obj2 will be called before constructor?
Yes.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Thanks Guffa,
Question answered.
regards,
George
|
|
|
|
|
hey guys
i need to hide or disable one of the pages in my tab control, but i cant find visible or enabled properties?
how else can i do it?
thanx
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
think BIG and kick ASS
you.suck = (you.passion != Programming)
|
|
|
|
|
From MSDN:
Additionally, the Hide method of the TabPage will not hide the tab. To hide the tab, you must remove the TabPage control from the TabControl..::.TabPages collection.
He who makes a beast out of himself gets rid of the pain of being a man
|
|
|
|
|
thanx... but how will i put it back if its removed from the tabcontrol?
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
think BIG and kick ASS
you.suck = (you.passion != Programming)
|
|
|
|
|
My thoughts too, could you perhaps store the removed object locally somehow?
He who makes a beast out of himself gets rid of the pain of being a man
|
|
|
|
|
i think i could... everything being objects and all that.
thanx man, ill see how it works
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
think BIG and kick ASS
you.suck = (you.passion != Programming)
|
|
|
|
|
Hello everyone,
For Windows Service, for example class Service1 is the main class of my service application, which derives from ServiceBase. I am wondering whether it is possible that two concurrent access to the following 3 cases?
1. the constructor of Service1;
2. OnStart method of Service1;
3. OnStop method of Service.
If yes, I need some synchronizaton control in them. If yes, in what situation the three methods will be called concurrently? We are able to start/stop the same service with different instances (processes) at the same time?
thanks in advance,
George
|
|
|
|
|
I'm not really an expert here, but I think that since Windows Services are all handled in a unique central place, there is no need to worry about the constructor/OnStart/OnStop methods. However, you have to worry about access to other resources your service might use during normal operations.
|
|
|
|
|
Thanks Dario,
Is it possible that two different instances (processes) for the same Windows service will be started and run at the same time?
regards,
George
|
|
|
|