I was working on an application which checked for updates. I used WebRequest/WebResponse for checking updates. It showed a continuous Progressbar while checking for updates. But there was a problem. It worked properly when you were connected to internet but it just showed the progressbar all the time if not connected.
The solution for that was to check for internet connection before checking for updates. If connected then check for updates otherwise show an error.
Checking for the state of internet connection is very simple. Let’s get started.
For cropping an image in C# & VB.NET we can use the Graphics class. We’ll use a method (or function in VB.NET) which will take 2 parameters, a source image and a rectangle of the section that should be cropped. Let’s code!
There are times when you’ll need an autocomplete textbox. Autocomplete textbox makes the user’s life easier. It shows suggestions as the user types. In case of a web browser, if you type “goo” it will automatically show all the suggestions starting with or containing “goo” like “Google, Goofy” etc. It really helps both you or your users when hunting for something. Of course, it seems difficult to set up, but the reality is very different. So whether they’re typing in “find O2 UK BROADBAND” or you’re hunting for “that holiday video”, then your users are likely to find it a lot faster. Enough talk! Lets get on with it.
Fortunately, textbox has a built-in autocomplete feature! We don’t have to do any coding.
You can either set it up from the Designer (if you are using Visual Studio or #Develop) or do it via code. It is simple both ways. Lets do it! Continue reading →