Wednesday, 31 August 2011

HOW TO MAKE WINDOWS ERROR

Hi Guys today i am going to show how to make windows error.Usually we have seen that many errors come with the programs these errors are sometime coded by the programmers which we normally don't know about it 
So,today i am going to show you how you can make your very windows error box .......

 Here's what you need to copy and paste :

X = MsgBox("Message Body", ,"Message Header")


FIRST WHAT YOU NEED IS TO OPEN THE NOTEPAD AND COPY/PASTE THE ABOVE CODE IN IT AND SAVE IT WITH ANY NAME YOU WANT TO AND KEEP THE FILE EXTENSION WITH ( .VBS )

THEN OPEN THE FILE AND YOU CAN HAVE YOUR VERY OWN WINDOWS ERROR BOX

Download Kaspersky Internet Security 2012 + 60 Days Activation Key


Kaspersky Internet Security KIS 2012 has been released by Kaspersky Lab. Kaspersky Antivirus new 2012 provides real-time protection from lates malware and viruses. Supported by intelligent scaning and regular update that will proactively secure your computer. Kaspersky internet security 2012 new promising protection from viruses, trojan, spam, hacker,etc digital security features base technology with advanced antivirus protection. This ensures your online security as you work, bank, shop and play online.
Kaspersky Internet Security 2012
Kaspersky Internet Security 2012 Key Features:
  • Protects from viruses, Trojans and worms
  • Blocks spyware and adware
  • Scans files in real time (on access) and on demand
  • Scans email messages (regardless of email client)
  • Scans Internet traffic (regardless of browser)
  • Protects instant messengers (ICQ, MSN)
  • Provides proactive protection from unknown threats
  • Scans Java and Visual Basic scripts
The official Kaspersky website usually provides free trial for one month only, but there is a promotion offer to get a free copy of Kaspersky Internet Security 2012 that protect you for 2 months (60 days). Visit here :                         


DOWNLOAD FREE KASPERSKY ANTI-VIRUS TRIAL VERSION 
Kaspersky Internet Security KIS 2012

Beep Function


This shows you how to set the frequency & duration of a beep sound. Put this in your *.bas file1:53 AM 8/19/2007:

Declare Function Beep Lib "kernel32" (ByVal dwFreq As Long, ByVal dwDuration As Long) As Long
Put something like this in a button:
Dim ret As Long
ret = Beep(1500, 300)
Or, if you want to do something a little more fun, try this:
Dim ret As Long, i As Integer

For i = 0 To 4000 Step 100
    ret = Beep(i, 100)
Next

Add a Menu to Another Program


This code shows you how to add a menu to another program. The only thing is that nothing will happen when you click on the items. To make something happen when you click on an item you have to subclass the menu (I'd help with that but I don't have any subclassing controls, or at least not right now). Put this in your *.bas file:

Public Declare Function AppendMenu Lib "user32" Alias "AppendMenuA" (ByVal hMenu As Long, ByVal wFlags As Long, ByVal wIDNewItem As Long, ByVal lpNewItem As Any) As Long
Public Declare Function CreatePopupMenu Lib "user32" () As Long
Public Declare Function DrawMenuBar Lib "user32" (ByVal hwnd As Long) As Long
Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Public Declare Function GetMenu Lib "user32" (ByVal hwnd As Long) As Long
Public Declare Function GetMenuItemID Lib "user32" (ByVal hMenu As Long, ByVal nPos As Long) As Long
Public Declare Function GetMenuItemCount Lib "user32" (ByVal hMenu As Long) As Long
Public Declare Function GetMenuString Lib "user32" Alias "GetMenuStringA" (ByVal hMenu As Long, ByVal wIDItem As Long, ByVal lpString As String, ByVal nMaxCount As Long, ByVal wFlag As Long) As Long
Public Declare Function GetSubMenu Lib "user32" (ByVal hMenu As Long, ByVal nPos As Long) As Long
Public Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long

Public Const MF_ENABLED = &H0&
Public Const MF_POPUP = &H10&
Public Const MF_STRING = &H0&
Public Const WM_NCPAINT = &H85
Then put something like this in a button:
Dim newMenu As Long
newMenu = CreatePopupMenu
Call AppendMenu(newMenu, MF_ENABLED Or MF_STRING, 0, "Item One")
Call AppendMenu(newMenu, MF_ENABLED Or MF_STRING, 1, "Item Two")
Call AppendMenu(newMenu, MF_ENABLED Or MF_STRING, 2, "Item Three")
Call AppendMenu(newMenu, MF_ENABLED Or MF_STRING, 3, "Item Four")
Call AppendMenu(newMenu, MF_ENABLED Or MF_STRING, 4, "Item Five")

' Find the notepad application window
Dim notepad As Long
notepad = FindWindow("notepad", vbNullString)

' Add our menu to the window we found above
Dim notepadMenu As Long
notepadMenu = GetMenu(notepad)
Call AppendMenu(notepadMenu, MF_POPUP, newMenu, "Item List")

' Ensure that the user sees the new menu immediately
Call SendMessage(notepad, WM_NCPAINT, 0&, 0&)
Blogger Widgets Twitter Bird Gadget