본문 바로가기

전체 글202

PC 1시간뒤 자동 종료되게 하기 Public Class frmShutDown Private Target As DateTime Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click Button1.Enabled = False Target = DateTime.Now.AddHours(1) Timer1.Interval = 1000 Timer1.Start() End Sub Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick Dim TS As TimeSpan = Target.Subtract(DateTime.Now) Label1.Text = TS.ToString("hh\:.. 2018. 5. 11.
datagridview에서 선택한 Row의 Cell 값 가져오기 DataGridView1.Rows(e.RowIndex).Cells(0).Value 2018. 5. 9.
폴더, 파일 존재여부 확인 #Region "폴더, 파일 존재 여부 확인 함수" ' /폴더 존재 여부 확인 함수/ Public Shared Function dir_exist(path As String) As Boolean If Directory.Exists(path) = True Then Return True Else Return False End If End Function ' /파일 존재 여부 확인 함수/ Public Shared Function File_exist(path As String) As Boolean If File.Exists(path) = True Then Return True Else Return False End If End Function #End Region 2018. 5. 3.
레지스트리 하위키 값 검색 Imports System Imports Microsoft.Win32 Imports System.Threading Public Class Form1 Inherits System.Windows.Forms.Form Public Shared ProcessThread As Thread Dim Path As String = "System\\ControlSet001\\Control\\Network\\" Dim SearchStr As String = "Name = Local Area Connection" Public Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click ProcessThread.. 2018. 4. 27.