Controls [vb.net] SaveFileDialog 예제
페이지 정보
본문
<Obsolete>
Private Sub button13_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button13.Click
Dim myStream As Stream
Dim saveFileDialog1 As SaveFileDialog = New SaveFileDialog()
saveFileDialog1.Filter = "txt files (*.txt)|*.txt|All files (*.*)|*.*"
saveFileDialog1.FilterIndex = 2
saveFileDialog1.RestoreDirectory = True
If saveFileDialog1.ShowDialog() = DialogResult.OK Then
If (IT_HUB_TemClass.checked(myStream, saveFileDialog1.OpenFile())) IsNot Nothing Then
Dim byteData() As Byte
byteData = Encoding.ASCII.GetBytes(Clipboard.GetText)
'myStream = New FileStream("streamtest.txt", FileMode.Append)
myStream.Write(byteData, 0, byteData.Length)
myStream.Close()
End If
End If
End Sub
Private Class IT_HUB_TemClass
<Obsolete("Please refactor calling code to use normal Visual Basic assignment")>
Shared Function checked(Of T)(ByRef target As T, value As T) As T
target = value
Return value
End Function
End Class
- 이전글[C#/VB.NET] Microsoft.Jet.OLEDB.4.0 공급자는 로컬 컴퓨터에 등록할 수 없습니다 21.06.04
- 다음글[vb.net] FileStream 21.06.04
댓글목록
등록된 댓글이 없습니다.