amgadhs

Stories submitted by amgadhs

Displaying an Image Without Locking its File(codehill.com)

submitted by amgadhsamgadhs(85) 1 year, 10 months ago

The PictureBox control is one of the most used controls in Windows Forms applications. And sometimes you might want to delete the image file that is displayed on it. Doing so with an image displayed using the Image.FromFile function will result in a file locked exception. And file will stay locked until the program exits, even if you set the variable to null. read more...

add a comment |category: |Views: 3

tags: another

Displaying Dynamically Generated Images in ASP.NET(codehill.com)

submitted by amgadhsamgadhs(85) 2 years, 8 months ago

Sometimes you need to display an image that is not saved in a file. These could be dynamically generated or loaded from a file but were modified. To display them in an Image control you need to create another page that saves the image in its output stream. read more...

add a comment |category: |Views: 22

tags: another

Retrieving Icons From Executables(codehill.com)

submitted by amgadhsamgadhs(85) 2 years, 10 months ago

Get the large (32 x 32 pixels) and small (16 x 16 pixels) icons of an executable file using C#. read more...

add a comment |category: |Views: 10

tags: another

Saving User and Application Settings in WinForms(codehill.com)

submitted by amgadhsamgadhs(85) 2 years, 11 months ago

Before the .NET Framework application settings were saved in INI files and the Windows Registry. But the .NET Framework introduced a much easier way using an XML file. The file has the name of the Assembly and a .exe.config extension, and is placed inside the application’s folder. This way is cleaner because when an application is uninstalled or deleted the end user does not have to worry about left over registry keys or INI files in the Windows directory. read more...

add a comment |category: |Views: 63

tags: another

Reading Excel 2003 and 2007 Files Using OLEDB(codehill.com)

submitted by amgadhsamgadhs(85) 3 years ago

One of the feature of the application I’m working on these days is allowing the user to import data from Excel 2003 and 2007 files. After some research I found out that OLEDB is the only way to read both Excel formats without any problems. read more...

add a comment |category: |Views: 21

tags: another

Get a Movie’s Details From IMDb(codehill.com)

submitted by amgadhsamgadhs(85) 3 years ago

A while back when I was developing MoviePlay (a movies database) I wanted to allow the user to get the movie’s details from IMDb (The Internet Movie Database) instead of having him/her enter it manually. IMDb does not provide a way for developers to use their data, so I wrote the code below to screen scrape or web scrape the details from the movie’s page. It gets the title, director, genre, release year and tag line of the movie as well as the thumbnail. read more...

add a comment |category: |Views: 132

tags: another

Check If User Name Exists Using AJAX And C#(codehill.com)

submitted by amgadhsamgadhs(85) 3 years, 1 month ago

You could make sure the user name entered during the registration process of your website is unique before the submit button is clicked using AJAX and C#. read more...

add a comment |category: |Views: 129

tags: another

Using the Phidgets LCD With Outlook(codehill.com)

submitted by amgadhsamgadhs(85) 3 years, 1 month ago

When I got my Phidgets StarterKit I decided to use the LCD that came with it with the Outlook Addin I developed for my previous post Capturing Outlook 2007’s New Mail and Reminder Events. The LCD connects to the PC through USB. It has no memory, so the control program runs on the PC. The libraries needed to develop programs for the hardware can be downloaded from their website along with some sample code too. read more...

add a comment |category: |Views: 9

tags: another

Get the Available Network Connections Using WMI(codehill.com)

submitted by amgadhsamgadhs(85) 3 years, 1 month ago

Windows Management Instrumentation (WMI) makes querying Windows for system and devices information easy. And this is even easier with System.Management assembly. The code listed loads the names of the network connections in a ListBox, which when clicked displays all the available properties in a ListView. read more...

add a comment |category: |Views: 21

tags: another

Capturing Outlook 2007’s New Mail and Reminder Events(codehill.com)

submitted by amgadhsamgadhs(85) 3 years, 1 month ago

Visual Studio 2008’s Outlook Add-in projects allows you to create add-ins that can customize almost any feature of Ms Outlook. Two useful events that can be captured are ReminderFire and NewMailEx. The first occurs before a reminder of a calendar item is executed. And the second occurs when a new email is received in the Inbox. read more...

add a comment |category: |Views: 13

tags: another

A Registry Viewer in C#(codehill.com)

submitted by amgadhsamgadhs(85) 3 years, 1 month ago

The Registry is a database in Windows that is available for application developers to use for storing small amounts of data. It is mostly used to save application setting like the window size and database connection string. In this series of post I will demonstrate how to create a simple registry editor in C#. read more...

add a comment |category: |Views: 60

tags: another