I have decided to release some of my source codes that may be helpful to some people.
This isn't the BIG source codes that the pros at visual basics have to use, but it's basic codes, with some tutorials on using them:
Key:
Source Name
Explanation
Other
Conclusion
Hotkeys:
Put this under form1:
Code:
Public Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer
And put this in the Timer1:
Code:
If getasynckeystate(Keys.F11) Then
Command here
End If
Change the Keys.F11 to any other hotkey, example:
Deleting Files:
Put this under Button1:
Code:
Dim Targetfile As String
That is what makes Targetfile (The file location) an available code, that wont give an error when used, but this will give it's self an error, so you will need this:
Code:
Targetfile = "C:\Documents and Settings\All Users"
Notice, it says "Targetfile = " , This means that the code we used above the code above the code that's above us has a meaning now, and wont give any errors. Now if you want to make it so people can edit what to delete, then change the part where it says: "C:\Documents and Settings\All Users", to this:
Code:
Targetfile = "C:\" + TextBox1.Text)
So now we have shortened it to the user's choice, as long as it is in the C drive.
Now, to kill the file, we want to use this:
That now gives Targetfile a job, which is to delete what it is replacing.
I will edit this list as I find more of my source codes that I forgot the location to.
And here just a simple source code that has nothing to do with what I previously said, as this is only something that people may want to use:
It is a video converter source code, that may not work on .mp3, or turning it into music.:
Code:
Button 1 (The open file button)
Selectvid.showdialog()
Button2 (The convert button)
Dim type As String = ComboBox1.Text
If ComboBox1.Text = "" Then
MsgBox("No file type selected")
Else
End If
MsgBox(TextBox1.Text + " shall be converted into a " + type + " file.")
Dim oldFile As String = Mid(TextBox1.Text, 1, Len(TextBox1.Text) - 4)
FileCopy(TextBox1.Text, oldFile + type)
SelectVid(The openfiledialog)
Dim file As String = SelectVid.FileName
TextBox1.Text = file
If you need any help, like with error codes (That aren't related to this), just PM me.
But if you need help with error codes that come from the codes I just gave you, then please post here telling me what the error is (Like what is underlined red/blue/green, or what is highlighted yellow when debugging, etc), and What your error log says (Usually located on the bottom of Visual Basics)