Page 1 of 3 123 LastLast
Results 1 to 15 of 31
  1. #1
    Noxit's Avatar
    Join Date
    Jul 2007
    Gender
    male
    Location
    N:\O\X\I\T.exe
    Posts
    2,017
    Reputation
    24
    Thanks
    640
    My Mood
    Drunk

    [Tutorials] Mega Post of Visual Basic Tutorials !

    Here I will put together many tutorials for many things. I will keep adding to this list every day. Each tutorial will be on a different page. Here you'll se what subjects im telling.
    Index:
    Enable and Disable CTRL + ALT + DEL
    A list of Key Codes and How to Use Them
    How to Create a Password Generator
    Launching a Website Url in VB6
    Making a Port Scanner
    Changing your Background Color
    Auto Refresher
    IP Pinger
    Yes/No Option
    Making a Transparent Form
    Making a Clock
    Process Hider
    How to use a scroll bar
    Add on to password Generator by Posted By
    Auto Clicker Posted By
    Auto Typer Posted By

    Many more tutorials I hope that will be added, I will keep on adding tutorials!

    A Thanks Is ALWAYS NICE!
    Last edited by Noxit; 08-03-2009 at 06:13 AM.
    --














  2. The Following 3 Users Say Thank You to Noxit For This Useful Post:

    Lehsyrus (08-22-2009),n3m1s1s (08-22-2009),reversflux (08-05-2009)

  3. #2
    Noxit's Avatar
    Join Date
    Jul 2007
    Gender
    male
    Location
    N:\O\X\I\T.exe
    Posts
    2,017
    Reputation
    24
    Thanks
    640
    My Mood
    Drunk
    Enable and Disable CTRL + ALT + Delete




    Make sure you have 2 command buttons and a module




    Insert this in your module:


    Code:
     Declare Function SystemParametersInfo Lib "user32" Alias _
    
    "SystemParametersInfoA" (ByVal uAction As Long, ByVal uParam As Long, _ 
     
    ByVal lpvParam As Any, ByVal fuWinIni As Long) As Long
    Insert this into your form:


    Code:
     Sub DisableCtrlAltDelete(bDisabled As Boolean)
    
    Dim x As Long
    
    x = SystemParametersInfo(97, bDisabled, CStr(1), 0)
    
    End Sub
    
    
    Private Sub Command2_Click()
    
    DisableCtrlAltDelete (False)
    
    End Sub
    
    
    Private Sub Command1_Click()
    
    DisableCtrlAltDelete (True)
    
    End Sub
    --














  4. The Following User Says Thank You to Noxit For This Useful Post:

    reversflux (08-05-2009)

  5. #3
    Noxit's Avatar
    Join Date
    Jul 2007
    Gender
    male
    Location
    N:\O\X\I\T.exe
    Posts
    2,017
    Reputation
    24
    Thanks
    640
    My Mood
    Drunk
    A list of Key Codes


    vbKeyControl 'CTRL Key
    vbkeymenu 'ALT key
    vbKeyReturn 'Enter Key (Main)
    vbKeyBack 'Back Space
    vbKeyTab 'Tab
    vbKeyShift 'Shift
    vbKeyCapital 'Caps Lock
    vbKeyEscape 'Esc
    vbKeySpace ' Space Bar
    vbKeyPageUp ' Page Up
    vbKeyPageDown ' Page Down
    vbKeyEnd 'End
    vbKeyHome ' Home
    vbKeyLeft 'Left arrow
    vbKeyUp 'Up arrow
    vbKeyRight 'Right Arrow
    vbKeyDown ' Down Arrow
    vbKeyPrint 'Print Screen
    vbKeyPause 'Pause (The one next to printscreen)
    vbKeyInsert 'Insert
    vbKeyDelete 'Delete (the one near insert)
    vbKeyHelp 'Help
    vbKeyNumlock ' Numlock
    vbKeyF1 'F1
    vbKeyF2 'F2
    vbKeyF3 'F3
    vbKeyF4 'F4
    vbKeyF5 'F5
    vbKeyF6 'F6
    vbKeyF7 'F7
    vbKeyF8 'F8
    vbKeyF9 'F9
    vbKeyF10 'F10
    vbKeyF11 'F11
    vbKeyF12 'F12
    vbKeyZ 'Z
    vbKeyx 'X
    vbKeyc 'C
    vbKeyv 'V
    vbKeyb 'B
    vbKeyn 'N
    vbKeym 'M
    vbKeya 'A
    vbKeys 'S
    vbKeyd ' D
    vbKeyf 'F
    vbKeyg 'G
    vbKeyh 'H
    vbKeyj 'J
    vbKeyk 'K
    vbKeyl 'L
    vbKeyq 'Q
    vbKeyw 'W
    vbKeye 'E
    vbKeyr 'R
    vbKeyt 'T
    vbKeyy 'Y
    vbKeyu 'U
    vbKeyi 'I
    vbKeyo 'O
    vbKeyp 'P
    vbKeyNumpad0 'Num Pad 0
    vbKeyNumpad1 'Num Pad 1
    vbKeyNumpad2 'Num Pad 2
    vbKeyNumpad3 'Num Pad 3
    vbKeyNumpad4 'Num Pad 4
    vbKeyNumpad5 'Num Pad 5
    vbKeyNumpad6 'Num Pad 6
    vbKeyNumpad7 ' Num Pad 7
    vbKeyNumpad8 'NumPad 8
    vbKeyNumpad9 'Num Pad 9
    vbKeyMultiply 'Num Pad *
    vbKeyAdd 'Num Pad +
    vbKeySubtract 'Num Pad -
    vbKeyDivide 'Num Pad /
    vbKeySeparator 'Num Pad Enter
    vbKeyDecimal 'Num Pad .
    vbKey0 'Normal 0 from top of keyboard
    vbKey1 'Normal 1 from top of keyboard
    vbKey2 'Normal 2 from top of keyboard
    vbKey3 'Normal 3 from top of keyboard
    vbKey4 'Normal 4 from top of keyboard
    vbKey5 'Normal 5 from top of keyboard
    vbKey6 'Normal 6 from top ofkeybaorrd
    vbKey7 'Normal 7 from top of keyboard
    vbKey8 'Normal 8 from top of keybaord
    vbKey9 'Normal 9 from top of keyboard
    -------------------------------------


    Heres how to use them:


    Code:
    Private Sub Form_KeyDown(KeyCode As Integer, Shift _
    
    As Integer)
    
    If KeyCode = vbKeyBack Then
    
    MsgBox " You pushed backSpace" 'That is changed to what _
    
    you want it to do when they push it
    
    End If 'Remember for every If you must have a end if
    
    End Sub

    Now For the mouse Buttons:




    vbKeyLButton 'Left mouse Button




    vbKeyRButton 'Right Mouse Button




    vbKeyMButton 'Middle mouse Button




    And to use them its a bit different


    Code:
    Private Sub Form_MouseDown(Button As Integer, Shift _
    
    As Integer, X As Single, Y As Single)
    
    If Button = vbKeyLButton Then
    
    MsgBox " You pushed the left mouse button" 'The code _
    
    you want it to do goes there
    
    End If ' remember for every If you need End If
    
    End Sub
    --














  6. The Following User Says Thank You to Noxit For This Useful Post:

    reversflux (08-05-2009)

  7. #4
    Noxit's Avatar
    Join Date
    Jul 2007
    Gender
    male
    Location
    N:\O\X\I\T.exe
    Posts
    2,017
    Reputation
    24
    Thanks
    640
    My Mood
    Drunk
    How to Make a Random Password Generator



    Create a text box and command button.

    Add this code to your form:

    Code:
    Private Sub Command1_Click()
    
      Text1 = GenerateCode() 'make sure ur textbox is called Text1
    
    End Sub
    
    Public Function GenerateCode()
    
      strInputString = "1234567890abcdefghijklmnopqrstuvwxyz" 'these are the characters which will be in the password
    
      intLength = Len(strInputString)
    
      intNameLength = 7 'edit this according to how long u want ur password to be
    
      Randomize ' jus to make it random :D
    
      strName = ""
    
      For intStep = 1 To intNameLength
    
           intRnd = Int((intLength * Rnd) + 1)
    
           strName = strName & Mid(strInputString, intRnd, 1)
    
      Next
    
      GenerateCode = strName
    
    End Function
    --














  8. The Following User Says Thank You to Noxit For This Useful Post:

    reversflux (08-05-2009)

  9. #5
    Noxit's Avatar
    Join Date
    Jul 2007
    Gender
    male
    Location
    N:\O\X\I\T.exe
    Posts
    2,017
    Reputation
    24
    Thanks
    640
    My Mood
    Drunk
    Launching a Website Url in VB6



    This is how to launch a site you enter specifically O the user enters.. using their default browser.


    Add this code to your command button that you want if you click on it, it'll launch the website url:


    Code:
    OpenURL "https://www.google.ca/"
    --














  10. The Following User Says Thank You to Noxit For This Useful Post:

    reversflux (08-05-2009)

  11. #6
    Noxit's Avatar
    Join Date
    Jul 2007
    Gender
    male
    Location
    N:\O\X\I\T.exe
    Posts
    2,017
    Reputation
    24
    Thanks
    640
    My Mood
    Drunk
    How to Make a Port Scanner



    Add 2 text boxes, 3 command buttons, a list box, a timer, and a winsock control (if you dont have the winsock button on your component bar, you can add it by right clicking on the bar and scrolling to components, and adding it from the component list, it should be called "Microsoft Winsock Control 6.0 (SP6))


    Add the following code to your form:


    Code:
    Private Sub Form_Load()
    
    Timer1.Interval = 1
    
    Timer1.Enabled = False
    
    Text2.Text = "0"
    
    End Sub
    
    
    Private Sub Timer1_Timer()
    
    On Error Resume Next
    
    Winsock1.Close
    
    Text2.Text = Text2.Text + 1
    
    Winsock1.RemoteHost = Text1.Text
    
    Winsock1.RemotePort = Text2.Text
    
    Winsock1.Connect
    
    End Sub
    
    
    Private Sub Command1_Click()
    
    Timer1.Enabled = True
    
    End Sub
    
    
    Private Sub Command2_Click()
    
    Timer1.Enabled = False
    
    Text2.Text = "0"
    
    End Sub
    
    
    Private Sub Command3_Click()
    
    List1.Clear
    
    End Sub
    
    
    Private Sub Winsock1_Connect()
    
    List1.AddItem Winsock1.RemotePort & " is open!"
    
    End Sub

    As you can see your first command button is to start the scan, the second is to stop the scan, and the third one is to clear the ports.
    --














  12. The Following 2 Users Say Thank You to Noxit For This Useful Post:

    reversflux (08-05-2009),treeham (09-28-2010)

  13. #7
    Noxit's Avatar
    Join Date
    Jul 2007
    Gender
    male
    Location
    N:\O\X\I\T.exe
    Posts
    2,017
    Reputation
    24
    Thanks
    640
    My Mood
    Drunk
    Changing Your Background Color



    First add a check box.


    Then add this to your text box:


    Code:
    Private Sub check1_Click()
     
    If check1 = 1 Then
    
    Form1.Check1.BackColor = vbRed 'this will change the color of the check box to red
    
    Form1.BackColor = vbRed 'this will change the color of the form to red
    
    ElseIf Check1 = 0 Then
    
    Form1.Check1.BackColor = vbBlue 'this will change the color of the check box to blue
    
    Form1.BackColor = vbBlue 'this will change the color of the form to blue
    
    End If
    
    End Sub
    --














  14. The Following User Says Thank You to Noxit For This Useful Post:

    reversflux (08-05-2009)

  15. #8
    Noxit's Avatar
    Join Date
    Jul 2007
    Gender
    male
    Location
    N:\O\X\I\T.exe
    Posts
    2,017
    Reputation
    24
    Thanks
    640
    My Mood
    Drunk
    Auto Refresher



    Add a command button and a Inet Control

    Add this to your command button:

    Code:
    Private Sub Command1_Click()
    
    Dim x As Long
    
       For x = 1 To 1000
    
           Inet.OpenURL "www.yourwebsitethatyouwanttorefresh.com"
    
                Do While Inet.StillExecuting = True
    
                   DoEvents ' lets wait til the connection/loading has finished
    
                   'not needed for only a few connections
    
               Loop
    
        Next x
    
     End Sub

    This is a good program to make your website hits go up
    --














  16. The Following User Says Thank You to Noxit For This Useful Post:

    reversflux (08-05-2009)

  17. #9
    Noxit's Avatar
    Join Date
    Jul 2007
    Gender
    male
    Location
    N:\O\X\I\T.exe
    Posts
    2,017
    Reputation
    24
    Thanks
    640
    My Mood
    Drunk
    IP Pinger


    You will need 2 command buttons, the first command button is to select and ping and the second one is to clear last ping.


    Add this code to the form:


    Code:
     Dim theIP As String
    
    Private Sub Command1_Click()
    
    theIP = InputBox("Enter an IP") 'makes a box to enter the IP
    
    Dim ECHO As ICMP_ECHO_REPLY
    
    Dim pos As Integer
    
    Call Ping(theIP, ECHO) 'calls to the IP
    
    form1.Print GetStatusCode(ECHO.status) ' gets part of the return
    
    form1.Print ECHO.Address ' gets the next bit
    
    form1.Print ECHO.RoundTripTime & " ms" ' gets a bit more
    
    form1.Print ECHO.DataSize & " bytes" ' gets the next bit
    
    If Left$(ECHO.Data, 1) <> Chr$(0) Then
    
        pos = InStr(ECHO.Data, Chr$(0))
    
        form1.Print Left$(ECHO.Data, pos - 1) ' desplys the ping on form 
    
    End If
    
    End Sub
    
    
    Private Sub Command2_Click()
    
    Unload Me 'makes the form close to clear 
    
    form1.Show 'makes the form show again
    
    End Sub

    Add this to your module:


    Code:
     Option Explicit
    
    Public Const IP_STATUS_BASE = 11000
    
    Public Const IP_SUCCESS = 0
    
    Public Const IP_BUF_TOO_SMALL = (11000 + 1)
    
    Public Const IP_DEST_NET_UNREACHABLE = (11000 + 2)
    
    Public Const IP_DEST_HOST_UNREACHABLE = (11000 + 3)
    
    Public Const IP_DEST_PROT_UNREACHABLE = (11000 + 4)
    
    Public Const IP_DEST_PORT_UNREACHABLE = (11000 + 5)
    
    Public Const IP_NO_RESOURCES = (11000 + 6)
    
    Public Const IP_BAD_OPTION = (11000 + 7)
    
    Public Const IP_HW_ERROR = (11000 + 8)
    
    Public Const IP_PACKET_TOO_BIG = (11000 + 9)
    
    Public Const IP_REQ_TIMED_OUT = (11000 + 10)
    
    Public Const IP_BAD_REQ = (11000 + 11)
    
    Public Const IP_BAD_ROUTE = (11000 + 12)
    
    Public Const IP_TTL_EXPIRED_TRANSIT = (11000 + 13)
    
    Public Const IP_TTL_EXPIRED_REASSEM = (11000 + 14)
    
    Public Const IP_PARAM_PROBLEM = (11000 + 15)
    
    Public Const IP_SOURCE_QUENCH = (11000 + 16)
    
    Public Const IP_OPTION_TOO_BIG = (11000 + 17)
    
    Public Const IP_BAD_DESTINATION = (11000 + 18)
    
    Public Const IP_ADDR_DELETED = (11000 + 19)
    
    Public Const IP_SPEC_MTU_CHANGE = (11000 + 20)
    
    Public Const IP_MTU_CHANGE = (11000 + 21)
    
    Public Const IP_UNLOAD = (11000 + 22)
    
    Public Const IP_ADDR_ADDED = (11000 + 23)
    
    Public Const IP_GENERAL_FAILURE = (11000 + 50)
    
    Public Const MAX_IP_STATUS = 11000 + 50
    
    Public Const IP_PENDING = (11000 + 255)
    
    Public Const PING_TIMEOUT = 200
    
    Public Const WS_VERSION_REQD = &H101
    
    Public Const WS_VERSION_MAJOR = WS_VERSION_REQD \ &H100 And &HFF&
    
    Public Const WS_VERSION_MINOR = WS_VERSION_REQD And &HFF&
    
    Public Const MIN_SOCKETS_REQD = 1
    
    Public Const SOCKET_ERROR = -1
    
    Public Const MAX_WSADescription = 256
    
    Public Const MAX_WSASYSStatus = 128
    
    Public Type ICMP_OPTIONS
    
    Ttl             As Byte
    
    
    Tos             As Byte
    
    
    Flags          As Byte
    
    
    OptionsSize     As Byte
    
    
    OptionsData     As Long
    
    
    End Type
    
    Dim ICMPOPT As ICMP_OPTIONS
    
    Public Type ICMP_ECHO_REPLY
    
    Address         As Long
    
    
    status          As Long
    
    
    RoundTripTime As Long
    
    
    DataSize      As Integer
    
    
    Reserved      As Integer
    
    
    DataPointer     As Long
    
    
    Options         As ICMP_OPTIONS
    
    
    Data          As String * 250
    
    
    End Type
    
    Public Type HOSTENT
    
    
    hName As Long
    
    
    hAliases As Long
    
    
    hAddrType As Integer
    
    
    hLen As Integer
    
    
    hAddrList As Long
    
    
    End Type
    
    Public Type WSADATA
    
    
    wVersion As Integer
    
    
    wHighVersion As Integer
    
    
    szDescription(0 To MAX_WSADescription) As Byte
    
    
    szSystemStatus(0 To MAX_WSASYSStatus) As Byte
    
    
    wMaxSockets As Integer
    
    
    wMaxUDPDG As Integer
    
    
    dwVendorInfo As Long
    
    
    End Type
    
    Public Declare Function Ic***reateFile Lib "icmp.dll" () As Long
    
    Public Declare Function Ic***loseHandle Lib "icmp.dll" _
    
    (ByVal IcmpHandle As Long) As Long
    
    Public Declare Function IcmpSendEcho Lib "icmp.dll" _
    
    
    (ByVal IcmpHandle As Long, _
    
    
    ByVal DestinationAddress As Long, _
    
    
    ByVal RequestData As String, _
    
    
    ByVal RequestSize As Integer, _
    
    
    ByVal RequestOptions As Long, _
    
    
    ReplyBuffer As ICMP_ECHO_REPLY, _
    
    
    ByVal ReplySize As Long, _
    
    
    ByVal Timeout As Long) As Long
    
    Public Declare Function WSAGetLastError Lib "WSOCK32.DLL" () As Long
    
    Public Declare Function WSAStartup Lib "WSOCK32.DLL" _
    
    
    (ByVal wVersionRequired As Long, _
    
    
    lpWSADATA As WSADATA) As Long
    
    Public Declare Function WSACleanup Lib "WSOCK32.DLL" () As Long
    
    Public Declare Function gethostname Lib "WSOCK32.DLL" _
    
    (ByVal szHost As String, _
    
    
    ByVal dwHostLen As Long) As Long
    
     
    
    
    Public Declare Function gethostbyname Lib "WSOCK32.DLL" _
    
    
    (ByVal szHost As String) As Long
    
     
    
    
    Public Declare Sub RtlMoveMemory Lib "kernel32" _
    
    
    (hpvDest As Any, _
    
    
    ByVal hpvSource As Long, _
    
    
    ByVal cbCopy As Long)
    
     
    
     
    
    
    Public Function GetStatusCode(status As Long) As String
    
     
    
    
    Dim msg As String
    
     
    
    
    Select Case status
    
    
        Case IP_SUCCESS:              msg = "ip success"
    
    
        Case IP_BUF_TOO_SMALL:         msg = "ip buf too_small"
    
    
        Case IP_DEST_NET_UNREACHABLE: msg = "ip dest net unreachable"
    
    
        Case IP_DEST_HOST_UNREACHABLE: msg = "ip dest host unreachable"
    
    
        Case IP_DEST_PROT_UNREACHABLE: msg = "ip dest prot unreachable"
    
    
        Case IP_DEST_PORT_UNREACHABLE: msg = "ip dest port unreachable"
    
    
        Case IP_NO_RESOURCES:          msg = "ip no resources"
    
    
        Case IP_BAD_OPTION:          msg = "ip bad option"
    
    
        Case IP_HW_ERROR:              msg = "ip hw_error"
    
    
        Case IP_PACKET_TOO_BIG:      msg = "ip packet too_big"
    
    
        Case IP_REQ_TIMED_OUT:         msg = "ip req timed out"
    
    
        Case IP_BAD_REQ:              msg = "ip bad req"
    
    
        Case IP_BAD_ROUTE:             msg = "ip bad route"
    
    
        Case IP_TTL_EXPIRED_TRANSIT: msg = "ip ttl expired transit"
    
    
        Case IP_TTL_EXPIRED_REASSEM: msg = "ip ttl expired reassem"
    
    
        Case IP_PARAM_PROBLEM:         msg = "ip param_problem"
    
    
        Case IP_SOURCE_QUENCH:         msg = "ip source quench"
    
    
        Case IP_OPTION_TOO_BIG:      msg = "ip option too_big"
    
    
        Case IP_BAD_DESTINATION:      msg = "ip bad destination"
    
    
        Case IP_ADDR_DELETED:          msg = "ip addr deleted"
    
    
        Case IP_SPEC_MTU_CHANGE:      msg = "ip spec mtu change"
    
    
        Case IP_MTU_CHANGE:          msg = "ip mtu_change"
    
    
        Case IP_UNLOAD:              msg = "ip unload"
    
    
        Case IP_ADDR_ADDED:          msg = "ip addr added"
    
    
        Case IP_GENERAL_FAILURE:      msg = "ip general failure"
    
    
        Case IP_PENDING:              msg = "ip pending"
    
    
        Case PING_TIMEOUT:             msg = "ping timeout"
    
    
        Case Else:                     msg = "unknown msg returned"
    
    
    End Select
    
     
    
    
    GetStatusCode = CStr(status) & " [ " & msg & " ]"
    
     
    
    
    End Function
    
     
    
     
    
    
    Public Function HiByte(ByVal wParam As Integer)
    
     
    
    
    HiByte = wParam \ &H100 And &HFF&
    
     
    
    
    End Function
    
     
    
     
    
    
    Public Function LoByte(ByVal wParam As Integer)
    
     
    
    
    LoByte = wParam And &HFF&
    
     
    
    
    End Function
    
     
    
     
    
    
    Public Function Ping(szAddress As String, ECHO As ICMP_ECHO_REPLY) As Long
    
     
    
    
    Dim hPort As Long
    
    
    Dim dwAddress As Long
    
    
    Dim sDataToSend As String
    
    
    Dim iOpt As Long
    
     
    
    
    sDataToSend = "Echo This"
    
    
    dwAddress = AddressStringToLong(szAddress)
    
     
    
    
    Call SocketsInitialize
    
    
    hPort = Ic***reateFile()
    
     
    
    
    If IcmpSendEcho(hPort, _
    
    
                    dwAddress, _
    
    
                    sDataToSend, _
    
    
                    Len(sDataToSend), _
    
    
                    0, _
    
    
                    ECHO, _
    
    
                    Len(ECHO), _
    
    
                    PING_TIMEOUT) Then
    
     
    
     
    
    
           Ping = ECHO.RoundTripTime
    
    
    Else: Ping = ECHO.status * -1
    
    
    End If
    
     
    
    
    Call Ic***loseHandle(hPort)
    
    
    Call SocketsCleanup
    
     
    
    
    End Function
    
     
    
     
    
    
    Function AddressStringToLong(ByVal tmp As String) As Long
    
     
    
    
    Dim i As Integer
    
    
    Dim parts(1 To 4) As String
    
     
    
    
    i = 0
    
     
    
     
    
    
    While InStr(tmp, ".") > 0
    
    
        i = i + 1
    
    
        parts(i) = Mid(tmp, 1, InStr(tmp, ".") - 1)
    
    
        tmp = Mid(tmp, InStr(tmp, ".") + 1)
    
    
    Wend
    
     
    
    
    i = i + 1
    
    
    parts(i) = tmp
    
     
    
    
    If i <> 4 Then
    
    
        AddressStringToLong = 0
    
    
        Exit Function
    
    
    End If
    
     
    
     
    
    
    AddressStringToLong = Val("&H" & Right("00" & Hex(parts(4)), 2) & _
    
    
                           Right("00" & Hex(parts(3)), 2) & _
    
    
                           Right("00" & Hex(parts(2)), 2) & _
    
    
                           Right("00" & Hex(parts(1)), 2))
    
     
    
    
    End Function
    
     
    
     
    
    
    Public Function SocketsCleanup() As Boolean
    
     
    
    
    Dim X As Long
    
     
    
    
    X = WSACleanup()
    
     
    
    
    If X <> 0 Then
    
    
        MsgBox "Windows Sockets error " & Trim$(Str$(X)) & _
    
    
                " occurred in Cleanup.", vbExclamation
    
    
        SocketsCleanup = False
    
    
    Else
    
    
        SocketsCleanup = True
    
    
    End If
    
     
    
    
    End Function
    
     
    
     
    
    
    Public Function SocketsInitialize() As Boolean
    
     
    
    
    Dim WSAD As WSADATA
    
    
    Dim X As Integer
    
    
    Dim szLoByte As String, szHiByte As String, szBuf As String
    
     
    
    
    X = WSAStartup(WS_VERSION_REQD, WSAD)
    
     
    
    
    If X <> 0 Then
    
    
        MsgBox "Windows Sockets for 32 bit Windows " & _
    
    
                "environments is not successfully responding."
    
    
        SocketsInitialize = False
    
    
        Exit Function
    
    
    End If
    
     
    
    
    If LoByte(WSAD.wVersion) < WS_VERSION_MAJOR Or _
    
    
        (LoByte(WSAD.wVersion) = WS_VERSION_MAJOR And _
    
    
        HiByte(WSAD.wVersion) < WS_VERSION_MINOR) Then
    
     
    
    
        szHiByte = Trim$(Str$(HiByte(WSAD.wVersion)))
    
    
        szLoByte = Trim$(Str$(LoByte(WSAD.wVersion)))
    
    
        szBuf = "Windows Sockets Version " & szLoByte & "." & szHiByte
    
    
        szBuf = szBuf & " is not supported by Windows " & _
    
    
                            "Sockets for 32 bit Windows environments."
    
    
        MsgBox szBuf, vbExclamation
    
    
        SocketsInitialize = False
    
    
        Exit Function
    
     
    
    
    End If
    
     
    
    
    If WSAD.wMaxSockets < MIN_SOCKETS_REQD Then
    
    
        szBuf = "This application requires a minimum of " & _
    
    
                   Trim$(Str$(MIN_SOCKETS_REQD)) & " supported sockets."
    
    
        MsgBox szBuf, vbExclamation
    
    
        SocketsInitialize = False
    
    
        Exit Function
    
    
    End If
    
    SocketsInitialize = True
    
    End Function
    --














  18. The Following User Says Thank You to Noxit For This Useful Post:

    reversflux (08-05-2009)

  19. #10
    Noxit's Avatar
    Join Date
    Jul 2007
    Gender
    male
    Location
    N:\O\X\I\T.exe
    Posts
    2,017
    Reputation
    24
    Thanks
    640
    My Mood
    Drunk
    Yes/No Option


    Add a command button and insert this code to the command button:


    Code:
    Private Sub Command1_Click()
    Dim bla As String
    
    
    bla = MsgBox("Are you cool?", vbYesNo)
    
    
    If bla = vbYes Then
    
    
    MsgBox "Sweet"
    
    
    ElseIf bla = vbNo Then
    
    
    MsgBox "I feel sorry for you"
    
    
    End If
    
    
    End Sub
    --














  20. The Following User Says Thank You to Noxit For This Useful Post:

    reversflux (08-05-2009)

  21. #11
    Noxit's Avatar
    Join Date
    Jul 2007
    Gender
    male
    Location
    N:\O\X\I\T.exe
    Posts
    2,017
    Reputation
    24
    Thanks
    640
    My Mood
    Drunk
    Making Transparent Forms



    This will make your form transparent. It will make people not able to Labels, Command Buttons, Text Boxes etc.)


    Add this to your Module:


    Code:
    Option Explicit
    
    Private Declare Function CreateRectRgn Lib "gdi32" (ByVal X1 As Long, _
    
    
    ByVal Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long) As Long
    
    
    Private Declare Function CombineRgn Lib "gdi32" (ByVal hDestRgn As _
    
    
    Long, ByVal hSrcRgn1 As Long, ByVal hSrcRgn2 As Long, ByVal _
    
    
    nCombineMode As Long) As Long
    
    
    Private Declare Function SetWindowRgn Lib "user32" (ByVal hWnd As _
    
    
    Long, ByVal hRgn As Long, ByVal bRedraw As Long) As Long
    
     
    
    
    Public Sub TransparentForm(frm As Form)
    
    
       frm.ScaleMode = vbPixels
    
    
       Const RGN_DIFF = 4
    
    
       Const RGN_OR = 2
    
     
    
    
       Dim outer_rgn As Long
    
    
       Dim inner_rgn As Long
    
    
       Dim wid As Single
    
    
       Dim hgt As Single
    
    
       Dim border_width As Single
    
    
       Dim title_height As Single
    
    
       Dim ctl_left As Single
    
    
       Dim ctl_top As Single
    
    
       Dim ctl_right As Single
    
    
       Dim ctl_bottom As Single
    
    
       Dim control_rgn As Long
    
    
       Dim combined_rgn As Long
    
    
       Dim ctl As Control
    
     
    
    
       If frm.WindowState = vbMinimized Then Exit Sub
    
     
    
    
       ' Create the main form region.
    
    
       wid = frm.ScaleX(frm.Width, vbTwips, vbPixels)
    
    
       hgt = frm.ScaleY(frm.Height, vbTwips, vbPixels)
    
    
       outer_rgn = CreateRectRgn(0, 0, wid, hgt)
    
     
    
    
       border_width = (wid - frm.ScaleWidth) / 2
    
    
       title_height = hgt - border_width - frm.ScaleHeight
    
    
       inner_rgn = CreateRectRgn(border_width, title_height, wid - border_width, _
    
    
           hgt - border_width)
    
     
    
    
       ' Subtract the inner region from the outer.
    
    
       combined_rgn = CreateRectRgn(0, 0, 0, 0)
    
    
       CombineRgn combined_rgn, outer_rgn, inner_rgn, RGN_DIFF
    
     
    
    
       ' Create the control regions.
    
    
       For Each ctl In frm.Controls
    
    
           If ctl.Container Is frm Then
    
    
               ctl_left = frm.ScaleX(ctl.Left, frm.ScaleMode, vbPixels) _
    
    
                   + border_width
    
    
               ctl_top = frm.ScaleX(ctl.Top, frm.ScaleMode, vbPixels) + title_height
    
    
               ctl_right = frm.ScaleX(ctl.Width, frm.ScaleMode, vbPixels) + ctl_left
    
    
               ctl_bottom = frm.ScaleX(ctl.Height, frm.ScaleMode, vbPixels) + ctl_top
    
    
               control_rgn = CreateRectRgn(ctl_left, ctl_top, ctl_right, ctl_bottom)
    
    
               CombineRgn combined_rgn, combined_rgn, control_rgn, RGN_OR
    
    
           End If
    
    
       Next ctl
    
     
    
    
       'Restrict the window to the region.
    
    
       SetWindowRgn frm.hWnd, combined_rgn, True
    
    End Sub
    
    'Form Code
    
    Private Sub Form_Resize()
    
       TransparentForm Me
    
    
    End Sub
    Last edited by Noxit; 08-03-2009 at 06:12 AM.
    --














  22. The Following 2 Users Say Thank You to Noxit For This Useful Post:

    backup (08-04-2009),reversflux (08-05-2009)

  23. #12
    Noxit's Avatar
    Join Date
    Jul 2007
    Gender
    male
    Location
    N:\O\X\I\T.exe
    Posts
    2,017
    Reputation
    24
    Thanks
    640
    My Mood
    Drunk
    Making a Clock


    This will teach you how to make a clock in vb6.


    Set up a form as a clock with a textbox.


    Rename the Form1.vb to frmClock. Set the title to "Clock", the BackColor to system Desktop, the ForeColor system ForeColor and the Font to Arial 16.


    Set the textbox name to txtTime.


    Add a timer and rename it to tmrTimer, set its interval to 1000, and Enabled to "True".


    Double click the tmrTimer_Tick code and add this code:


    Code:
    Dim timTime As Date
    
    
    timTime = My.Computer.Clock.GmtTime
    
    
    Me.txtTime.Text = timTimer.Hour & ":" & timTime.Minute & ":" & timTime.Second
    --














  24. The Following User Says Thank You to Noxit For This Useful Post:

    reversflux (08-05-2009)

  25. #13
    Noxit's Avatar
    Join Date
    Jul 2007
    Gender
    male
    Location
    N:\O\X\I\T.exe
    Posts
    2,017
    Reputation
    24
    Thanks
    640
    My Mood
    Drunk
    Hide Program From Process List




    Add 2 command buttons to your forum (The first one will be to hide the program and second will be do make it appear in the process list again


    Add this to your module:


    Code:
     Public Const RSP_SIMPLE_SERVICE = 1
    
     
    
    
    Public Const RSP_UNREGISTER_SERVICE = 0
    
     
    
    
    Declare Function GetCurrentProcessId Lib "kernel32" () As Long
    
     
    
    
    Declare Function RegisterServiceProcess Lib "kernel32" (ByVal dwProcessID _
    
     
    
    
    As Long, ByVal dwType As Long) As Long

    Add this to your form:


    Code:
     Public Sub HideApp(Hide As Boolean)
    Code:
     
    
    
     Dim ProcessID As Long
    
     
    
    
     ProcessID = GetCurrentProcessId()
    
     
    
    
     If Hide Then
    
     
    
    
       retval = RegisterServiceProcess(ProcessID, RSP_SIMPLE_SERVICE)
    
     
    
    
     Else
    
     
    
    
       retval = RegisterServiceProcess(ProcessID, RSP_UNREGISTER_SERVICE)
    
     
    
    
     End If
    
     
    
    
    End Sub
    
     
    
    
    Private Sub Command1_Click()
    
     
    
    
       HideApp (True)
    
     
    
    
    End Sub
    
     
    
    
    Private Sub Command2_Click()
    
     
    
    
       HideApp (False)
    
     
    
    
    End Sub
    --














  26. The Following User Says Thank You to Noxit For This Useful Post:

    reversflux (08-05-2009)

  27. #14
    Noxit's Avatar
    Join Date
    Jul 2007
    Gender
    male
    Location
    N:\O\X\I\T.exe
    Posts
    2,017
    Reputation
    24
    Thanks
    640
    My Mood
    Drunk
    How to Use A Scroll Bar


    Add a label and a scroll bar (Hscroll1)


    Go to your scroll bar's properties and change the small change value to 100 and do the same with the Large Change.


    Add this to your scroll bar code:


    Code:
    Private Sub HScroll1_Change()
    Label1 = HScroll1.Value / 100 & " Secounds"
    
    
    End Sub
    --














  28. The Following User Says Thank You to Noxit For This Useful Post:

    reversflux (08-05-2009)

  29. #15
    Noxit's Avatar
    Join Date
    Jul 2007
    Gender
    male
    Location
    N:\O\X\I\T.exe
    Posts
    2,017
    Reputation
    24
    Thanks
    640
    My Mood
    Drunk
    Auto Clicker

    Hey,

    Make a new form (standard exe)with a timer a 2 buttons named :cmdstart and cmdstop


    Right click and select view code and copy and paste

    Code:
    
    Private Declare Sub mouse_event Lib "user32" (ByVal dwFlags As Long, ByVal dX As Long, ByVal dy As Long, ByVal cButtons As Long, ByVal dwExtraInfo As Long)
    
    
    Private Const MOUSELEFTDOWN = &H2
    
    
    Private Const MOUSELEFTUP = &H4
    then go to your form and then double clik the timer and add this code

    Code:
    
    mouse_event MOUSELEFTDOWN, 0, 0, 0, 0
    
    
       mouse_event MOUSELEFTUP, 0, 0, 0, 0
    and then to your form and double clik on the command buttons and for


    cmdstart:

    Code:
    
    timer1.enabled = true
    cmdstop:

    Code:
    
    timer1.enabled = false
    MOST IMPORTANTLY CHANGE THE TIMER INTERVAL TO 1000 FOR 1 SECOND,2000 for 2 seconds etc... MUST
    --














  30. The Following User Says Thank You to Noxit For This Useful Post:

    reversflux (08-05-2009)

Page 1 of 3 123 LastLast

Similar Threads

  1. Replies: 28
    Last Post: 03-02-2009, 07:44 AM
  2. Video tutorial: Making WarRock hack in Visual Basic
    By Darky in forum Visual Basic Programming
    Replies: 5
    Last Post: 02-12-2009, 02:47 PM
  3. Tutorial - How to use Visual Basics 6 (vb6) for WarRock hacks
    By Oneirish in forum Visual Basic Programming
    Replies: 17
    Last Post: 05-26-2008, 07:24 AM
  4. Visual Basic 6 - Download and Install Tutorial
    By gbitz in forum WarRock - International Hacks
    Replies: 8
    Last Post: 03-05-2008, 06:05 PM
  5. [Tutorial]Visual Basic 6 Many Options Tutorial by Yogilek.
    By yogilek in forum WarRock - International Hacks
    Replies: 4
    Last Post: 10-05-2007, 07:34 AM

Tags for this Thread