2017-01-01から1年間の記事一覧
<Windowsフォーム> Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim command As String = "C:\Users\naoki\Documents\Visual Studio 2010\Projects\consoleInput1\…
Windows フォーム マルチスレッドの再考
Imports Microsoft.VisualBasic.FileIO Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click ''データテーブル Dim dt As New DataTable Dim row As DataRow ''フィールド(列)を追加 dt.Columns.…
Imports System.IOImports System.Text Public Class Form2 Private Const ERROR_MESSAGE1 = "パス名を指定してください。" Private Sub Form2_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load ' プレビューダイアログのサイズ…
Private Sub sWaitTime(ByVal st As Long) '指定の時間待つ(1/1000 秒単位で指定) Dim lngSt As Long 'システム起動後のミリ秒単位の経過時間を取得します。 'システムが 24.9 日間稼動し続けた場合、この経過時間は 0 に戻ります。 lngSt = System.Environ…
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick TimerTextBox.Text = DateTime.Now.ToString() End Sub Private Delegate Sub StartTimerDelegate() Private StartTimerThread As Threading.Thr…
Dim cnt As Long Sub Sample3(Path As String) Dim buf As String, f As Object buf = Dir(Path & "\*.xls") Do While buf <> "" cnt = cnt + 1 Cells(cnt, 1) = Path & "\" & buf buf = Dir() Loop With CreateObject("Scripting.FileSystemObject") For Ea…