MeroTheHero

 

ONLINE

 

Hacking and Cracking
Simple Hacking' program using VB
 
Electronics Section
Waiting for Mr. Volta
Jokes, funny & weird
English
Arabic
Political Section
Photo Galleries
Important Documents
Recommended Sites
Visual Basic Stuff
Programs by MeroTheHero

Programs by Friends

Other Programs with their codes.

V.Basic Tips for beginners.

 

V.Basic Tips

Index
White : Topic Name
Purple : Code
Green : Comments

  • How to make a sound of error??

Beep

  • How to make a link to a site???

shell "explorer.exe http://www.sitename.com/"

  • How to make a password???

Dim password

password = InputBox(" please enter password")

If password = "1234" Then

' write between "" any password you like whatever it is

Form1.Show     ' assume that form1 is the startup form

Else  ' after that write that action you would like to take

MsgBox " password is incorrect "

End

End If 

  • How to let the program resumes after error??

'here is the code which may result in an error

On error resume next

'then write the next

  • How to let the comp. type on keyboard itself??                 

Sendkey " what do u want it do type ", true

'1st  Example:

Sendkey "%{f4}", true

'This will type alt/f4 which will close the program automatically

'NB:

'Alt=%

'F4 (or any similar thing) should be between {}

  • How to make a form on all the page??

Private Sub Form1_Load()

Form1.BorderStyle = 0

Form1.Appearance = 0

Form1.WindowState = vbMaximized

End Sub 

  • How to make a form don't close ??? (Except with CTRL/ALT/DEL)

Private Sub Form_Unload(Cancel As Integer)

Cancel = -1

End Sub

  • How to get the key code of keys??  (must be in an empty form)

Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)

MsgBox KeyCode

End Sub

  • How to make the text box all over the form and resizes with it ?

Form1.resize 0,0 width, height

  • If u want to make the form invisible in the ctr+alt+dlt !!!!!!!

App.TaskVisible = False

  • How to reboot the computer???

 'Declerations

Private Const EWX_REBOOT As Long = 2

Private Declare Function ExitWindowsEx Lib "user32" (ByVal dwOptions As Long, ByVal dwReserved As Long) As Long

'reboot the computer

Private Sub Command1_Click()

lngResult = ExitWindowsEx(EWX_REBOOT, 0&)

End Sub

  • To see if a file really exists or not !!!!

Private Sub Form_Load()

If Len(Dir$("c:\states.txt", vbDirectory)) = 0 Then

MsgBox "doesnt exist"

Else: MsgBox "exists"

End If

End Sub

  • To make a form slide before exiting it!

Sub SlideWindow(frmSlide As Form, iSpeed As Integer)

While frmSlide.Left + frmSlide.Width < Screen.Width

DoEventsfrmSlide.Left = frmSlide.Left + iSpeed

Wend

While frmSlide.Top - frmSlide.Height < Screen.Height

DoEvents

frmSlide.Top = frmSlide.Top + iSpeed

Wend

Unload frmSlide

End Sub

Private Sub Command1_Click()

Call SlideWindow(Form1, 100)

End Sub

  • How to get the IP in a msgbox

'Put this / or encode this on your form load'

'Put a winsock

Private Sub Form_Load()

   Aries = Winsock1.LocalIP

   MsgBox Aries, vbInformation, "Your Computer Ip Address"

End Sub


 

Copyright © 2005 merothehero.All rights reserved