Full hangman game in VB6


Written By TheVBProgramer.




Write a VB program that implements the classic game of Hangman.




  • Start the program off with a "splash screen" that displays some sort of graphic; experiment with different fonts and colors to make your form visually attractive. The splash screen should display for a few seconds before showing the main form, which is the Hangman game board.


·         The program will require three data files:


(1) The main file, called HMPuzz.dat, which contains the puzzles that the user must solve. This is a comma-delimited file containing two fields:

(a) The puzzle, which is a string containing up to 20 characters. The puzzles will contain only letters and blank spaces (no special characters such as hyphens, commas, or quotes).

(b) A "clue code", which is an integer between 1 and 5 representing a clue that can be displayed to the user on the gameboard.


A sample set of records is shown below:









(2) A "lookup table", called HMClues.dat, which contains two fields: (a) the "clue code" (an integer between 1 and 5) and (b) the clue description. This file contains the following data:







(3) A file called LastPuzz.dat, which simply contains one record with one field: a number indicating the last puzzle that was played, which will serve as a starting point for a new run of the program. This enables you to vary which puzzles are used from session to session.


At program startup, load the data from the first two files into arrays and store the "last puzzle" number into a variable. When the program first begins, and whenever the user clicks the "New Game" button, increment the "last puzzle" value and select the puzzle from the array of puzzles loaded from the first file using the "last puzzle" value as an index into the array.


·         Visually present the "covered up" puzzle to the user, along with the hangman's gallows (which can be simply drawn with line controls), and a pool of the 26 letters of the alphabet (these can be labels or command buttons). Also display a clue description associated with the puzzle.


·         When the user clicks a letter, if any occurrences of that letter are present in the puzzle, reveal them all to the user; if that letter is not present in the puzzle, then draw another body part on the "hanged man". In any event, disable the chosen letter.


·         The hanged man has six body parts: a head, a torso, two arms and two legs. All parts can be created with the line control, except the head, which can be created with the circle option of the shape control. If the hanged man is drawn before all the letters of the puzzle are revealed, the player loses; if the all the letters of the puzzle are revealed before the hanged man is drawn, the player wins.


·         Provide a "solve the puzzle" option, which enables the player to guess the answer early in the game. If the player guesses correct, the player wins; otherwise, the player loses.


·         The program should provide options to play a new game and to quit.


  • The program should keep track of the number of games played and the number of games won, and display these counts on the form.


  • Upon exiting the program, update the LastPuzz.dat file with the current value of the "last puzzle" variable.


Following are some screen shots of my version of this program, to give you some ideas. Feel free to vary the design any way you want, as long as the project requirements are met.


Splash Screen




When game first begins




While game is in progress




When player wins



When player loses





The "Solve Puzzle" Option …



Note: If you implement the "Solve Puzzle" option with an InputBox as I did, make sure you parse the user's response so that an entry that contains lowercase letters and/or extra spaces will not count against the user when you compare the user's response to the answer.


Download the solution for this project here.


If you enjoyed this post, subscribe for updates (it's free)


can you please send me the code. i need it. PLEASE


help me with code at 'mayushah11@gmail.com'



can VB6 support 3D application..?

i have build a 3D building using google sketch up 8,
and i want to have an interface for it..



can VB6 support 3D application..?

i have build a 3D building using google sketch up 8,
and i want to have an interface for it..

..hi can you pls!! to me the

..hi can you pls!! to me the codes of pick a letter games..thanks!..

pls help

Pls could u kindly send me the codes for this program at lizbol4ink@googlemail.com Thanks :)


How about you just click the link at the bottom of the article that says "Download the solution for this project here?"



can u send me a code of this

can u send me a code of this ,.....coz we need a game in vb to accomplish, and i think this game is d best...please,,,, thanks in advance,,, at ianexflorab@yahoo.com

E-mail files from server VB

Please help in making VB.

Objective: e-mail files as attachement

need a code for hangman

please send me the code of hangman. romeotude@yahoo.com
thank you....

hi!!can i know the code of

hi!!can i know the code of that game plsss.. tnx!!
your a good computer wizard.........

Project Help

could you please send me the code for this project please? andyanderson1892@yahoo.com thanks much!

code missing?it aint!

at the bottom part before the comments, you can see the download lin k. try it =D

these people mustn't be too

these people mustn't be too bright...I found the "download here" portion before I even hit the Comments >.> Buuuttt...I'm not too bright when It comes to turning this into some sort of an exe file...Any help?


Can I get the code for this?

help me

Please, can anyone out there help me with the code for a banking system project. i'm deeply in need of that. i wud realy appreciate. use the e mail above. cell: +260978418959

Can you send me the code please

Hi there

Can you sent me this Code please.
I searched a lot of codes bot no one works



Please can you email the code to me, i'm not brilliant at coding, I can't drop the subject and don't want to fail. Thanks.


I see this and I really need this code for school purpose. Can you please send this for me on my mail? lisettemolenaar@msn.com
thank you in advance

awesome game

Can you please send me the code of this game.. kindly send it to danceprincess0356@yahoo.com. . Please & thank you n_n

hi.. can you please please

hi.. can you please please send me the codes.. i need it really bad for my baby thesis.. can you pls pls pls send it to me.. thanks in advance.. hope you'll help me.. GODBLESS.. here's my e-add angelhikaru27@yahoo.com... ^_^


can you send me the code of this game. allan3_ayroso@yahoo.com.


please send me code for operation on set using vb 6.0..
email: charyabig@yahoo.com


wow please send me the code ! i need this! baye21@yahoo.com


please give me the code of hangman. i really need the code. i do and try it for many hours and i CAN'T !
so please anyone help me and send the code to my email : easterdea@live.com

plzzzz i need the code could

plzzzz i need the code could any one send it to me



Can u pls send me the source code at abhibsk@yahoo.co.in?


Plz send the code of this game..

I hv to know hw it is done..
my id is cutebear33@hotmail.com

Hangman Code

I would like to see the code the this program. My email address is peterobe25@gmail.com

cAn yOu heLp me??..

what the code of hang man..
can u give the code of hang..

this my email add..


i need the source code

i need code

plllsss. give me the code o hung man.. i have a projectt.. can u kindly send it to me? enchang_88@yahoo.com

Unbelievable lazy commentards

If you can't find the code, you should give up programming now.

You won't enjoy it.

i need code....

i need code....


Wat the beggers? the code writer of this hangman is a great fraud...

Need code to do hangman game

I need help. I have gone back to school and making a hangman game is one of my assignments and I am really struggling. Can someone send me the code to do this. I need help.

Nice a game....

Nice a game....


i need the code please sent me a copy of it...for studies purposes....

can you send me the code please?

I'm a computer science student and I'm learning game programming, can you please send me the code and the project please?

can you send me the code for

can you send me the code for this game. Thank you very much!!

please help

Can anybody help me with Hangman game full code.
My email: serbangeorge@yahoo.com

Hey. Can you please send me

Can you please send me the VB6 code for this game ?
I need it soon.
Thanks a lot.



hangman code

plz send me the complete code of hangman project in visual basic 6.


AS SOON AS AUGUST 2009 MY EMAIL IS swastikaconan@yahoo.com


hello, i appreciate the article very much.
do u think u can send me the code please?

many thanks in advance! =)

you can't have it

you can't have it

Help? Please

Hey look i cant get this part of the code working:

intFileNbr = FreeFile
Open (App.Path & "\HMPuzz.dat") For Input As #intFileNbr
Do Until EOF(intFileNbr)
mintNbrOfPuzzles = mintNbrOfPuzzles + 1
ReDim Preserve maudtPuzzleRec(1 To mintNbrOfPuzzles)
With maudtPuzzleRec(mintNbrOfPuzzles)
Input #intFileNbr, .Puzzle, .Clue
End With
Close #intFileNbr
Can you help me? it gets an error saying file not found where do i put it?


i am new to this and am in my last year of college and i really need help to create this game all i really need help doing is the code please help


i try to make a hangman and i do it... im juz continuing my project because im needed to add more question for so hard to post the code here because it has a many code... if you trying this game to build and if you have a question email me at astro_psyco4@yahoo.com tnx...


Could Someone send me the code to this


i want to get this working. so please help me with the code pleeeaase!!

please ...

hi .. can u please send the code for hangman? i am beggin u. i am the group leader, an innocent group leader. don't know some parts of VB. and please. my groupmates are all looking forward for me to have our final input. but the truth is i still dont have anything. i am dying to have this code.. so pleasee. I AM BEGGING YOU. T.T I REALLY NEED THIS CODE, ASAP ..

I offer help

I can help...
ofcourse i need to be paid...
no worries it wouldnt cost much...
contact me via my email jcwebhole@yahoo.com


I think its funny that you all seem to have school projects and that you are all to lazy to do it yourself. Im a senior in high school and ive been given projects to complete that are way harder than this and i never went around begging people to just send me the code. I do what I must and that is why as soon as I graduate i will be able to get a good job and know what im doing because i didn't have to beg sombody else to help with something that I should have done myself


Ei, everybody needs help.. even you need help from others sometimes-,-

visual basics 6

you inspire me, i like visual basic and i try to do all the stuff by myself. thanks for your good advice i will surely get a good paying job, definately better than yours!

i understand your point but still...

im in the same boat as you, but for some of us, that are going ABOVE AND BEYOND the reqired level of advancedment in the program, we still need help in some aspects of the code, like for me, im stuck at this point as im using vb6, not vb.net, just vb, and im clueless as to how to integrate the letters and the var for the actual word into the program, as they are very complex, but these noobs are just being lazy, so you have a point as well...lol...

Can u please send me.

PLEASE send me the complete codes in my email
i need it badly please send it ASAP


can you email me the complete code of this? i really need it

plz email me the full code

plz email me the full code for this asap at randall6611@hotmail.com

I need your help

Could you please email me the full code for this game?
I request you to please send me the code for this game asap...
THIS IS MY E-mail add

pls helllppp

we have a proj.and we have to make a game.i'm not good at coding.so can anyone help me? PLEASE. the game is like hangman.but the character is a flower,when you press the wrong letter 1 petal will disappear.when you finish 1 level, the flower will grow. so can anyone HEELLLPP??

thanksss.if u can help me,pls post ur e-mail.


dasgood day can u please help me to my thesis
my my thesis is to create a payroll system but my problem is what code can i put in vb if biometric fingerprint i use to montor the employee in and out what code i put thanks >>..have a nice day.

Accusoft (Pegasus)

try www.accusoft.com to scan the finger print

hye...can anybody help me??

i'm new in using VB6.... i have to make a project from VB6.the project is about calculating area....but i know nothing about how to do that...can anyone help me???

re VB area

I have completed a full "calculations and Conversions" program written completelly in VB6. Part of the program calculates and converts area


i'm a new practitioner of VB6. can anybody help me on how to make this game, HANGMAN????? thank you!

what area do you find difficult

pls send me the exact details you need to know, am only 12 and am a proffesional programmer. i will surely help you, hang man is very simple. do not forget to email me. hope you are pretty.

hi,im willing to help u..my

hi,im willing to help u..my email is dieoom01@gmail.com
i must warn u im only 16 but im an expert in vb

Help Please.

Could you please email me the full code for this game? I have tried download here thing but it doesn't show me any codes .. the files are not opening.
I request you to please send me the code for this game asap...
email it to:

project on institute

willlwill u please help me in making my project...that will be a full erp project of any institute

thank you

thank you

accounting software!!

hello..hope you can help me with my project to make an application of VB6 in accounting program..thanx so much!!

Accounting Software

You can contact me for accounting software source code

Billing project In VB

Thanks For Help

i want to create a Billing software in vb
so plz help me how can i add combo list of product in bill format
Thanks with regard
Ankit Kumar


pls email the code this program at limpsnipper_angel16@yahoo.com.thanks...


,,hi can you send me the code of this game,,im begging you to send to me the code,,, thank you very much if you granted my wish..


can u pls e-mail me the code for this one????? pls... I'm begging u.... i just want to know it and understand the coding of it.... plsssss.... "devil_triperz@yahoo.com" for ur reply....

You can download the source

You can download the source code above. Where it says HERE.


it needs to bee debuged