Earn by twitter on twivert

Sign up for PayPal and start accepting credit card payments instantly.
Showing posts with label visual basic6. Show all posts
Showing posts with label visual basic6. Show all posts

Thursday, August 19, 2010

WAP to add item to list box




'controls       Property        Setting

'Textbox1        Name            Text1
'                Caption           -

'List1           Name            List1 
                
'Label1          Name            Lebel1
'                Caption          Enter Any Thing

'Label2          Name            Lebel2
'                Caption           Added

'command1        Name            command1
'                Caption         Add
          
'-----------------------------------------------------
'                        CODE

Private Sub command1_click()
If Text1.text<>"" Then
List1 AddItem(Text1.text)
msgbox("You must enter something in list")
End If
else
List1 AddItem(Text1.text)
End Sub

Monday, June 21, 2010

Search word by vb program


Search word by vb program

'controls       Property        Setting

'Textbox1        Name            txtText
'                Caption           -

'Textbox2        Name            txtWord
'                Caption           -
                
'Label1          Name            lbl
'                Caption          Enter Text

'Label2          Name            lbl
'                Caption          Enter Word for search

'Label3          Name            lblResult
'                Caption          

'command1        Name            cmdSearch
                Caption           OK



'-----------------------------------------------------
'                        CODE

Private Sub cmdSearch_click()
Dim lenmain as Integer, lenword as Integer
Dim word as String, flag as String

flag =0
lenmain =Len(txtText.text)
lenword =Len(txtWord.text)
for a=1 To lenmain
word=Mid(txtText.text,a,lenword)

If word=txtWord.text Then
flag=flag+1
End If
Next
lblResult.Caption = Str(flag)
End Sub

Saturday, May 15, 2010

Upper Case To Lower Case




'controls       Property        Setting

'Label1          Name            lbl
'                Caption          Enter Text

'Textbox1        Name            Text1
'                Caption           -

'Label2          Name            lblUpper
'                Caption          -

'Label3          Name            lblLower
'                Caption          -

'Label4          Name            lblReverse
'                Caption          -

'command1        Name            cmdUpper
'                Caption           Upper

'command2        Name            cmdLower
'                Caption           Lower

'command3        Name            cmdReverse
'                Caption           Reverse


'-----------------------------------------------------
'                        CODE

Private Sub cmdUpper_click()

text=Ucase(Text1.text)
lblUpper.Caption=text
End Sub

Private Sub cmdLower_click()

text=LUcase(Text1.text)
lblLower.Caption=text
End Sub

Private Sub cmdReverse_click()

text=StrReverse(Text1.text)
lblReverse.Caption=text
End Sub

Monday, April 19, 2010

WAP of Shape


'WAP of Shape

'controls       Property        Setting

'Shape1         Name            shpshape
'               Width           200
'               height          300

'Vertical       Name            SrcVertical
'Scrollbar      
'               Min             300
'               Max             200

'Horizontal     Name            SrcHorizontal
'Scrollbar      
'               Min             300
'               Max             200




'-----------------------------------------------------
'                        CODE

Private Sub SrcHorizontal_click()
shpshape.Width=SrcHorizontal.value
End Sub

Private Sub SrcVertical_click()
shpshape.height=SrcVertical.value
End Sub

Sunday, April 18, 2010

WAP of Password security


'WAP of Password security

'controls       Property        Setting

'Textbox1        Name            txt
'                Caption           -
                
'Label1          Name            lbl
 '               Caption          Enter Password

'command1        Name            cmdOk
'                Caption           OK

'command2        Name            cmdCancel
'                Caption           Cancel
          
'-----------------------------------------------------
'                        CODE

Private Sub cmdOk_click()
If txt.text="123" Then
msgbox("Welcome")
else
msgbox("Wrong Password - enter 123")
End IF
End Sub

Private Sub cmdCancel_click()
End
End Sub

Thursday, April 15, 2010

WAP of Addition,Subtraction,Multiplycation


WAP of Addition,Subtraction,Multiplycation...

'controls       Property        Setting

'Textbox1        Name            Text1
 '               Caption           -

'Textbox2        Name            Text2
   '             Caption           -

'Label1          Name            Lebel1
  '              Caption          Enter first number

'Label2          Name            Lebel2
   '             Caption           enter second number

'Label3          Name            Lebel3
    '            Caption           Result

'command1        Name            command1
 '               Caption         Addition
          
'command2        Name            command2
 '               Caption         Subtraction
           
'command3        Name            command3
 '               Caption         Multiplication
           
'command4        Name            command4
'                Caption         Dividetion

'command5        Name            command5
'                Caption         Mod
'----------------------------------------------------------
'                      Code
Dim a as Integer
Dim b as Integer
Dim c as Integer

Private Sub command1_click()
a=Val(Text1.text)
a=Val(Text2.text)
c=a+b
Lebel3=c
End Sub

Private Sub command2_click()
a=Val(Text1.text)
a=Val(Text2.text)
c=a-b
Lebel3=c
End Sub

Private Sub command3_click()
a=Val(Text1.text)
a=Val(Text2.text)
c=a*b
Lebel3=c
End Sub

Private Sub command4_click()
a=Val(Text1.text)
a=Val(Text2.text)
c=a/b
Lebel3=c
End Sub

Private Sub command5_click()
a=Val(Text1.text)
a=Val(Text2.text)
c=aModb
Lebel3=c
End Sub

ADS

How to earn online

How to earn online:
Step - 1 :
signup for PayPal, to recieve your online earning
click here:
https://www.paypal.com/in/mrb/pal=CZ7224TZBMCBL
step - 2 : Singup these 4 sites & earn & enjoy! Read site to know how to earn.
1. trekpay
Earn up to $0.02 (2 cents) per click.
http://www.trekpay.com/?ref=34690
2. neobux
Earn up to $0.02 (2 cents) per click.
Click here:
http://www.neobux.com/?r=Moneyearner786

AddMe

Bookmark and Share