Jx_Man 987 Nearly a Senior Poster Featured Poster

uh...please used code tags...

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi...Welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

this an example code.

Private Sub cmdRemove_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdRemove.Click
    If ListLeft.SelectedIndex < 0 Then
        MsgBox("Please select an item", MsgBoxStyle.Exclamation, "Error")
    Else
        If ListLeft.Items.Count > 0 Then
            ListRight.Items.Add(ListLeft.SelectedItem)
            ListLeft.Items.Remove(ListLeft.SelectedItem)
        End If
    End If
End Sub
Jx_Man 987 Nearly a Senior Poster Featured Poster

I use a DBGrid in 2 applications in 2 languages

different language or different project?
if just one project, check the reference of project.

Jx_Man 987 Nearly a Senior Poster Featured Poster

hi..Welcome to daniweb :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi...Welcome to Daniweb friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

this code for move item from listleft to listright :

Private Sub cmdRemove_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdRemove.Click
        If ListLeft.Items.Count > 0 Then
            ListRight.Items.Add(ListLeft.SelectedItem)
            ListLeft.Items.Remove(ListLeft.SelectedItem)
        End If
    End Sub

this code to move all item on listleft to list right :

Private Sub cmdAll_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdAll.Click
        Dim i, j As Integer
        If ListLeft.Items.Count > 0 Then
            For i = 0 To ListLeft.Items.Count - 1
                ListRight.Items.Add(ListLeft.Items.IndexOf(i))
            Next
        End If
    End Sub
Jx_Man 987 Nearly a Senior Poster Featured Poster

i don't understand what the problem is...
what you want to do with the labels??
if u copied them, that is to be certain they have a same properties with the parent. they just have a different name.

Jx_Man 987 Nearly a Senior Poster Featured Poster

ElseIf SqlDataAdapter1.SelectCommand.CommandText "SELECT * FROM Managers WHERE managerID = '+ TxtUsername.Text +' and password = '+ txtPassword.text+ " Then
FrmManView.Show()

you not checked input just select data from input.

Jx_Man 987 Nearly a Senior Poster Featured Poster

there are not something wrong with _ syntax but the red one is forgotten part :

button = MessageBox.Show("Are you a wholesaler? ", " This is a Caption", _
        MessageBoxButtons.YesNo, _
        MessageBoxIcon.Information, MessageBoxDefaultButton.Button2)

PS : remember to enter after _ syntax.

Jx_Man 987 Nearly a Senior Poster Featured Poster

r u sure doing the right way when you make the report form at first time (using wizard).

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi Nottie...Welcome to Daniweb friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi Munyiri...Welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi imrags...Welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi ajay...Welcome to Daniweb friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi wole...Welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster
Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
        textbox1.Text = ComboBox1.SelectedItem
End Sub
Jx_Man 987 Nearly a Senior Poster Featured Poster

put it in the same folder with your exe file and rename the manifest file as like your exe file name.
e.g : in same folder :
- Zawpai.exe
- Zawpai.exe.manifest

Jx_Man 987 Nearly a Senior Poster Featured Poster

fell free to post your problem. many people will give you a hand. :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

hi pooh...Welcome to Daniweb friend :)

november_pooh commented: Thanks +0
Jx_Man 987 Nearly a Senior Poster Featured Poster

hi Elmo...Welcome to Daniweb Friend :)
hope you will enjoy :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi Fayez...Welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

he gives a shared code :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

sulley's already answered

Jx_Man 987 Nearly a Senior Poster Featured Poster

sorry i don't read carefully..:)
i think that has a same logic :
the point of my code is in this following code :

For i = 0 To dtStudent.Rows.Count - 1
    cmbNis.Items.Add(dtStudent.Rows(i).Item(0)) ' fill into combobox
Next

you can implement in your access code.

Jx_Man 987 Nearly a Senior Poster Featured Poster

see this program :

Calculator.zip

Hope this help.

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hello Everybody,

I just started learning programming about 2 months ago. I'm trying to do a Tic-Tac-Toe game using labels but I have a little difficulty. How do I get the computer to check if 3 labels are of the same value.

I've tried this:

If lblLeft.Text And lblCenter.Text And lblRight.Text = "X" Then
     MessageBox.Show("You Win", "Well Done")
End If

But when I tried debugging, Visual Basic tells me that "Conversion from string "O" to type 'Long' is not valid". What should I do?

should be :

If lblLeft.Text="X" And lblCenter.Text="X" And lblRight.Text = "X" Then
     MessageBox.Show("You Win", "Well Done")
End If
Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi...Welcome to Daniweb Friend :)
I hope you will enjoy all things in Daniweb :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi...Welcome to Daniweb friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

this code i used to bind data into combobox :

Private Sub ReadData()
        Dim i As Integer
        Dim cmdStudent As New SqlCommand
        Dim daStudent As New SqlDataAdapter
        Dim dsStudent As New DataSet
        Dim dtStudent As New DataTable
        Dim conn As SqlConnection

        conn = GetConnect()
        Try

            cmdStudent = conn.CreateCommand
            cmdStudent.CommandText = "SELECT * FROM Student"
            daStudent.SelectCommand = cmdStudent
            daStudent.Fill(dsStudent, "Student")
            dtStudent = dsStudent.Tables("Student")
            For i = 0 To dtStudent.Rows.Count - 1
                cmbNis.Items.Add(dtStudent.Rows(i).Item(0)) ' fill into combobox
            Next

        Catch ex As Exception
            MsgBox("Error: " & ex.Source & ": " & ex.Message, MsgBoxStyle.OKOnly, "Connection Error !!")
        End Try
        conn.Close()
    End Sub
Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi...Welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

HI...Welcome to Daniweb Bob :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi...Welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi Idara...Welcome to Daniweb friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi Jonathan...Welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

are you do some database project?

Jx_Man 987 Nearly a Senior Poster Featured Poster

you're welcome. don't forget to mark this thread solved. :)
happy coding friend :)

dnk commented: helpfull people +1
Jx_Man 987 Nearly a Senior Poster Featured Poster

i have tried it. and i don't get result 200.just between 1-199.

Jx_Man 987 Nearly a Senior Poster Featured Poster

hi...welcome to Daniweb friend :)
there are many people who start to write program this week.so feel free to post. and maybe we need your help. :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

and don't forget to check if items is present on list and it selected or not.

Jx_Man 987 Nearly a Senior Poster Featured Poster

as rahmy said :
add selected file on first list to second list and remove item from first list.

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        list2.Items.Add(list1.SelectedItem)
        list1.Items.Remove(list1.SelectedItem)
    End Sub
Jx_Man 987 Nearly a Senior Poster Featured Poster

hmm...you want to connect with sqlserver or oracle???

Jx_Man 987 Nearly a Senior Poster Featured Poster

Love can't be touched but can be felt.

Jx_Man 987 Nearly a Senior Poster Featured Poster

it is solved? if solved please post the answer. so we can learn together. :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

i was answer your question in you newer thread.

Jx_Man 987 Nearly a Senior Poster Featured Poster

thx. i m glad to hear that :)

Jx_Man 987 Nearly a Senior Poster Featured Poster
Private Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long

Const SND_ASYNC = &H1
Const SND_LOOP = &H8
Const SND_MEMORY = &H4
Const SND_NODEFAULT = &H2
Const SND_NOSTOP = &H10
Const SND_SYNC = &H0

Private Sub cmdPlay_Click()
Dim Result As Long
Dim SoundFile As String

'  set file name
SoundFile = "C:\DÖNALd.wav"

'  Play wave file 
Result = sndPlaySound(SoundFile, SND_ASYNC)

End Sub
Jx_Man 987 Nearly a Senior Poster Featured Poster

1. i don't understand what your first question.
2. use manifest file to make your program looks like your windows style.
- if you want to hide maximize or minimize box u can set in form properties to hide this box or you can change border style of form. fixed dialog will hide maximize and minimize box. u can try and find the right one by your self.

Jx_Man 987 Nearly a Senior Poster Featured Poster

i m glad to hear that.
happy coding :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

you're welcome :)
don't forget to mark this thread solved