oussama_1 39 Posting Whiz in Training

set timer to minutes : timer.Interval = 60000
on button click event put timer.start
in timer1_tick event each tick is a 1 minute so count the minutes
count = count + 1 and if count == 2 then alert and stop timer (timer.stop).
good luck

oussama_1 39 Posting Whiz in Training
Imports System.Data.OleDb

Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        'Change Tablename,Access Full path,Password
        Dim CN As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;" & "Data Source='" & "Access Full Path" & "';" & "Persist Security Info=False;" & "Jet OLEDB:Database Password=" & "your pass" & ";")
        Dim cmd As OleDbCommand
        Dim dr As OleDbDataReader
        Try
            CN.Open()
            cmd = New OleDbCommand("SELECT *  from TABLENAME WHERE ID=" & ID.Text & "", CN)
            dr = cmd.ExecuteReader
            If dr.Read Then
                form2.ID.Text = dr("ID")
                form2.Age.Text = dr("Age")
                form2.Sex.Text = dr("Sex")
                form2.Name.Text = dr("Name")
                form2.show()
            Else
                MsgBox("No Such Account")
            End If
        Catch
        End Try
        dr.Close()
        CN.Close()
    End Sub
End Class
oussama_1 39 Posting Whiz in Training

are you handling your error by
Try
Catch
End Try ?

oussama_1 39 Posting Whiz in Training
        Dim sum As Integer = 0
        For i = 0 To DataGrid.Rows.Count - 1
            sum = sum + DataGridView1.Rows(i).Cells(4).Value
        Next

as for the second question i didnt understand it, can you explain more?

oussama_1 39 Posting Whiz in Training

how about thread.sleep(TIME)

oussama_1 39 Posting Whiz in Training

you should chnage the statment(Oledb command) like "DELETE FROM table WHERE Name =" & TxtName.Text & "" and other few modifications but this is a different question, there's a lot of free tutorials on this,try it on your own if you get any errors then post it.
if this question is solved then mark it as such
good luck.

oussama_1 39 Posting Whiz in Training

yes replace your code with mine under btnSubmit click event

oussama_1 39 Posting Whiz in Training

forget about indexes and integers, try this

sentence = sentence.tostring.replace("dis","")
Me.lblAnswer.Text = sentence
oussama_1 39 Posting Whiz in Training

nowhere, that's the whole code.

Label.text.replace("dis", "")
oussama_1 39 Posting Whiz in Training
TextToEdit.text.replace("dis", "")
oussama_1 39 Posting Whiz in Training

put the code of step1 in all qty button click and you can put the codes of step2, step3 and step4 in all item button click

oussama_1 39 Posting Whiz in Training

You should use a timer instead of Date/time picker
when the user starts

Timer1.start()

when the user finishes

Timer1.stop()

but first you can set the time to seconds, minutes or hours
for seconds use

Timer1.Interval = 1000

now each timer Tick is a second, when the timer start log your time

    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
        Dim LogTime As Integer = 0
        LogTime = LogTime + 1
    End Sub
oussama_1 39 Posting Whiz in Training

Step1

TextBox1.Text = sender.text & ","

Step2

TextBox1.Text = TextBox1.Text & sender.text

Step3

        Dim qty As String = TextBox1.Text.Substring(0, TextBox1.Text.ToString.LastIndexOf(","))
        Dim itemName As String = TextBox1.Text.Replace(qty & ",", "")
        DataGrid.Rows.Add(itemName, "", "", qty)

Step4

Label.Text = DataGrid.Rows(index).Cells(index).Value
oussama_1 39 Posting Whiz in Training

Great, Mark question solved please.

oussama_1 39 Posting Whiz in Training
        'add yourTableName
        Dim insertCommand As New OleDb.OleDbCommand("INSERT INTO yourTableName (Bank, Acno, Name) VALUES ('" & TxtBank.Text & "','" & TxtAcno.Text & "','" & TxtName.Text & "')", CN)
        Try
            CN.Open()
            insertCommand.ExecuteNonQuery()
            MsgBox("Record Added Successfully")
        Catch ex As Exception
        Finally
            CN.Close()
        End Try
oussama_1 39 Posting Whiz in Training
DataGrid.Rows(index).Cells(index / ColumnName).Value = TextBox1.Text
oussama_1 39 Posting Whiz in Training

ok here's the code

        Dim cmd As OleDbCommand
        Dim dr As OleDbDataReader
        Try
            CN.Open()
            cmd = New OleDbCommand("SELECT *  from Receipts WHERE Bank='" & TxtBank.Text & "'" & "AND Acno='" & TxtAcno.Text & "'", CN)
            dr = cmd.ExecuteReader
            If dr.Read Then
                TxtName.Text = dr("Name")
                TxtName.Focus()
            Else
                MsgBox("No Such Account")
            End If
        Catch
        End Try
        dr.Close()
        cn.Close()
oussama_1 39 Posting Whiz in Training

is there any error ? if yes what is it ?
what are you trying to do, just focus on name textbox or get the name value.

oussama_1 39 Posting Whiz in Training
        If Q1.Visible = True Then
            Dim numb As Integer = 5
            For i = 111 To 155
                Dim q As RadioButton = CType(Me.Controls("q" & i), RadioButton)
                If i.ToString.EndsWith("1") Then
                    numb = 5
                End If
                If q.Created = True Then
                    If q.Checked = True Then
                        sm = sm + numb
                        numb = numb - 0.5
                    Else
                        sm = sm + 3
                    End If
                End If
            Next
            MsgBox(Math.Round(sm))
            Q2.Visible = True
        End If
oussama_1 39 Posting Whiz in Training

start osk.exe process

Dim OSKProces As System.Diagnostics.Process
OSKProces = System.Diagnostics.Process.Start("osk.exe")

Kill osk.exe Process

Dim proc = Process.GetProcessesByName("osk")
For i As Integer = 0 To proc.Count - 1
proc(i).Kill()
Next i
oussama_1 39 Posting Whiz in Training

c93cf2cca6488324256a29d11d3292f9

when the user add a file,compress that file into a zip file and store it into a protected folder. and create a fake image of that file in your listview and store the directory info for each file in your app for later use..such as extracting.

1) how to zip files (extract,move)
2) how to protect a folder

1) reference the System.IO.Compression.FileSystem form /Windows/Microsoft.NET/assembly/GAC_MSIL/System.IO.Compression.FileSystem/System.IO.Compression.FileSystem.dll

Imports System.IO
Imports System.IO.Compression

Module Module1

    Sub Main()
        Dim startPath As String = "c:\example\start" 
        Dim zipPath As String = "c:\example\result.zip" 
        Dim extractPath As String = "c:\example\extract"

        ZipFile.CreateFromDirectory(startPath, zipPath)

        ZipFile.ExtractToDirectory(zipPath, extractPath)
    End Sub 

End Module

reference : ZipFile Class

2) Protect Folder

Imports System.Security.AccessControl
Imports System.IO

Remove access from folder

Dim FilePath As String = "The Folder you want to protect"
        Dim fs As FileSystemSecurity = File.GetAccessControl(FilePath)
        ' Please Change User if needed (C:\Users\"USER")
        fs.AddAccessRule(New FileSystemAccessRule("User", FileSystemRights.FullControl, AccessControlType.Deny))
        File.SetAccessControl(FilePath, fs)

Add access to folder

Dim FilePath As String = "The Folder you want to protect"
        Dim fs As FileSystemSecurity = File.GetAccessControl(FilePath)
        ' Please Change User if needed (C:\Users\"USER")
        fs.RemoveAccessRule(New FileSystemAccessRule("User", FileSystemRights.FullControl, AccessControlType.Deny))
        File.SetAccessControl(FilePath, fs)

Gd Luck

oussama_1 39 Posting Whiz in Training
    Dim NewLabel As Label = New Label
    Me.Controls.Add(NewLabel)
    AddHandler NewLabel.Click, AddressOf MyLabelClick

    Private Sub MyLabelClick(ByVal sender As Object, ByVal e As EventArgs)
        'code
    End Sub
oussama_1 39 Posting Whiz in Training

Yes, it's possible. read about how WINRAR works
Data Compression
File Archiver
deflate algorithm

oussama_1 39 Posting Whiz in Training

in the destination, you need to put the file directory not the folder that contains it.

My.Computer.FileSystem.FileCopy(your file,new file directory)
' ex: i want to copy this file(C:\sound.wav) to (c:\music)
My.Computer.FileSystem.FileCopy(C:\sound.wav,c:\music\sound.wav)
oussama_1 39 Posting Whiz in Training

@ ryanjayson
do you even understand my code before suggesting your solution!

oussama_1 39 Posting Whiz in Training
       For i = 0 To 2
            Dim RadioButton As RadioButton = CType(Me.Controls("RadioButton" & i + 1), RadioButton)
            If RadioButton.Checked = True Then
                MsgBox("Food :" & RadioButton.Text & ", Quantity :" & txtCountFood)  'msgbox is example
            End If
        Next
oussama_1 39 Posting Whiz in Training

try this

Dim UpdateCommand As New OleDbCommand
        UpdateCommand.CommandText = "UPDATE [Sheet1$] Set [Inventory on Hand] Where [ITEM CODE] = '" & DataGridView2.Rows(DataGridView2.Rows.Count - 2).Cells(6).Value.ToString & "'"
        UpdateCommand.Connection = MyConnection
        MyConnection.Open()
        UpdateCommand.ExecuteNonQuery()

convert Datagridview Data to Datatable Click Here

oussama_1 39 Posting Whiz in Training

no you can not.
"UPDATE will only update existing records in the database, it will not add new records. To add new records you need to use an INSERT command."
for report viewer Click Here

oussama_1 39 Posting Whiz in Training

for the update
change these :
tablename
columnname1 etc..

    Private Sub DataGridView1_RowsAdded(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewRowsAddedEventArgs) Handles DataGridView1.RowsAdded
        Dim MyConnection As New OleDbConnection("provider=Microsoft.ACE.OLEDB.12.0; Data Source='" & path & "'; Extended Properties=Excel 12.0;")

        Dim insertCommand As New OleDb.OleDbCommand("INSERT INTO tablename (columnname1, columnname2, columnname3) VALUES ('" & DataGridView2.Rows(DataGridView2.Rows.Count - 2).Cells(0).Value.ToString & "','" & DataGridView2.Rows(DataGridView2.Rows.Count - 2).Cells(1).Value.ToString & "','" & DataGridView2.Rows(DataGridView2.Rows.Count - 2).Cells(2).Value.ToString & "')", MyConnection)
        Try
            MyConnection.Open()
            insertCommand.ExecuteNonQuery()
        Catch ex As Exception
        Finally
            MyConnection.Close()
        End Try
    End Sub
End Class
oussama_1 39 Posting Whiz in Training

here's the copy raw solution
ill post the database update later

    Private Sub DataGridView1_MouseClick(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles DataGridView1.MouseClick
        If DataGridView1.RowCount = 0 Or Nothing Then
        Else
            For Each cell As DataGridViewColumn In DataGridView1.Columns
                DataGridView2.Columns.Add(DirectCast(cell.Clone, DataGridViewColumn))
            Next
            DataGridView2.Rows.Add(DataGridView1.CurrentRow.Cells.Cast(Of DataGridViewCell).Select(Function(c) c.Value).ToArray)
        End If
    End Sub
oussama_1 39 Posting Whiz in Training

let me get this straight, your are asking for 2 things
1.you want on datagridview1_mouseclick to copy selected raw to datagridview2
2.you want on datagridview2_RowsAdded to update your database with the new added raw
am i right ?

oussama_1 39 Posting Whiz in Training

when there's a perfect program, there's a perfect hacker. deal with it!
sorry :D

oussama_1 39 Posting Whiz in Training

go to your form properties go to misc and set keypreview to true and set your acceptbutton

oussama_1 39 Posting Whiz in Training

Sorry, Didnt get the question
try this

  Dim ofd As New OpenFileDialog
        Dim strFile As String
        With ofd
            .Title = "Select a List"
            .Filter = "Text Files|*.txt|All Files|*.*"
            .ShowDialog()
            strFile = .FileName
        End With
        RichTextBox1.LoadFile(strFile, RichTextBoxStreamType.PlainText)
        For Each line In RichTextBox1.Lines
            If line.StartsWith("A") Then
                If line.EndsWith("0") Then
                    Dim newline As String
                    newline = line.Substring(0, line.Length - 1) & "Replace with this"
                    RichTextBox1.Text = RichTextBox1.Text.Replace(line, newline)
                End If
            End If
        Next
AnooooPower commented: this works thanks oussama +0
oussama_1 39 Posting Whiz in Training
        Dim ofd As New OpenFileDialog
        Dim strFile As String
        With ofd
            .Title = "Select a List"
            .Filter = "Text Files|*.txt|All Files|*.*"
            .ShowDialog()
            strFile = .FileName
        End With
        RichTextBox1.LoadFile(strFile, RichTextBoxStreamType.PlainText)
        For Each line In RichTextBox1.Lines
            If line.StartsWith("A") Then
                If line.EndsWith("0") Then
                    RichTextBox1.Text = RichTextBox1.Text.Replace(line, line.Replace("0", "Replace with this"))
                End If
            End If
        Next
oussama_1 39 Posting Whiz in Training

hmm dont know about that...actually if you use a datagridview itll be less coding for you other than that u gonna have to code everything
gd luck

oussama_1 39 Posting Whiz in Training

im assuming your "textbox"s are named textbox1 and textbox2 and so on..

dim wordData as string
wordData = "Login : " & textbox1.text & vbnewline &_
"First Name : " & textbox2.text & vbnewline &_
"Last Name : " & textbox3.text & vbnewline &_
"Password : " & textbox4.text & vbnewline &_
"Email : " & textbox5.text & vbnewline &_
"Content Lang : " & Combobox1.text & vbnewline &_
"interface Lang : " & Combobox2.text

wordapp.Selection.TypeText(wordData)
oussama_1 39 Posting Whiz in Training

by data i mean plain text,now the question is where do your write your data, textbox or richtextbox? if so
wordapp.Selection.TypeText(textbox)
or
wordapp.Selection.TypeText(richtextbox)

oussama_1 39 Posting Whiz in Training

try this

Imports Microsoft.Office.Interop.Word

wordapp = New Word.Application
worddoc = New Word.Document
    'create word file
worddoc = wordapp.Documents.Add()
worddoc.Activate()
    'save data
wordapp.Selection.TypeText("YOUR DATA")
    'save as
wordapp.Dialogs(WdWordDialog.wdDialogFileSaveAs).Show()
    'close app
worddoc.Close()
wordapp.Quit()
worddoc = Nothing
wordapp = Nothing
oussama_1 39 Posting Whiz in Training

yes like what minimalist said and try to add mouse control to your form so you can move it around

Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" _
            (ByVal hwnd As Integer, ByVal wMsg As Integer, _
             ByVal wParam As Integer, ByVal lParam As String) As Integer
    Private Declare Sub ReleaseCapture Lib "user32" ()
    Private Const WM_NCLBUTTONDOWN = &HA1
    Private Const HTCAPTION = 2
    Private Sub Form1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseMove
        Dim lHwnd As Int32
        lHwnd = Me.Handle
        If lHwnd = 0 Then Exit Sub
        ReleaseCapture()
        SendMessage(lHwnd, WM_NCLBUTTONDOWN, HTCAPTION, 0&)
    End Sub
oussama_1 39 Posting Whiz in Training

Exactly! your code will create an empty word file. you need to add your data to the MS word file programmatically

oussama_1 39 Posting Whiz in Training

place this script on your camera
transform.position = new Vector3(player.transform.x,y,z)

oussama_1 39 Posting Whiz in Training

each row in listview is considered a one single item, in listview a different columns doesn't mean a different items
use subitems

List.Items(index).SubItems.Add(string)
oussama_1 39 Posting Whiz in Training

Mark Question Solved please

oussama_1 39 Posting Whiz in Training
Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim Connection As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;" & "Data Source='" & "C:\Users\User\Desktop\Database3.accdb" & "';" & "Persist Security Info=False;" & "Jet OLEDB:Database Password=" & ";")
        Dim date1 As New TextBox
        Dim time1 As New TextBox
        Dim s1 As New TextBox
        Dim s2 As New TextBox
        Dim Empid As New TextBox
        Dim InOut As New TextBox
        Dim textfile As New RichTextBox
        Dim progress As New ProgressBar
        Me.Controls.Add(progress)
        'fill these out
        'progress.Location = New Point( , )
        'progress.Size = New Size ( , )


        textfile.LoadFile("C:\Users\User\Desktop\New Text Document.txt", RichTextBoxStreamType.PlainText)

        progress.Maximum = textfile.Lines.Count - 1

        For Each line In textfile.Lines
            If line = "" Or Nothing Then
            Else
                line = line.Replace(" ", "\").Replace("\\\\", "\").Replace("\\\", "\").Replace("\\", "\")
                ' now you have a (\) between each item instead of spaces
                date1.Text = line.Substring(0, line.IndexOf("\"))
                Dim a As String = Replace(line, date1.Text & "\", "", 1, 1)
                line = a
                time1.Text = line.Substring(0, line.IndexOf("\"))
                Dim b As String = Replace(line, time1.Text & "\", "", 1, 1)
                line = b
                s1.Text = line.Substring(0, line.IndexOf("\"))
                Dim c As String = Replace(line, s1.Text & "\", "", 1, 1)
                line = c
                s2.Text = line.Substring(0, line.IndexOf("\"))
                Dim d As String = Replace(line, s2.Text & "\", "", 1, 1)
                line = d
                Empid.Text = line.Substring(0, line.IndexOf("\"))
                Dim f As String = Replace(line, Empid.Text & "\", "", 1, 1)
                line = f
                InOut.Text = line.Substring(0, line.Length).Replace("\", "")
                Dim g As String = Replace(line, InOut.Text, "", 1, 1)
                line = g.Replace("\", …
oussama_1 39 Posting Whiz in Training

meshe l 7al

Public Class Form1
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim Connection As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;" & "Data Source='" & "YOURPATH\access.accdb" & "';" & "Persist Security Info=False;" & "Jet OLEDB:Database Password=" & ";")

        Dim date1 As New TextBox
        Dim time1 As New TextBox
        Dim s1 As New TextBox
        Dim s2 As New TextBox
        Dim Empid As New TextBox
        Dim InOut As New TextBox
        Dim textfile As New RichTextBox

        textfile.LoadFile("TEXT FILE PATH .txt", RichTextBoxStreamType.PlainText)

        For Each line In textfile.Lines
            If line = "" Or Nothing Then
            Else
                line = line.Replace(" ", "\").Replace("\\\\", "\").Replace("\\\", "\").Replace("\\", "\")
                ' now you have a (\) between each item instead of spaces
                date1.Text = line.Substring(0, line.IndexOf("\"))
                Dim a As String = Replace(line, date1.Text & "\", "", 1, 1)
                line = a
                time1.Text = line.Substring(0, line.IndexOf("\"))
                Dim b As String = Replace(line, time1.Text & "\", "", 1, 1)
                line = b
                s1.Text = line.Substring(0, line.IndexOf("\"))
                Dim c As String = Replace(line, s1.Text & "\", "", 1, 1)
                line = c
                s2.Text = line.Substring(0, line.IndexOf("\"))
                Dim d As String = Replace(line, s2.Text & "\", "", 1, 1)
                line = d
                Empid.Text = line.Substring(0, line.IndexOf("\"))
                Dim f As String = Replace(line, Empid.Text & "\", "", 1, 1)
                line = f
                InOut.Text = line.Substring(0, line.Length).Replace("\", "")
                Dim g As String = Replace(line, InOut.Text, "", 1, 1)
                line = g.Replace("\", "")


                Dim insertCommands As New OleDb.OleDbCommand("INSERT INTO import ([Date], [Time], [S1], [s2], [Empid], [in\out]) VALUES ('" & date1.Text & "','" & time1.Text & …
oussama_1 39 Posting Whiz in Training

Project - add reference - com - Microsoft access 12.0 object library

Code :

Public Class Form1
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim Connection As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;" & "Data Source='" & "YOURPATH\access.accdb" & "';" & "Persist Security Info=False;" & "Jet OLEDB:Database Password=" & ";")

        Dim date1 As New TextBox
        Dim time1 As New TextBox
        Dim s1 As New TextBox
        Dim s2 As New TextBox
        Dim Empid As New TextBox
        Dim InOut As New TextBox
        Dim textfile As New RichTextBox

        textfile.LoadFile("YOUR TEXT FILE PATH.txt", RichTextBoxStreamType.PlainText)

        For Each line In textfile.Lines
            line = line.Replace(" ", "\").Replace("\\\\", "\").Replace("\\\", "\").Replace("\\", "\")
            ' now you have a (\) between each item instead of spaces
            date1.Text = line.Substring(0, line.IndexOf("\"))
            line = line.Replace(date1.Text & "\", "")
            time1.Text = line.Substring(0, line.IndexOf("\"))
            line = line.Replace(time1.Text & "\", "")
            s1.Text = line.Substring(0, line.IndexOf("\"))
            line = line.Replace(s1.Text & "\", "")
            s2.Text = line.Substring(0, line.IndexOf("\"))
            line = line.Replace(s2.Text & "\", "")
            Empid.Text = line.Substring(0, line.IndexOf("\"))
            line = line.Replace(Empid.Text & "\", "")
            InOut.Text = line.Substring(0, line.Length).Replace("\", "")
            line = line.Replace(InOut.Text, "")

            Dim insertCommands As New OleDb.OleDbCommand("INSERT INTO import ([Date], [Time], [S1], [s2], [Empid], [in\out]) VALUES ('" & date1.Text & "','" & time1.Text & "','" & s1.Text & "','" & s2.Text & "','" & Empid.Text & "','" & InOut.Text & "')", Connection)
            Try
                Connection.Open()
                insertCommands.ExecuteNonQuery()
            Catch ex As Exception
                MessageBox.Show(ex.Message & " - " & ex.Source)
            Finally
                Connection.Close()

            End Try

        Next

        MsgBox("Done")

    End Sub
End Class

Proof :

fff9ce1b2d0f609b30c12b84d6d84e1f

elie iza …

oussama_1 39 Posting Whiz in Training

hi, your code works perfectly
-check your typing
-account exist
-correct password
-gmail account

oussama_1 39 Posting Whiz in Training
Public Class Form1
    Dim dgv As New DataGridView
    Dim txt1 As New TextBox
    Dim txt2 As New TextBox
    Dim label1 As New Label
    Dim label2 As New Label
    Dim add As New Button
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Me.Size = New Size(563, 224)
        Me.Controls.Add(dgv)
        Me.Controls.Add(txt1)
        Me.Controls.Add(txt2)
        Me.Controls.Add(label1)
        Me.Controls.Add(label2)
        Me.Controls.Add(add)
        label1.Text = "Values 1"
        label2.Text = "Values 2"
        label1.Location = New Point(4, 105)
        label2.Location = New Point(4, 131)
        txt1.Location = New Point(57, 102)
        txt2.Location = New Point(57, 128)
        add.Location = New Point(57, 154)
        add.Text = "Add"
        txt1.Text = "0"
        txt2.Text = "0"
        dgv.Size = New Size(547, 92)
        dgv.Columns.Add("Vendas1", "Vendas1")
        dgv.Rows.Add("0")
        dgv.Rows.Add("0")
        AddHandler add.Click, AddressOf addvalues
    End Sub

    Private Sub addvalues(ByVal sender As System.Object, ByVal e As System.EventArgs)
        dgv.Columns.Add("Vendas" & dgv.Columns.Count.ToString + 1, "Vendas" & dgv.Columns.Count.ToString + 1)
        dgv.Rows(0).Cells("Vendas" & dgv.Columns.Count.ToString).Value = txt1.Text
        dgv.Rows(1).Cells("Vendas" & dgv.Columns.Count.ToString).Value = txt2.Text
    End Sub
End Class
oussama_1 39 Posting Whiz in Training

won't work, use datatable instead of binding
sorry i'm busy right now, if you want the code let me know
good luck