Click here to Skip to main content
15,896,727 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: LINQ: How To Make Order By Conditional? Pin
Alan Burkhart31-May-18 7:33
Alan Burkhart31-May-18 7:33 
QuestionWebBrowser Javascript Error handing via HtmlWindow works in IE8 mode but not in IE10 or Edge. Pin
Jeffrey Cobb26-May-18 15:55
Jeffrey Cobb26-May-18 15:55 
QuestionOutlook Mail Drag Drop into Textbox of a Win Form Pin
HPS-Software24-May-18 18:41
HPS-Software24-May-18 18:41 
AnswerRe: Outlook Mail Drag Drop into Textbox of a Win Form Pin
Richard Deeming25-May-18 2:35
mveRichard Deeming25-May-18 2:35 
GeneralRe: Outlook Mail Drag Drop into Textbox of a Win Form Pin
HPS-Software26-May-18 20:51
HPS-Software26-May-18 20:51 
GeneralRe: Outlook Mail Drag Drop into Textbox of a Win Form Pin
Eddy Vluggen26-May-18 23:05
professionalEddy Vluggen26-May-18 23:05 
GeneralRe: Outlook Mail Drag Drop into Textbox of a Win Form Pin
HPS-Software27-May-18 18:14
HPS-Software27-May-18 18:14 
QuestionSave in datagriedview in application Pin
Member 1361197220-May-18 8:13
Member 1361197220-May-18 8:13 
Hello everyone,

I created a code to save all information in datagriedview1 when I close my application but it doesn't work. Could you help me to find my error?

Imports System.IO
Imports System.Runtime.Serialization.Formatters.Binary

Public Class Form1
    <Serializable()> _
   Public Class TNode
        Public text As DataGridView
    End Class


    Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
        DataGridView1.Rows.Add(TextBox1.Text, TextBox2.Text)
    End Sub

    Private Sub Button2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button2.Click
        Dim DataGridView1 As DataView
        Dim Col As Integer
        Dim ran As Integer
        Dim contacttable As New List(Of String)
        Dim f As IO.FileStream = File.Create("enregistreContact.bin")
        Dim text As New BinaryFormatter
        Try
            For Ran = 0 To DataGridView1.Count - 1
                For Col = 0 To 2
                    text = DataGridView1.Item(Col, Ran).Value
                Next
            Next

            text.Serialize(f, contacttable)


        Catch File As Exception
            MsgBox("You must write a text!")
        End Try

        f.Close()
    End Sub
End Class

AnswerRe: Save in datagriedview in application Pin
Dave Kreskowiak20-May-18 11:40
mveDave Kreskowiak20-May-18 11:40 
GeneralRe: Save in datagriedview in application Pin
Member 1361197221-May-18 1:26
Member 1361197221-May-18 1:26 
AnswerRe: Save in datagriedview in application Pin
Richard Deeming21-May-18 2:11
mveRichard Deeming21-May-18 2:11 
GeneralRe: Save in datagriedview in application Pin
Member 1361197222-May-18 6:00
Member 1361197222-May-18 6:00 
QuestionWhat am I missing with Clone()? Pin
mo149218-May-18 13:48
mo149218-May-18 13:48 
AnswerRe: What am I missing with Clone()? Pin
Eddy Vluggen18-May-18 14:03
professionalEddy Vluggen18-May-18 14:03 
GeneralRe: What am I missing with Clone()? Pin
mo149218-May-18 14:10
mo149218-May-18 14:10 
GeneralRe: What am I missing with Clone()? Pin
Eddy Vluggen18-May-18 14:13
professionalEddy Vluggen18-May-18 14:13 
AnswerRe: What am I missing with Clone()? Pin
Richard Deeming21-May-18 2:06
mveRichard Deeming21-May-18 2:06 
QuestionHow can obtaing the filename of spool job? Pin
bGuidi7-May-18 4:59
professionalbGuidi7-May-18 4:59 
QuestionExternal Media player sdk for vb Pin
Asanka Akash Sovis5-May-18 22:27
professionalAsanka Akash Sovis5-May-18 22:27 
QuestionRe: External Media player sdk for vb Pin
Eddy Vluggen6-May-18 23:55
professionalEddy Vluggen6-May-18 23:55 
QuestionRe: External Media player sdk for vb Pin
Asanka Akash Sovis7-May-18 19:58
professionalAsanka Akash Sovis7-May-18 19:58 
AnswerRe: External Media player sdk for vb Pin
Eddy Vluggen7-May-18 22:39
professionalEddy Vluggen7-May-18 22:39 
Questionscrollable imagebox / change sizemode picturebox Pin
Michael Wild5-May-18 3:29
Michael Wild5-May-18 3:29 
QuestionHow overwrite the word after the specific word in text file... Pin
KimbleGray4-May-18 7:13
KimbleGray4-May-18 7:13 
AnswerRe: How overwrite the word after the specific word in text file... Pin
Dave Kreskowiak4-May-18 9:20
mveDave Kreskowiak4-May-18 9:20 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.