Click here to Skip to main content
15,888,968 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
AnswerRe: Re-Full Text Search Pin
Richard MacCutchan30-Mar-15 2:34
mveRichard MacCutchan30-Mar-15 2:34 
AnswerRe: Re-Full Text Search Pin
Eddy Vluggen30-Mar-15 3:10
professionalEddy Vluggen30-Mar-15 3:10 
AnswerRe: Re-Full Text Search Pin
ZurdoDev30-Mar-15 4:45
professionalZurdoDev30-Mar-15 4:45 
QuestionRe-Index Pin
Member 1116162530-Mar-15 1:50
Member 1116162530-Mar-15 1:50 
AnswerRe: Re-Index Pin
ZurdoDev30-Mar-15 4:44
professionalZurdoDev30-Mar-15 4:44 
Questioni have just in time debugging problem Pin
rafizan4629-Mar-15 23:01
rafizan4629-Mar-15 23:01 
QuestionRe: i have just in time debugging problem Pin
Richard MacCutchan29-Mar-15 23:10
mveRichard MacCutchan29-Mar-15 23:10 
AnswerRe: i have just in time debugging problem Pin
rafizan4629-Mar-15 23:19
rafizan4629-Mar-15 23:19 
this is my code..

Imports System.Runtime.InteropServices
Imports Microsoft.VisualBasic
Imports System.Diagnostics
Imports System.Management
Imports System
Imports System.Data
Imports System.Data.SqlClient
Imports Microsoft.VisualBasic.Devices
Imports System.Net.NetworkInformation
Imports System.Net
Imports System.Text
Imports System.ComponentModel


Public Class Form1
Inherits System.Windows.Forms.Form
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Timer1.Start()
End Sub



<System.Diagnostics.DebuggerNonUserCode()> _
Private Sub me_load(ByVal disposing As Boolean)
Try
If disposing AndAlso components IsNot Nothing Then
components.Dispose()
End If
Finally
MyBase.Dispose(disposing)
End Try
End Sub
Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
ProgressBar1.Value = PerformanceCounter1.NextValue
ProgressBar2.Value = PerformanceCounter2.NextValue
Label3.Text = ProgressBar1.Value.ToString + "%"
Label4.Text = ProgressBar2.Value.ToString + "%"
End Sub

Private WithEvents MyProcess As Process
Private Delegate Sub AppendOutputTextDelegate(ByVal text As String)

Private Sub TextBox1_TextChanged(sender As Object, e As EventArgs) Handles MyBase.Load
TextBox1.Text = System.Environment.MachineName
End Sub

Private Sub TextBox2_TextChanged(sender As Object, e As EventArgs) Handles MyBase.Load
TextBox2.Text = System.Environment.UserName
End Sub

Private Sub TextBox3_TextChanged(sender As Object, e As EventArgs) Handles MyBase.Load
TextBox3.Text = My.Computer.Info.OSFullName
End Sub

Private Sub TextBox4_TextChanged(sender As Object, e As EventArgs) Handles MyBase.Load
TextBox4.Text = My.Computer.Info.OSPlatform
End Sub

Private Sub TextBox5_TextChanged(sender As Object, e As EventArgs) Handles MyBase.Load
TextBox5.Text = My.Computer.Info.OSVersion
End Sub

Private Sub TextBox6_TextChanged(sender As Object, e As EventArgs) Handles MyBase.Load
TextBox6.Text = My.Computer.Info.InstalledUICulture.ToString
End Sub

Private Sub TextBox7_TextChanged(sender As Object, e As EventArgs) Handles MyBase.Load
TextBox7.Text = System.Math.Round(My.Computer.Info.TotalPhysicalMemory / (1024 * 1024)).ToString
End Sub

Private Sub Label15_Click(sender As Object, e As EventArgs) Handles MyBase.Load
Timer2.Start()
End Sub

Private Sub Timer2_Tick(sender As Object, e As EventArgs) Handles Timer2.Tick
Label15.Text = TimeOfDay
End Sub

Private Sub TextBox13_TextChanged(sender As Object, e As EventArgs) Handles Timer1.Tick
TextBox13.Text = (" " & getBatteryStatus() + vbOKOnly)

End Sub

Public Function getBatteryStatus() As Integer
Dim obj As Object, obj2 As Object, stat As Integer
' Get Battery Status
' Return Value Meaning
'0 No battery
'1 The battery is discharging.
'2 The system has access to AC so no battery is being discharged. However, the battery is not necessarily charging.
'3 Fully Charged
'4 Low
'5 Critical
'6 Charging
'7 Charging and High
'8 Charging and Low
'9 Charging and Critical
'10 Undefined
'11 Partially Charged
stat = 0
obj = GetObject("winmgmts:").InstancesOf("Win32_Battery")
For Each obj2 In obj 'loop in objects
stat = obj2.BatteryStatus
Next
getBatteryStatus = stat
End Function

Private Sub TextBox9_TextChanged(sender As Object, e As EventArgs) Handles MyBase.Load
TextBox9.Text = My.Computer.FileSystem.GetDriveInfo("C:\").TotalSize \ 1000000000 & " GB"
End Sub

Private Sub TextBox10_TextChanged(sender As Object, e As EventArgs) Handles MyBase.Load
TextBox10.Text = My.Computer.FileSystem.GetDriveInfo("C:\").TotalFreeSpace \ 1000000000 & " GB"
End Sub

Private Sub TextBox11_TextChanged(sender As Object, e As EventArgs) Handles MyBase.Load
TextBox11.Text = My.Computer.FileSystem.GetDriveInfo("D:\").TotalSize \ 1000000000 & " GB"
End Sub

Private Sub TextBox12_TextChanged(sender As Object, e As EventArgs) Handles MyBase.Load
TextBox12.Text = My.Computer.FileSystem.GetDriveInfo("D:\").TotalFreeSpace \ 1000000000 & " GB"
End Sub

Private Sub TextBox14_TextChanged(sender As Object, e As EventArgs) Handles MyBase.Load
TextBox14.Text = My.Computer.Registry.GetValue("HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\CentralProcessor\0", "ProcessorNameString", Nothing)
End Sub

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Process.Start("https://www.facebook.com/Land.RoverF")
End Sub


Private Sub CheckForUpdates()

Dim request As System.Net.HttpWebRequest = System.Net.HttpWebRequest.Create("https://dl.dropbox.com/s/02c0p66bqihq79z/version.txt.txt?dl=0")
Dim response As System.Net.HttpWebResponse = request.GetResponse()

Dim sr As System.IO.StreamReader = New System.IO.StreamReader(response.GetResponseStream())

Dim newestversion As String = sr.ReadToEnd()
Dim currentversion As String = Application.ProductVersion
If newestversion > currentversion Then
MsgBox("There is a new update..")
System.Diagnostics.Process.Start("https://www.dropbox.com/s/mbshbyd582zrcuc/SYSINFO%20V.2.0.exe?dl=0")
Else
MsgBox("Update is the latest..")
End If
End Sub
Private Sub button3_click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Dim proc = Process.GetProcessesByName("explorer")
For i As Integer = 0 To proc.Count - 1
proc(i).Kill()
Next i
End Sub

Private Sub outputtextbox_text(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.AcceptButton = ExecuteButton
MyProcess = New Process
With MyProcess.StartInfo
.FileName = "CMD.EXE"
.UseShellExecute = False
.CreateNoWindow = True
.RedirectStandardInput = True
.RedirectStandardOutput = True
.RedirectStandardError = True
End With
MyProcess.Start()

MyProcess.BeginErrorReadLine()
MyProcess.BeginOutputReadLine()
AppendOutputText("Process Started at: " & MyProcess.StartTime.ToString)
End Sub

Private Sub MyProcess_ErrorDataReceived(ByVal sender As Object, ByVal e As System.Diagnostics.DataReceivedEventArgs) Handles MyProcess.ErrorDataReceived
AppendOutputText(vbCrLf & "Error: " & e.Data)
End Sub

Private Sub MyProcess_OutputDataReceived(ByVal sender As Object, ByVal e As System.Diagnostics.DataReceivedEventArgs) Handles MyProcess.OutputDataReceived
AppendOutputText(vbCrLf & e.Data)
End Sub

Private Sub ExecuteButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ExecuteButton.Click
MyProcess.StandardInput.WriteLine(InputTextbox.Text)
MyProcess.StandardInput.Flush()
InputTextbox.Text = ""
End Sub

Private Sub AppendOutputText(ByVal text As String)
If OutputTextbox.InvokeRequired Then
Dim myDelegate As New AppendOutputTextDelegate(AddressOf AppendOutputText)
Me.Invoke(myDelegate, text)
Else
OutputTextbox.AppendText(text)
End If
End Sub

Private Sub ExecuteButton_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles ExecuteButton.MouseHover

End Sub


Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
MyProcess.StandardInput.WriteLine("systeminfo", "/k systeminfo ")
MyProcess.StandardInput.Flush()

End Sub

Private Sub ABOUTToolStripMenuItem1_Click(sender As Object, e As EventArgs) Handles ABOUTToolStripMenuItem1.Click
MsgBox("This software still in BETA Version. All Right Reserved. rafizan46 Corporation. 2015.")
End Sub

Private Sub CHECKUPDATESToolStripMenuItem1_Click(sender As Object, e As EventArgs) Handles CHECKUPDATESToolStripMenuItem1.Click
CheckForUpdates()
End Sub

Private Sub SLEEPToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles SLEEPToolStripMenuItem.Click
Shell("shutdown -l")
End Sub

Private Sub RESTARTToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles RESTARTToolStripMenuItem.Click
Shell("shutdown -r")
End Sub

Private Sub SHUTDOWNToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles SHUTDOWNToolStripMenuItem.Click
Shell("shutdown -s")
End Sub


Private Sub AlertStringDownloaded(ByVal sender As Object, ByVal e As DownloadStringCompletedEventArgs)
' Did the request go as planned (no cancellation or error)?
If e.Cancelled = False AndAlso e.Error Is Nothing Then
' Do something with the result here
'e.Result
End If
End Sub

Dim WithEvents client As New WebClient

Private Sub DirectX9ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DirectX9ToolStripMenuItem.Click
Try
client.DownloadFileAsync(New Uri("https://dl.dropboxusercontent.com/s/cn3q0u70ds57x4r/Direct%20X%2011%20Update.rar?dl=0"), "C:\Documents and Settings\All Users\Documents\Direct X 11 Update.RAR")
Catch ex As Exception
MsgBox("File already exists or is corrupted!")
End Try
End Sub

Private Sub client_DownloadFileCompleted(sender As Object, e As AsyncCompletedEventArgs) Handles client.DownloadFileCompleted
MsgBox("Download Complete!", MsgBoxStyle.Information)
Label48.Visible = False
Label49.Visible = False
ProgressBar3.Visible = False
Label48.Text = "0 &"
Label49.Text = "0 / 0"
ProgressBar3.Value = 0
End Sub

Private Sub client_DownloadProgressChanged(sender As Object, e As DownloadProgressChangedEventArgs) Handles client.DownloadProgressChanged
Label48.Visible = True
Label49.Visible = True
ProgressBar3.Visible = True
Label48.Text = ProgressBar3.Value & "%"
Label49.Text = e.BytesReceived & " / " & e.TotalBytesToReceive
ProgressBar3.Value = e.ProgressPercentage

End Sub
Private Sub GeForceExperienceV2000ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles GeForceExperienceV2000ToolStripMenuItem.Click

Try
client.DownloadFileAsync(New Uri("https://dl.dropboxusercontent.com/s/apd4kq76v1xqpwi/GeForce_Experience_v2.2.2.0.exe?dl=0"), "C:\Documents and Settings\All Users\Documents\GeForce_Experience_v2.2.2.0.exe")
Catch ex As Exception
MsgBox("File already exists or is corrupted!")
End Try
End Sub

Private Sub ABOUTTHISPARTToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles ABOUTTHISPARTToolStripMenuItem.Click
MsgBox("This 'Software' section require internet connection to work.")
MsgBox("This part still in BETA.")
MsgBox("All downloaded file will be placed on directory C:\All Users\Documents\")
MsgBox("For every completed download, a message box will appear that tell you download has completed.")
End Sub
End Class
QuestionRe: i have just in time debugging problem Pin
Richard MacCutchan29-Mar-15 23:25
mveRichard MacCutchan29-Mar-15 23:25 
AnswerRe: i have just in time debugging problem Pin
rafizan4629-Mar-15 23:28
rafizan4629-Mar-15 23:28 
GeneralRe: i have just in time debugging problem Pin
Richard Deeming30-Mar-15 2:13
mveRichard Deeming30-Mar-15 2:13 
GeneralRe: i have just in time debugging problem Pin
rafizan4630-Mar-15 9:17
rafizan4630-Mar-15 9:17 
Questionhow to adjust the size of drawn rectangle at runtime Pin
Member 1144146829-Mar-15 20:12
Member 1144146829-Mar-15 20:12 
AnswerRe: how to adjust the size of drawn rectangle at runtime Pin
Richard MacCutchan29-Mar-15 21:12
mveRichard MacCutchan29-Mar-15 21:12 
QuestionLooking for a thorough Iron Python tutorial. Pin
Brady Kelly24-Mar-15 23:14
Brady Kelly24-Mar-15 23:14 
AnswerRe: Looking for a thorough Iron Python tutorial. Pin
Richard MacCutchan25-Mar-15 1:59
mveRichard MacCutchan25-Mar-15 1:59 
GeneralRe: Looking for a thorough Iron Python tutorial. Pin
Brady Kelly25-Mar-15 2:05
Brady Kelly25-Mar-15 2:05 
QuestionOOPS Concepts Pin
ravitejapuladas24-Mar-15 21:35
ravitejapuladas24-Mar-15 21:35 
AnswerRe: OOPS Concepts Pin
Richard MacCutchan24-Mar-15 21:57
mveRichard MacCutchan24-Mar-15 21:57 
GeneralRe: OOPS Concepts Pin
ravitejapuladas24-Mar-15 22:01
ravitejapuladas24-Mar-15 22:01 
GeneralRe: OOPS Concepts Pin
Richard MacCutchan24-Mar-15 22:48
mveRichard MacCutchan24-Mar-15 22:48 
GeneralRe: OOPS Concepts Pin
ravitejapuladas24-Mar-15 23:45
ravitejapuladas24-Mar-15 23:45 
GeneralRe: OOPS Concepts Pin
Richard MacCutchan25-Mar-15 1:54
mveRichard MacCutchan25-Mar-15 1:54 
GeneralRe: OOPS Concepts Pin
PIEBALDconsult27-Mar-15 15:53
mvePIEBALDconsult27-Mar-15 15:53 
QuestionWhat Is Different Between WCF and Web API? Pin
Er. Pradeep Kumar Rai19-Mar-15 19:29
Er. Pradeep Kumar Rai19-Mar-15 19:29 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.