Category Archives: Win 32 API

How to make a form stay always on top

Sometimes we require to make our application stay always on top of other applications. You simply achive this by setting the TopMost propetry of the Form to True. This post describes the other way using Win32 API functions. Here is … Continue reading

Posted in .Net, .Net 3.0 / 3.5, Win 32 API, Windows Forms | Tagged , , , | Leave a comment

Run the application at Windows startup

Sometimes its required to start your application while on Windows startup. This small code snippet allows you to register your application on windows startup. This code require Microsoft.Win32 namespace. To register application you need to set the key under “HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run” … Continue reading

Posted in .Net, .Net 3.0 / 3.5, Win 32 API, Windows Forms | Tagged , , , | Leave a comment

How to disable Close button of Windows Forms Application

We can disable the close button of a Windows Form in three ways Set controlbox property to false – It is most easy way to do this. But it also hides the Minimize and Maximize buttons. Using WIN32 API – … Continue reading

Posted in .Net, .Net 3.0 / 3.5, Win 32 API, Windows 7, Windows Forms | Tagged , , , | Leave a comment

Creating Wizard using Windows Forms

In my first WinForms application, I have to create various wizard screens, I couldn’t find any ready made Controls for it from Microsoft. Then one of my colleague suggested a way to tweak it, like Add a Tab Control, Set … Continue reading

Posted in .Net, .Net 3.0 / 3.5, Win 32 API, Windows Forms | Tagged , , , | 2 Comments

Convert Image to Icon using C#

Sometimes we will get nice Images from Web as Icons. But we can’t use these Images as application icons in .Net, because the .Net supports *.ico(Icon) format only. This code will convert an Image to Icon using C#. It is … Continue reading

Posted in .Net, .Net 3.0 / 3.5, ASP.Net, Visual Studio, Win 32 API, Windows Forms | Tagged , , , , , , , | 6 Comments