Using PyCharm Professional for Django

I recently started using PyCharm Professional, an IDE for Python, for my Django project and I am already in love with it. If you are working on a Django project, this is just the thing for you. PyCharm has built-in support for Django. It also supports other python web frameworks like flask, web2py, etc but I’ll only be talking about Django in this article. Continue reading “Using PyCharm Professional for Django”

Working with files in C#

In this tutorial we will be working with files. How to create a file, edit it, rename a file make a copy an existing file or move it etc.

First thing you should do is to reference the System.IO namespace.

All the classes that will help you handle files are located in this namespace.

How to create a file and edit it?

You can create a file like this:

This will create a file “test.txt” in Continue reading “Working with files in C#”

Image Viewer application using C#

A detailed tutorial about creating an Image Viewer or Picture Viewer application in C#. This application also converts images from one type to another.

Following are the features of this application:

  • Open / Save images.
  • Convert images.
  • Rotate Images.
  • All popular image formats are supported.

Let’s get started! Continue reading “Image Viewer application using C#”

C# Screen capture class

A class that will help you take screenshots quickly and easily.

ScreenCapture

Following are the features of this class:

  • Take screenshot of the whole screen
  • Take screenshot of a particular area using a Rectangle
  • Copy the screenshot to Clipboard.
  • Save the screenshot straight after it is captured.
  • All popular image formats are supported.

Continue reading “C# Screen capture class”

C# – Check if connected to internet

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.

Continue reading “C# – Check if connected to internet”

C# – Autocomplete Textbox

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 really it isn’t that hard. Enough talk! Let’s 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 “C# – Autocomplete Textbox”

C# – Check if Form is already running

To check if a form is already running you’ll have to look for it in the Application.OpenForms collection. When a form is opened it is added to that collection.

Here’s a boolean method that checks whether a form is open or not :

Example use:

Thanks.

If you have any questions, don’t hesitate to post a comment.

C# Auto click button and auto fill form

This tutorial will show you how to auto fill forms and click buttons in a website using the webBrowser control. When you learn to do this you can make your own web bots!

da-app

To show you how autoclick/autofill works we’ll make a simple Google AutoSearch Bot.

So lets begin… Continue reading “C# Auto click button and auto fill form”

Convert color to hex using C#

So you want convert a .NET color to hex or a hex color to .NET color. Well, its very easy to do this. We won’t have to write lots of code or a special class for it. Thanks to ColorTranslator class. We can convert between these with only 1 line of code. Here’s how its done:

To convert a Hex color to .NET color use this code:

For converting a .NET color to Hex color, use thise code:

That was simple & easy. If you have any questions don’t hesitate to leave a comment.

Thanks