Welcome to [GHB] - GAmEhAcKbAsTaRdS Forum
- Start new topics and reply to others
- Subscribe to topics and forums to get email updates
- Get your own profile page and make new friends
- Send personal messages to other members.
Drake`
-
Posts
18 -
Joined
-
Last visited
Content Type
Profiles
Forums
Calendar
Downloads
Store
Posts posted by Drake`
-
-
this is my first signature
what do you think about it?
-
1) Open up VB ( 2008/2010 ), Open up a NEW PROJECT....
2) First of all here is all the things you need in your FORM1.
2 Buttons: 1= Connect/2=Disconnect
2 Text Boxes: 1 for Disconnect Hot key, Other for COnnect Hotkey 1
That is what it should have, and should say or if ya wanna get fancy mix it up if ya want.
3) Double click on the FORM1 name, and here is the coding part, Put this code ABOVE "Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load"
CODE=
Private Declare Function GetAsyncKeyState Lib "user32.dll" (ByVal vKey As System.Int16) As Int16 'so its x64 bit compatible
( Change user32 to user64, if thats your computer rate )
Now below the Private Sub Form1 thing, Put:
End Sub
4) Now put this code after that
CODE:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Shell("NET START DHCP") End Sub
5) That was for The Button1 ( COnnect ) Now button 2 code is:
Code:
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Shell("Net STOP DHCP") End Sub
6) See how it says Shell then net STOP, well its VB language saying when this code clicked or pushed Stop the tapper.
7) Now get your timer out (1), and double click it and put this code
CODE:
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick Dim StartHotkey As Integer StartHotkey = GetAsyncKeyState(116) If StartHotkey <> 0 Then Shell("Net STOP DHCP") End If Dim StopHotkey As Integer StopHotkey = GetAsyncKeyState(117) If StopHotkey <> 0 Then Shell("NET START DHCP") End If End Sub End Class
This is what the WHOLE code should look like in its Coding page:
( Not whole thing just the END sub's and all the lines and there should be nothing underlined = Thats an ERROR )
PRESS THANKS IF THIS HELPED!
Credits to: GrImReApEdv2.0 from ghbsys.net
- 2
-
Make a new module containing this:
Public Function ReadIniValue(ByRef INIpath As String, ByRef KEY As String, ByRef Variable As String) As String Dim NF As Short Dim Temp As String Dim LcaseTemp As String Dim ReadyToRead As Boolean AssignVariables: NF = FreeFile ReadIniValue = "" KEY = "[" & LCase(KEY) & "]" Variable = LCase(Variable) EnsureFileExists: FileOpen(NF, INIpath, OpenMode.Binary) FileClose(NF) SetAttr(INIpath, FileAttribute.Archive) LoadFile: FileOpen(NF, INIpath, OpenMode.Input) While Not EOF(NF) Temp = LineInput(NF) LcaseTemp = LCase(Temp) If InStr(LcaseTemp, "[") <> 0 Then ReadyToRead = False If LcaseTemp = KEY Then ReadyToRead = True If InStr(LcaseTemp, "[") = 0 And ReadyToRead = True Then If InStr(LcaseTemp, Variable & "=") = 1 Then ReadIniValue = Mid(Temp, 1 + Len(Variable & "=")) FileClose(NF) : Exit Function End If End If End While FileClose(NF) End Function
Now you're just going to need to add a line to the start of your program. Such as:
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load YourLabelHere.Text = ReadIniValue("C:\data.ini", "data", "Data1") 'replace yourlabelhere with a label or textbox End Sub
Now create a .ini file.
[data] data1=Whatever you want it to read //Use two backslashes for comments
As you saw before,
ReadIniValue("C:\data.ini", "data", "Data1")
Readinivalue is the command it calls with the module.
"C:\data.ini" is the .ini file that you just created. Modify the path or filename as much as you want, just make sure it's the same path as the ini you created.
"data" is the header in the .ini, such as [data].
"Data1" is the value you want it to read, such as Data1=blahblahblah.
I hope this helped! +Rep me please!
Credits to: Akisuzi from ghbsys.net
- 4
-
nice source and good job
-
-
This is my first signature
what do you think about it?
-
I do it with photoshop
Black:
White:
-
very nice chams
-
als admin gestartet wenn du win7/vista hast ?!
ja
-
wenn ich das menu öffnen will schließt sich das programm??
- 1
[TuT] How to make a Hack
in Trackmania Nations Forever
Posted
does this codes already work?