VB.NET質問スレ(Part30)
■ このスレッドは過去ログ倉庫に格納されています
0598デフォルトの名無しさん
2009/07/23(木) 09:06:09Public Class Form1
Private sw As System.IO.StreamWriter
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Try
sw = New System.IO.StreamWriter("\\共有PC\共有フォルダ\lockfile.txt", False, System.Text.Encoding.GetEncoding(932))
Catch ex As Exception
MsgBox("他の人が使ってますお")
Application.Exit()
End Try
End Sub
Private Sub Form1_FormClosed(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosedEventArgs) Handles Me.FormClosed
Try
sw.Close()
Catch ex As Exception
End Try
End Sub
End Class
■ このスレッドは過去ログ倉庫に格納されています