oussama_1 39 Posting Whiz in Training

use a Yes/No messagebox to interact with form

            DialogResult MSG = MessageBox.Show("Subtitle", "Title", MessageBoxButtons.YesNo);
            if (MSG == DialogResult.Yes)
            {
                //code
            }
            else if (MSG == DialogResult.No)
            {
                //code
            }
oussama_1 39 Posting Whiz in Training

Is your table a datagrid or a database ?
what's the error ?

a wild guess

        DataGridView1.Rows.Add(1)
        DataGridView1.Rows(0).Cells("T_ID").Value = ComboBox1.Items(0)
        DataGridView1.Rows(0).Cells("Sbj_Paper_Name").Value = ListBox1.Items(0)
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

Copy text file to desktop.

        Dim FilePath As String = My.Computer.FileSystem.SpecialDirectories.Desktop
        'System.IO.File.WriteAllBytes(FilePath & "\filename.extension", My.Resources.filename)
        System.IO.File.WriteAllBytes(FilePath & "\Text.txt", My.Resources.Text)
oussama_1 39 Posting Whiz in Training

are you handling your error by
Try
Catch
End Try ?

oussama_1 39 Posting Whiz in Training

If you want your FOUR INDEPENDENT apps to access the same database, you need to host your database online.

Use your experience in java to create the android app (eclipse)
Use your experience in php to write the login process,connecting,sql commands etc... for the android app.
You can learn C# to create the software application.

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

Add your txt file to your app resources
Project - Project properties - resources - upload

oussama_1 39 Posting Whiz in Training

how about thread.sleep(TIME)

oussama_1 39 Posting Whiz in Training

use a background worker, Don't use thread.sleep this will hold off your operation.
good luck

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

2 things you should take care of:
1) in your project publish settings, when the user install your application the "application files" and "prerequisites" will be automatically installed on the user machine
so make sure you include everything in the application files
2) the user machine platform
if the targeted machine is 64bit platform,you should assign your app to 64bit
but if its a 32bit platform dont do anything
if you want both platform(64bit and 32bit) assign your app to X86bit
go to Build - Configuration Manager - Active Solution platform - new - new platform select X86 or X64bit
good luck

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
webBrowser1.Document.All("Button ID").InvokeMember("click")
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

Orphaned Land - Let The Truce Be Known

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

check for internet connectivity first:

        Try
            If My.Computer.Network.Ping("daniweb.com") Then
                dataopen()
                If conn.State = ConnectionState.Open Then
                    rlabel1.text = "Connected"
                Else
                    rlabel1.text = "Not connected"
                End If
            End If
        Catch ex As Exception
            rlabel1.text = "No Internet Connectivity"
        End Try
oussama_1 39 Posting Whiz in Training

Click Here
go to VB .NET and Databases tutorials

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

it's already in your code, just change/assign values to all types of MarginBounds

oussama_1 39 Posting Whiz in Training

is it required to add a microsoft excel object library reference here ?

oussama_1 39 Posting Whiz in Training
            dAdapter.Fill(ds);
            dataGridView1.DataSource = ds.tables(0);
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

the easy and fast way for me is to load the access database into a datagrid and search through it.

oussama_1 39 Posting Whiz in Training
oussama_1 39 Posting Whiz in Training

dlls files are editable and hackable and within reach but my solution is unreachable, did you try it? is it hard ?
anyways good luck :)

oussama_1 39 Posting Whiz in Training

since your db is safe, take this code :
e3a2b89ddcf066b13425c4e07159bc21
and store it in your databade, on your login button event, download this code and execute it. how to do so ?
check "CodeDom"
and here's a Link Click Here

oussama_1 39 Posting Whiz in Training

Get all files and folders in a directory

        Dim f As New DirectoryInfo("C:\test\")
        Dim dirs() As DirectoryInfo = f.GetDirectories("*", SearchOption.AllDirectories)
        For Each d As DirectoryInfo In dirs
            ListBox1.Items.Add(d.Name)
            Dim di As New IO.DirectoryInfo(d.FullName)
            Dim diar1 As IO.FileInfo() = di.GetFiles()
            Dim dra As IO.FileInfo
            For Each dra In diar1
                ListBox1.Items.Add(dra)
            Next
        Next
        ListBox1.Sorted = True

now for the copy issue,use the same code to get all directories (d.fullname) and see if it ends with your item like so

If d.FullName.EndsWith("\" & ListBox1.SelectedItem.ToString) Then
                IO.File.Copy(d.FullName, My.Computer.FileSystem.SpecialDirectories.Desktop & "\" & d.Name, True)
                Exit For
            End If

Gd Luck

oussama_1 39 Posting Whiz in Training

So you did what exactly? the apps or the websites? :D

oussama_1 39 Posting Whiz in Training

Yes its possible. Click Here

oussama_1 39 Posting Whiz in Training

buddy your question is vague along with your other questions, i can't figure out what you want.
Please Read this Link

oussama_1 39 Posting Whiz in Training

Welcome Spencer :D

oussama_1 39 Posting Whiz in Training

sorry, my bad.
your code is working fine..but i think that you are working on 64bit computer.
for your code to work you need to choose X86 platform
Build - Configuration Manager - Active Solution platform - new - new platform select X86

oussama_1 39 Posting Whiz in Training

try this

        Dim Connection As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;" & "Data Source='" & "your path" & "';" & "Persist Security Info=False;" & "Jet OLEDB:Database Password=" & "your pass" & ";")
        Connection.Open()
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
oussama_1 39 Posting Whiz in Training

Search through datagridview from combobox data :

        For i As Integer = 0 To DataGridView1.Rows.Count - 2
            For j As Integer = 0 To Me.DataGridView1.Rows(i).Cells.Count - 2
                If DataGridView1.Item(j, i).Value.ToString().Contains(ComboBox1.Text) Then
                    DataGridView1.Rows(i).Cells(j).Selected = True
                    DataGridView1.CurrentCell = DataGridView1.Rows(i).Cells(j)
                End If
            Next
        Next i
oussama_1 39 Posting Whiz in Training
Dim StringFromWeb As String = New System.Net.WebClient().DownloadString("example.com")
        RichTextBox1.Text = StringFromWeb

then find your Span ID

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
        For indx = 0 To DataGridView2.Rows.Count - 1
            If DataGridView1.CurrentRow.Cells("ID").Value = DataGridView2.Rows(indx).Cells(1).Value Then
                Dim ask = MessageBox.Show("Record Already Exist, Replace existing record ?", "Records", _
                                          MessageBoxButtons.YesNoCancel)
                If ask = DialogResult.Yes Then
                    ''copy code
                End If
            Else
                ''copy code
            End If
        Next