'Imports System.Windows.Forms.Form.Bounds
Imports System.Runtime.InteropServices 'これが無いと Marshal が宣言されていないとエラーになる
Public Class Form1
'WebClientフィールド
Dim downloadClient As System.Net.WebClient = Nothing
Dim SzOutput As String = New String(CChar(" "), 82)
Public Sts As Short
Public Param As String
Dim QSOData As String
Dim DataTbl(14) As String
Dim ss As String
Private sss As String = New String(CChar(" "), 256)
Private ssss As String = New String(CChar(" "), 56)
Private wstr As String = New String(CChar(" "), 56)
Private Structure Hamlog_hdb
Dim Calls As String
Dim ymd As String
Dim hhmm As String
Dim his As String
Dim my As String
Dim freq As String
Dim mode As String
Dim code As String
Dim gl As String
Dim qsl As String
Dim qra As String
Dim qth As String
Dim rmks1 As String
Dim rmks2 As String
Dim dx As String
End Structure
Private hdb() As Hamlog_hdb
Dim sd As Integer
Dim recno As Integer
Dim Vsd As Integer
Dim Vrecno As Integer
Dim f As String
Dim c As Integer
Dim hdb_dat(17) As String
Dim cc As Integer
Dim sc As Integer
Dim key_ As String
Dim get_calls As String
Dim calls_indx_rec As Integer
Dim calls_indx(1000) As String
Dim cc_mae As Integer
Dim Hamlog_dx0_path As String
Dim Hamlog_hdb_path As String
Dim Hamlog_mst_path As String
Dim calls_indx_str(1000, 15) As String 'calls_indx_rec
Dim calls_indx_str_ary(1000, 4) As String
Dim calls_indx_str_ary_buf(1000) As String
Dim calls_indx_str_ary_buf_no_dupe(1000) As String
Dim calls_indx_rec_new As Integer
Dim kj As Integer
Dim buf As String
Dim key_mae As String
Dim tmp_mae As String
Dim tmp As String
Dim mode_c As String
Dim freq_c As String
Dim mode As String
'Dim q As String
'Dim s As String
'Dim l As String
Dim q_ As String
Dim s_ As String
Dim l_ As String
Dim QSL_flag As Integer
Dim QSL_Q_moji As String
Dim QSL_S_moji As String
Dim QSL_L_moji As String
Public l_ptr As IntPtr = Me.Handle
Private Function fMidB(ByVal myString As String, _
ByVal sByt As Integer, ByVal nByt As Integer) As String
'指定バイト位置から指定バイト数分の文字列を取り出す関数
Dim sjis As System.Text.Encoding = System.Text.Encoding.GetEncoding("Shift_JIS")
Dim tempByt() As Byte = sjis.GetBytes(myString)
Dim sumByt As Integer = sjis.GetByteCount(myString)
If sByt < 0 Or nByt <= 0 Or sByt > sumByt Then Return ""
Dim strTemp As String = sjis.GetString(tempByt, 0, sByt)
If sByt > 0 And strTemp.EndsWith("・"c) Then
sByt += 1 '開始位置が漢字の中なら次(前)の文字から開始
End If
If sByt + nByt > sumByt Then '文字長より多く取得しようとした場合
nByt = sumByt - sByt '文字列の最後までの分とする
End If
fMidB = sjis.GetString(tempByt, sByt, nByt).Trim("・"c)
fMidB = fMidB.Trim(""c)
Return fMidB
End Function
Public Function fNullCut(ByRef myString As String) As String
Dim ii As Integer
ii = InStr(myString, vbNullChar)
If ii > 0 Then
fNullCut = Microsoft.VisualBasic.Strings.Left(myString, ii - 1)
Else
fNullCut = myString
End If
End Function
Private Sub Form1_Load(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
If System.IO.File.Exists(Position_ini_filename) Then 'Position_ini_filename が存在すれば
GetIniPosition_read_Hamlog() 'Form1 の位置を再現
With l_WINDOWPLACEMENT
If .rcNormalPosition.Right = 0 Then
.showCmd = showCmd_SW.SW_SHOWNORMAL
Else
l_blnRet = SetWindowPlacement(l_ptr, l_WINDOWPLACEMENT)
End If
End With
Else 'Position_ini_filename が存在しなければ
l_WINDOWPLACEMENT.Length = Marshal.SizeOf(GetType(WINDOWPLACEMENT))
With l_WINDOWPLACEMENT
.showCmd = showCmd_SW.SW_SHOWNORMAL
End With
End If
'Label1.Text = TextBox1.Height
'Label2.Text = TextBox1.Width
'Label3.Text = TextBox2.Width
Button1.Enabled = False
Button2.Enabled = False
Button3.Enabled = False
Button9.Enabled = False
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
'Vdbf_open
Label1.Text = ""
'f = "C:\Hamlog\VbNet\Hamlog.hdb"
f = Hamlog_hdb_path
sd = dbf_open(f, th)
recno = dbf_rcount(th)
dbf_close(th)
Label2.Text = recno
Vsd = Vdbf_open(f, log)
Vrecno = Vdbf_rcount(log)
Vdbf_close(log)
Label3.Text = Vrecno
sd = HamlogOpen(0, log, f, 0)
Dim fileName As String = "C:\hdb_test.csv"
Dim fileNo As Integer = FreeFile()
ReDim hdb(16)
FileOpen(fileNo, fileName, OpenMode.Output)
Dim i As Integer
Dim j As Integer
ProgressBar1.Value = 0
ProgressBar1.Minimum = 0
ProgressBar1.Maximum = recno
For i = 1 To Vrecno
c = THW_read(log, i, 2)
For j = 1 To 16
Call ThwString(sss, log, j)
ss = fNullCut(sss)
hdb_dat(j) = ss
Next j
For j = 1 To 14
Write(fileNo, hdb_dat(j))
Next j
WriteLine(fileNo, hdb_dat(16))
ProgressBar1.Value = i
Next i
Call HamlogClose(log, 0)
FileClose(fileNo)
ProgressBar1.Value = 0
Label1.Text = "終 了"
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
'idx_search
Label1.Text = ""
Dim fileName As String = "C:\index_test.csv"
Dim fileNo As Integer = FreeFile()
ReDim hdb(16)
'Hamlog_hdb_path = "C:\Hamlog\VbNet\Hamlog.hdb"
Hamlog_dx0_path = Microsoft.VisualBasic.Replace(Hamlog_hdb_path, ".hdb", ".dx0")
FileOpen(fileNo, fileName, OpenMode.Output)
Call SetDbsShare()
get_calls = "K5D"
sd = idx_open(Hamlog_dx0_path, THindx)
sc = HamlogOpen(0, log, Hamlog_hdb_path, 0)
calls_indx_rec = 0
key_ = get_calls
If Len(Microsoft.VisualBasic.Strings.Trim(key_)) < 6 Then
key_ = Microsoft.VisualBasic.Strings.Left(key_ & Space(6), 6)
End If
cc = idx_search(THindx, key_, 6)
If cc <> 0 Then
calls_indx(calls_indx_rec) = cc
calls_indx_rec = calls_indx_rec + 1
WriteLine(fileNo, cc)
End If
cc_mae = 0
Dim ij As Integer
For ij = 0 To 10000
cc = idx_next(THindx)
If cc < cc_mae Then
Exit For
Else
If cc <> 0 Then
calls_indx(calls_indx_rec) = cc
calls_indx_rec = calls_indx_rec + 1
cc_mae = cc
WriteLine(fileNo, cc)
End If
End If
Next ij
FileClose(fileNo)
calls_indx_rec_new = 0
Dim jj As Integer
Dim yj As Integer
For yj = 0 To calls_indx_rec - 1
c = THW_read(log, calls_indx(yj), 2) 'データリード
Call ThwString(sss, log, 1)
buf = fNullCut(sss)
calls_indx_str(yj, 1) = buf
If Microsoft.VisualBasic.Strings.Trim(key_) = Microsoft.VisualBasic.Strings.Trim(calls_indx_str(yj, 1)) Then
For jj = 2 To 14
Call ThwString(sss, log, jj)
buf = fNullCut(sss)
calls_indx_str(yj, jj) = buf
'calls_indx_str(yj, jj) = Replace(buf, Chr(34), Chr(34) & Chr(34))
Next jj
Select Case Val(calls_indx_str(yj, 6))
Case 1.8 To 1.913
kj = 1
Case 3.5 To 3.806
kj = 2
Case 7 To 7.21
kj = 3
Case 10 To 10.151
kj = 4
Case 14 To 14.351
kj = 5
Case 18 To 18.169
kj = 6
Case 21 To 21.451
kj = 7
Case 24 To 24.991
kj = 8
Case 28 To 29.71
kj = 9
Case 50 To 54.01
kj = 10
Case Else
kj = 99
End Select
calls_indx_str_ary(yj, 0) = Microsoft.VisualBasic.Strings.Right("0" & CStr(kj), 2) 'band
Select Case Microsoft.VisualBasic.Strings.Trim(calls_indx_str(yj, 7))
Case "CW"
mode = "CW"
Case "A1"
mode = "CW"
Case "A1A"
mode = "CW"
Case "SSB"
mode = "SSB"
Case "A3J"
mode = "SSB"
Case "J3E"
mode = "SSB"
Case "RTY"
mode = "RTTY"
Case "RTTY"
mode = "RTTY"
Case "TTY"
mode = "RTTY"
Case "F1"
mode = "RTTY"
Case "F1D"
mode = "RTTY"
Case "FSK"
mode = "RTTY"
End Select
Select Case Microsoft.VisualBasic.Strings.Trim(mode)
Case "CW"
mode_c = "01"
Case "SSB"
mode_c = "02"
Case "RTTY"
mode_c = "03"
Case Else
mode_c = "99"
End Select
calls_indx_str_ary(yj, 1) = mode_c
q_ = Microsoft.VisualBasic.Strings.Left(Microsoft.VisualBasic.Strings.Left(calls_indx_str(yj, 10) & " ", 3), 1)
s_ = Microsoft.VisualBasic.Strings.Mid(Microsoft.VisualBasic.Strings.Left(calls_indx_str(yj, 10) & " ", 3), 2, 1)
l_ = Microsoft.VisualBasic.Strings.Right(Microsoft.VisualBasic.Strings.Left(calls_indx_str(yj, 10) & " ", 3), 1)
QSL_flag = 0
If QSL_Q_moji <> "" Then
If InStr(QSL_Q_moji, q_) > 0 Then
QSL_flag = QSL_flag + 1
End If
End If
If QSL_S_moji <> "" Then
If InStr(QSL_S_moji, s_) > 0 Then
QSL_flag = QSL_flag + 1
End If
End If
If QSL_L_moji <> "" Then
If InStr(QSL_L_moji, l_) > 0 Then
QSL_flag = QSL_flag + 1
End If
End If
If InStr(freq_c, "/") > 0 Then
freq_c = "160" '144/430 SAT は除外する
End If
If QSL_flag = 0 And kj < 90 And Val(mode_c) < 90 Then
If Microsoft.VisualBasic.Strings.Trim(l_) = "" Then
calls_indx_str_ary(yj, 2) = "0"
Else
calls_indx_str_ary(yj, 2) = "1"
End If
calls_indx_str_ary_buf(calls_indx_rec_new) = calls_indx_str_ary(yj, 0) & calls_indx_str_ary(yj, 1) & calls_indx_str_ary(yj, 2)
calls_indx_rec_new = calls_indx_rec_new + 1
End If
End If
Next yj
'配列のバブルソート
Dim ik As Integer
Dim jk As Integer
For ik = 0 To calls_indx_rec_new - 1
For jk = ik + 1 To calls_indx_rec_new
If calls_indx_str_ary_buf(ik) > calls_indx_str_ary_buf(jk) Then
buf = calls_indx_str_ary_buf(ik)
calls_indx_str_ary_buf(ik) = calls_indx_str_ary_buf(jk)
calls_indx_str_ary_buf(jk) = buf
End If
Next jk
Next ik
'配列の重複削除
tmp_mae = calls_indx_str_ary_buf(1)
key_mae = Microsoft.VisualBasic.Strings.Left(calls_indx_str_ary_buf(1), 9)
calls_indx_str_ary_buf_no_dupe(1) = tmp_mae
Dim kk As Integer
For kk = 2 To calls_indx_rec_new
tmp_mae = calls_indx_str_ary_buf(kk)
key_mae = Microsoft.VisualBasic.Strings.Left(calls_indx_str_ary_buf(kk), 9)
If key_mae = key_ Then
Else
calls_indx_str_ary_buf_no_dupe(kk) = tmp_mae
End If
key_mae = key_
tmp_mae = tmp
Next kk
calls_indx_str_ary_buf_no_dupe(kk) = tmp_mae
' 1 calls
' 6 band
' 7 mode
' 8 code
'10 QSL
Dim fileName2 As String = "C:\index_test2.csv"
Dim fileNo2 As Integer = FreeFile()
'書き込みの内容 : 02011 => band,mode,wkd/cfm
FileOpen(fileNo2, fileName2, OpenMode.Output)
For kk = 1 To calls_indx_rec_new
WriteLine(fileNo2, calls_indx_str_ary_buf_no_dupe(kk))
Next kk
Call HamlogClose(log, 0)
Call idx_close(THindx)
FileClose(fileNo2)
Label1.Text = "終 了"
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
'Hamlog.MST 読み込み
'出力 OK 2009.07.22
Label1.Text = ""
Dim out_rec As Integer
Dim tmp1 As String
Dim tmp2 As String
Dim tmp3 As String
Dim tmp4 As String
Dim fileName3 As String = "C:\master_test3.csv"
Dim fileNo3 As Integer = FreeFile()
FileOpen(fileNo3, fileName3, OpenMode.Output)
Dim fileName4 As String = "C:\master_test4.csv"
Dim fileNo4 As Integer = FreeFile()
FileOpen(fileNo4, fileName4, OpenMode.Output)
'Hamlog_mst_path = "C:\Hamlog\VbNet\Hamlog.mst"
Hamlog_mst_path = Microsoft.VisualBasic.Replace(Hamlog_hdb_path, ".hdb", ".mst")
Call dbf_open(Hamlog_mst_path, th)
sd = dbf_rcount(th)
out_rec = 0
Dim ik As Integer
Dim ii As Integer
Dim i As Integer
For ii = 1 To sd
tmp1 = ""
tmp2 = ""
tmp3 = ""
tmp4 = ""
sd = dbf_read(th, ii, ssss) ' OK 01001 北海道阿寒郡 5あ8
tmp1 = fNullCut(ssss) ' OK
ik = Microsoft.VisualBasic.Strings.Len(TJccgMas_)
Call MoveMemory(TJccgMas_, ssss, ik)
Call Wget_bit(wstr, TJccgMas_)
tmp1 = fMidB(tmp1 & Space(40), 0, 40)
tmp2 = fNullCut(wstr)
For i = 1 To 16
tmp3 = tmp3 & " " & Microsoft.VisualBasic.Strings.Mid(tmp2, i, 1)
Next i
Write(fileNo3, tmp1)
WriteLine(fileNo3, tmp3)
tmp4 = tmp1 & tmp3
WriteLine(fileNo4, tmp4)
out_rec = out_rec + 1
Next ii
Call dbf_close(th)
FileClose(fileNo3)
FileClose(fileNo4)
Label1.Text = "マスターファイル出力終了"
End Sub
Private Sub Button4_Click(ByVal sender As Object, _
ByVal e As EventArgs) Handles Button4.Click
Label1.Text = ""
Button1.Enabled = False
Button2.Enabled = True
'ダウンロードしたファイルの保存先
Dim fileName As String = "C:\hm\test.html"
'ダウンロード基のURL
Dim u As New Uri("http://www.hamlog.com/main.html")
'WebClientの作成
If downloadClient Is Nothing Then
downloadClient = New System.Net.WebClient()
'イベントハンドラの作成
AddHandler downloadClient.DownloadProgressChanged, _
AddressOf downloadClient_DownloadProgressChanged
AddHandler downloadClient.DownloadFileCompleted, _
AddressOf downloadClient_DownloadFileCompleted
End If
'非同期ダウンロードを開始する
downloadClient.DownloadFileAsync(u, fileName)
End Sub
Private Sub Button5_Click(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles Button5.Click
'非同期ダウンロードをキャンセルする
Label1.Text = ""
If Not (downloadClient Is Nothing) Then
downloadClient.CancelAsync()
End If
End Sub
Private Sub downloadClient_DownloadProgressChanged(ByVal sender As Object, _
ByVal e As System.Net.DownloadProgressChangedEventArgs)
Console.WriteLine( _
"{0}% ({1}byte 中 {2}byte) ダウンロードが終了しました。", _
e.ProgressPercentage, e.TotalBytesToReceive, e.BytesReceived)
End Sub
Private Sub downloadClient_DownloadFileCompleted(ByVal sender As Object, _
ByVal e As System.ComponentModel.AsyncCompletedEventArgs)
If Not (e.Error Is Nothing) Then
Console.WriteLine("エラー:{0}", e.Error.Message)
Else
If e.Cancelled Then
Console.WriteLine("キャンセルされました。")
Else
Console.WriteLine("ダウンロードが完了しました。")
End If
End If
Button1.Enabled = True
Button2.Enabled = False
End Sub
Public Sub sort_()
Do
System.Windows.Forms.Application.DoEvents()
Sts = ksort(Param, SzOutput)
If Sts <> 7000 Then
Exit Do
End If
Loop
End Sub
Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click
Dim drive_path As String
Label1.Text = ""
drive_path = "C:\"
'ソート元のファイルの各行のバイト数は同じになっていること。
Param = "/k(2:6) /r '" & drive_path & "master_test2.csv' " & drive_path & "master_test02.csv'"
sort_()
End Sub
Private Sub write_ini_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles write_ini.Click
'ini ファイル書き込みテスト
Label1.Text = ""
var = "0.02"
calls = "JA2BQX"
qth = "Fujieda"
write_ini_sub()
End Sub
Private Sub read_ini_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles read_ini.Click
'ini ファイル読み込みテスト
Label1.Text = ""
read_ini_sub()
MsgBox("test.iniの内容=" & get_var & vbCrLf & calls & vbCrLf & qth)
End Sub
Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click
'Exit 処理
Label1.Text = ""
'Dim fileName5 As String = "C:\master_test5.csv"
'Dim fileNo5 As Integer = FreeFile()
'FileOpen(fileNo5, fileName5, OpenMode.Output)
'With l_WINDOWPLACEMENT.rcNormalPosition 'Form1 の位置情報を取得
'WriteLine(fileNo5, .Left)
'WriteLine(fileNo5, .Top)
'WriteLine(fileNo5, .Right)
'WriteLine(fileNo5, .Bottom)
'End With
'FileClose(fileNo5)
PutIniPosition_read_Hamlog() 'Form1 の位置を保存
Me.Close()
End Sub
Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button8.Click
Label1.Text = ""
Form2.Show()
Me.Hide()
End Sub
Private Sub Button9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button9.Click
'QSO データの追加
Label1.Text = ""
Dim strTemp() As String
tmp = "OH0Z,09/07/28,08:18U,599,599,10.140,RTTY,680A , ,M ,,Aland Is.,QSX=10145,@OH2TA,8"
strTemp = Split(tmp, ",")
'f = "C:\Hamlog\VbNet\Hamlog.hdb"
f = Hamlog_hdb_path
sd = HamlogOpen(0, log, f, 0)
'下記で正常終了する
'For d As Integer = 0 To 13
'Call SetThBuffer(log, strTemp(d), d + 1)
'Next
'Call SetThBuffer(log, strTemp(14), 16)
'下記で正常終了する JA1RNR
For d As Integer = 0 To 14
QSOData = strTemp(d)
SetThBuffer(log, QSOData, d + 1)
Next
THW_append(log, IsQSOdata, 0)
Call HamlogClose(log, 0)
Label1.Text = "終 了"
End Sub
Private Sub Button10_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button10.Click
'ADOを使ってCSV用ファイルをMSHFlexGridに表示する
Dim CN As New ADODB.Connection, RS As New ADODB.Recordset
Dim FolderName As String, txtDRIVER As String
Dim DataFile As String, strSQL As String
Dim strProvider As String
AxMSHFlexGrid1.FixedCols = 0
Label1.Text = ""
Dim fileName As String = "C:\hdb_test.csv"
FolderName = "C:\" 'データのあるフォルダを取得
DataFile = "hdb_test.csv" 'データファイル名を取得
'データベースに接続するための情報を設定する
strProvider = "Provider=MSDASQL;Extended Properties="""
txtDRIVER = "DRIVER={Microsoft Text Driver (*.txt; *.csv)};DBQ="
CN.ConnectionString = strProvider & txtDRIVER & FolderName & """"
CN.Open() 'コネクションをオープン
'Recordsetオブジェクトのオープン
strSQL = "Select * From " & DataFile
RS.Open(strSQL, CN, ADODB.CursorTypeEnum.adOpenStatic, _
ADODB.LockTypeEnum.adLockReadOnly)
AxMSHFlexGrid1.DataSource = RS 'MSHFlexGridにデータを代入
'Recordset・Connection を閉じる
RS.Close()
CN.Close()
'参照を解放。
System.Runtime.InteropServices.Marshal.ReleaseComObject(RS)
RS = Nothing
System.Runtime.InteropServices.Marshal.ReleaseComObject(CN)
CN = Nothing
' AxMSHFlexGrid1.FixedRows = 0 '項目行が不要の場合
Label1.Text = "終 了"
End Sub
Private Sub Button10_Click_(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button10.Click
'CSV を MSHFlexGrid に表示
'With MSHierarchicalFlexGridLib
'.set_TextMatrix(1, 1, "書込")
'get_TextMatrix(1, 1))
'AxMSHFlexGrid1.Col = 2
'AxMSHFlexGrid1.Row = 3
'AxMSHFlexGrid1.Text = "色の設定"
''指定のセルのフォアーカラーを設定
'AxMSHFlexGrid1.CellForeColor = Color.Wheat
''指定のセルのバックカラーを設定
'AxMSHFlexGrid1.CellBackColor = Color.Red
Label1.Text = ""
'f = "C:\Hamlog\VbNet\Hamlog.hdb"
f = Hamlog_hdb_path
sd = dbf_open(f, th)
recno = dbf_rcount(th)
dbf_close(th)
Label2.Text = recno
Vsd = Vdbf_open(f, log)
Vrecno = Vdbf_rcount(log)
Vdbf_close(log)
Label3.Text = Vrecno
' .Rows = Vrecno
' .Cols = 16
' .set_ColWidth(1, 500)
sd = HamlogOpen(0, log, f, 0)
ReDim hdb(16)
Dim i As Integer
Dim j As Integer
ProgressBar1.Value = 0
ProgressBar1.Minimum = 0
ProgressBar1.Maximum = recno
For i = 1 To recno
'.set_TextMatrix(i, 1, i)
c = THW_read(log, i, 2)
For j = 1 To 16
Call ThwString(sss, log, j)
ss = fNullCut(sss)
hdb_dat(j) = ss
Next j
For j = 1 To 14
' .set_TextMatrix(i, j, hdb_dat(j))
Next j
' .set_TextMatrix(i, 15, hdb_dat(16))
ProgressBar1.Value = i
Next i
Call HamlogClose(log, 0)
ProgressBar1.Value = 0
Label1.Text = "終 了"
'End With
End Sub
Private Sub Button11_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button11.Click
'入力ファイル Hamlog.hdb
Dim openFileDialog1 As New OpenFileDialog
With openFileDialog1
'起動ディレクトリを設定
.InitialDirectory = "c:\"
'[ファイルの種類] ボックスに表示される選択肢を設定する
.Filter = "Hamlog.hdb files (*.hdb)|*.hdb"
'最初に表示するフィルタ処理オプションを設定する
.FilterIndex = 1
'ダイアログ ボックスを閉じる前に、現在のディレクトリを復元する
.RestoreDirectory = True
'ダイアログ ボックスを表示 [開く]ボタンが押されたら
If openFileDialog1.ShowDialog() = DialogResult.OK Then
''選択したファイルのパスを取得
in_filename.Text = openFileDialog1.FileName
Hamlog_hdb_path = openFileDialog1.FileName
End If
End With
Button1.Enabled = True
Button2.Enabled = True
Button3.Enabled = True
Button9.Enabled = True
End Sub
End Class