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
- 이전글[vb.net] DataGridView의 CellValidating 이벤트를 활용한 셀 변경 값, 변경 이전 값을 비교하여 이벤트 처리 및 셀값 변경 취소 21.08.17
- 다음글[vb.net] DataGridView 헤더 병합 21.05.02
댓글목록
등록된 댓글이 없습니다.