@bobnoordam

Category: C#

Making a form transparant

This code sample displays a method to seemingly draw anywhere freely on the screen. The key to this technique is the TransparanceKey offered by the .net framework, which makes this a fairly straightforward task. To make the background of a form transparant, the *only* thing we need to do is this; oDrawform.AllowTransparency = True oDrawform.TransparencyKey […]

Hiding a control’s commandfield button at runtime

Hiding a command button at runtime can be archieved by casting the commandfield in the DataBound event, and accessing the buttons from there. The sample below shows the hiding of a button based on a security role. protected void DetailsViewDocuments_DataBound(object sender, EventArgs e) { // Check role string currentuser = Common.GetRequestUser(); // some user retrieval […]

Collecting performance data from local and remote systems using C#

Performance data Perfmon is a well known tool to monitor performance data for your local and remote systems. This code snippet gives you a worker class that can be used to connect to local or remote perfmon / system performance data, and provide the resulting information stream to your c# application. Local and remote To […]

Enumerating available performance counters on local and remote systems using C#

Performance counters Perfmon, the well known tool for monitoring performance counters has a nice list of categories and counters for your system. But what if you want to access a counter from code ? Or even worse, want to check if a certain counter is available or not ? In the previous document Collecting performance […]

Next Page » « Previous Page