Yea, Xbox 360 related. Everything else has to go in Tech Coding Tutorials or Programs. Programs isn't supposed to be for user-made stuff, and tech coding tutorials can just be added into the new forum in General.
It's relatively difficult to create a calculator with 1 textbox. I didn't learn it until grade 12, but it was rather easy since I had a year of experience. I'll upload some sources later today I made at school. They are in VB6 though.
intro in = new intro();
intro.Show(); Make it look like that. This way it won't error. If you are using namespaces in your project, don't worry about changing it.
You can kill a process in several ways, by using the process's Name, ID, Handle, MainWindowTitle, and more. The following sample will show you how to kill a process using the processes name and main window title. Error handling is provided to make sure it doesn't throw a False when it tries to kill a SYSTEM process. Public Function KillProcess(ByVal procName As String) As Boolean
For Each p As Process In Process.GetProcesses
If p.ProcessName.StartsWith(procName) Then
Try
p.Kill()
Catch
End Try
ElseIf p.MainWindowTitle.StartsWith(procName) Then
Try
p.Kill()
Catch
End Try
End If
Next
Return (True)
End Function
'Usage'
KillProcess("explorer")
Thanks for specifying what was already used above xD. But seriously, good idea pointing out that System.Diagnostics is required, unless you add it to the top of your program.
Just a thought, could we add one category above/beneath Tech Lab called iBotCoderz, and add 3 sub-forums (General, Community Releases, Code-Snipplets/Sources) Get people started in the programming world. It doesn't really need a team.
Put variables outside of all subroutines, just in the class. Where your button code is, just type: DeleteIEHistory(True) 'etc Make sure the routines are in the class. (Put them anywhere, outside other routines)
-------------
External IP
-------------
Try
Dim WC As New System.Net.WebClient
MsgBox(System.Text.Encoding.ASCII.GetString(WC.DownloadData("http://www.swlink.net/~styma/REMOTE_ADDR.shtml")))
MsgBox(System.Text.Encoding.ASCII.GetString(WC.DownloadData("http://whatismyip.com/automation/n09230945.asp")))
WC.Dispose()
Catch
'Display Error Message
End Try
-------------
Internal IP
-------------
Try
Dim ipEntry As System.Net.IPHostEntry = Net.Dns.GetHostEntry(Environment.MachineName)
Dim IpAddr As System.Net.IPAddress() = ipEntry.AddressList
MsgBox(IpAddr(0).ToString())
Catch
'Display Error Message
End Try
---------------
Address to IP
---------------
If Not T2.Text = "" Then
Try
ipE = Dns.GetHostEntry(T2.Text)
Catch
MessageBoxEx.Show("Site does not exist!", "DoS", MessageBoxButtons.OK, MessageBoxIcon.Information)
End Try
Dim IpA() As IPAddress = ipE.AddressList
TX.Text = IpA(0).ToString
End If