PDA

View Full Version : VB Lesson 1


Tyler
12-26-2002, 05:06 PM
Ok I will write out some lessons for vb I just finished one for my site but I will post it here also.

The first thing you going to want to do it open your VB of course do standard exe

and on the form add your listbox and your text and one command button

now if you need some like example i will be more then willing to through a like form togather for you will how to do

but im going to put the code on here also


when you get your text and listbox plus the command button each one show say this in them

List1
Text1
Command1

now when you comfirm that they all are on there

double click on the Command1

it will bring up another window which should have this in it
Private Sub Command1_Click()

End Sub

now inbetween the Command!_Click and the End Sub
in that space your going to want to type this

List1.Additem Text1.Text


now what that is doing is when you click on Command1 it will add text1.text to list1

now you can check to see if it work by click on the play button on the toolbar at the top it will start the program then click on Command1 then it should add Text1 to the list

now for the other way of add text to a list is using a Input box if you notice on my crackers it what i use when you click add for what it is it will bring up a box telling you to enter something

now all you do it delete the the Text1 which to do that is right click on the Text1 and go to delete

now double lcik on command1 and delete what you typed before and put this instead


On Error Resume Next
Dim MSG As String
MSG = InputBox("Enter a Text To be Added To List", "List Add")
If MSG = "" Then Exit Sub
List1.AddItem MSG

now remeber thatr go inbetween the
Private Sub Command1_Click()

End Sub


now im going to tell what some of this stuff means

MSG = InputBox("Enter a Text To be Added To List", "List Add")


MSG is the Inbox what you type in the text to be added

the enter a text to be added to list
is if you look on the inputbox you will see that on the top and the list add will also be on there now you can change what is said there but you have to make sure you keep the " there


if you have any questions or it is not working right for just post here

leblitzer
08-24-2003, 02:06 PM
sweet where is 2nd lesson :-/

leblitzer
08-24-2003, 03:29 PM
quick dude i cant wait

pugamsish
10-01-2003, 01:26 PM
Leb, the great programmer hahaha yeah right... askin for ****in VB lessons... one of the easiest languages... HAHAHAHA
I just came up on this thread and I had to point this out... Leb asks for the second lesson 9 months after Tyler posts the first one, what a ****ing tool.

doggy50000
10-04-2003, 11:19 AM
lol

doggy50000
10-04-2003, 11:19 AM
lol

doggy50000
10-04-2003, 11:19 AM
lol

John-
10-04-2003, 11:36 AM
why did you post the same message 3 times?

_I_Play_Chess
10-04-2003, 06:35 PM
doogy has nothing to say!



LOL

_I_Play_Chess
10-04-2003, 06:36 PM
Sorry I said DOOGY!


Well I should say:

*DOGGY*

doggy50000
10-05-2003, 12:59 PM
because my internet connection got stuck and it wasn't loading.... so i kept on clicking "submit reply" and it came out 3 times.

Look at the time posted above the other message: 10-04-2003 at 11:19 AM

aUsTiN
10-05-2003, 11:07 PM
LMFAO ! @ Pug, Mean But Gd So True..

pugamsish
10-06-2003, 08:46 AM
lol, yeah

air_snort
10-06-2003, 09:27 AM
i think leb was being sarcastic about the lessons.
and you all took him seriously

GOD
10-06-2003, 01:46 PM
the french dont have sarcasm

air_snort
10-06-2003, 02:00 PM
they dont have bravery.