Create WhatsApp Messenger In Windows Form Application

OIntroduction

In this article I will show you how to make a WhatsApp messenger in Windows form application. This article is very useful for beginners and seniors as well.

Step 1: Create a new project and select the Windows Form application then press OK button.

Create a new project

Step 2: Firstly, we complete our design phase then move to coding phase. So in this phase we start our designing by dragging and drop two buttons, six textboxes and six labels which you are shown in the image. Make FormBorderStyle=FixedDialog

start our designing

Step 3: You need to WhatsApp Official Api which is available o the internet; if you can’t find it or face any problem I am providing you a source code with WhatsApp Api you can use it. Now left click on reference and press add button; now press the browse button and give the WhatsApp Api location then press OK button. Now the WhatsApp Api is included in your project which appears in the left side; in your solution add WhatsApp Api.

WhatsApp Official Api

Step 4: After pressing the  Ok button then click on Form1 and go to its design and add two assemblies.

namespace

Now we start the code. First we make WhatsApp instance then we make a WhatsApp user instance, after this we make one delegate and method.

WhatsApp instance

Step 5: Then we start coding on Send Button event. I gave the name of my textbox as btnSend_Click. So don’t get confused. You give your name on textboxes.

Send Button event

Step 6: The next step is coding on login button. So now I start the code and put this code on login button.

coding on login button

Step 7: Now I will provide you software in which you give your number with your country code; in a second now put your phone number on phone number textbox and click on request code; then you receive the message with the code. On the mobile which you are receiving the code paste this code on the code textbox and press the button; now the password appears.  Now this password, along with your name and  number, paste  on WhatsApp app messenger which we make.

number and password

Step 8: Now give information in three fields and then press the button login. After login success you give the number and name of your friend and start chatting.

 
 
Read more articles on Windows Form:

Up Next
    Ebook Download
    View all
    Learn
    View all