What Corinna said would only apply to the background for items, obviously. If you want to color the entire column for a ListView, I suggest you take a look at the article here on CodeProject: C# List View v1.3[^]. It requires that you P/Invoke certain native APIs (like SendMessage) and handle windows notification messages, since the ListView merely encapsulates the List-View common control (most controls in Windows Forms encapsulates Windows common controls, actually).
Often, having created some project (commercial software, shareware) developers have troubles with creation of protection of their products from hackers. So they create some protection themselves or look for ready-made tools for this purpose.
If you need to protect your software from crackers click here http://www.softcomplete.com to find more info
No, you can't hide the task bar. Start/Run "gpedit.msc" to open up the policy editor, then select User Configuration/Administrative Templates to see everything you can do to the Desktop/Start Menu/Task Bar/System/...
The settings for the video card shouldn't be messed with by your application. Changing these will affect all the users of a machine, not just one.
You would have to change these settings in the Registry first, then retart the machine for them to take effect. See HKLM\SYSTEM\CurrentControlSet\Hardware Profiles\Current for the settings.
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
Actually, you can using by P/Invoking the SHAppBarMessage function and sending ABM_SETSTATE. You can turn on it's auto-hide feature, which Internet Explorer does when you switch to full-screen mode (which I love for certain purposes).
I agree about the DPI, though. Changing the resolution (when necessary, like for a full-screen game or kiosk) is one thing, but the DPI is another.
There are already methods to do this for you, including ToShortDateString and ToLongTimeString, which are functionally equivalent to ToString("d", null) and ToString("T", null), respectively.
If you look at DateTime.ToString, it shows you the format codes that are possible with the DateTime. For instance, using the format specifiers "d" and "T" will get you the date part in the dd/mm/yyyy format, and the time part in (hh:mm:ss) format, respectively. You should use these format specifiers instead of custom formatting when possible (and it is in your case) because diffirent cultures may format date and time parts differently, and using the pre-defined formats will take that into account when formatting.
Yes you can, but as Serge mentioned, there are MulticastDelegates, which are used for events handlers. This allows you to combine delegates via Delegate.Combine. In .NET, actually, all delegates are treated as MulticastDelegates. I remember reading an article about its inclusion a few years ago.
If you want to just use a simple array, though, it's as simple as any other type:
delegate dels = new delegate;
dels = new EventHandler(btn_Click);
dels = new CancelEventHandler(form_Closing);
Using Delegate.Combine is much better, though, especially since it allows you to invoke the entire list of delegates unlike this array for which you'd have to iterate and invoke each delegate yourself.
I have problem in my application.
When ever I declare
I am getting an error message like Net class not found or it is not name space or class
I am also getting similar error for the Windows.Forms
Please let me how to solve this problem.
Thanks in Advance.
Sounds like you forgot to add references to the corresponding class libraries.
Go to the solution explorer, right-click on References, select "Add reference" and under the tab-page ".NET" double-click on the desired class libraries.
I want to add a background image to treeView. I tried to override the background image or to use transparent color(the treeView is on a panel, so I put the image on the panel) but for that, I needed to set the ControlStyle to ControlStyle.UserPaint.
When I do that, I can see the background inage, but I can't see all the nodes in the tree..
Can anyone help?
The reason the property was hidden is because it is not supported. The TreeView class, you see, encapsulates the Tree-View common contorl. Most of the controls in Windows Forms encapsulate Windows common controls. They handle messages and send messages as you would in VC++, MFC, etc.
The Tree-View common control does not support background images. If you want such support, you should take a look at a much better tree anyway, like UltraWinTree from Infragistics[^]. It supports drag and drop, multi-select, background images, multiple tree node images, Visual Styles, and has a great UI toolkit. It's a royalty-free control that is pretty cheap. You'll spend a hell of a lot more money in man-hours trying to reproduce even just a couple features that you're given in UltraWinTree.