Pgmer 50 Master Poster Featured Poster

May be your declaring again in ServerConnection() as Dim conn = New SqlConnection(con)
in top also there is a variable with scope public and here its local to that module.

Pgmer 50 Master Poster Featured Poster

Hi,
I have my data which looks like '0/1,0/2,0/3,0/4' or '0/1,0/2,0/6,0/3,0/4' I need to select min and max of the
numbers for example for first example my output should be 0/1-0/4 and for second it should be 0/1-0/6.. I am able to get like 0-1 or 0-6.. Any help would be great.. That data will be Varchar.

Pgmer 50 Master Poster Featured Poster

Before starting the loop Can you just check DS is having tables and Rows?
And I am not sure about this line "For iX = 0 To dtRows - 1" your looping through dtrows and accessing values from dataset. Will dtRows have same number of rows as table of DS?

Begginnerdev commented: Good catch +5
Pgmer 50 Master Poster Featured Poster

think you cant do it programatically.

Pgmer 50 Master Poster Featured Poster

Why you need webbrowser to select a file from local path? What is the actual need?
Web browser control is used to view any web page within the application not to open any file.

Maligui commented: I agree. Microsoft deems this as a security risk. +1
Pgmer 50 Master Poster Featured Poster

Then use the search condition in dataview using dataview.rowfilter method and bind the dataview back to grid.

Pgmer 50 Master Poster Featured Poster

This should work for you..

Private Sub TextBox1_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TextBox1.KeyDown
        If e.KeyCode = Keys.F3 Then
            TextBox1.Text = Now().Date.ToShortDateString()
        End If

    End Sub
Pgmer 50 Master Poster Featured Poster

Post ur complete code... are u trying in datarow view? Cant you get the value to string variable and do indexof(.)?

Pgmer 50 Master Poster Featured Poster

Post your code here or try something like below

Private Sub ListBox1_SelectedValueChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ListBox1.SelectedValueChanged
        If ListBox1.SelectedItem.ToString.Length > 0 Then
            Process.Start("explorer.exe", ListBox1.SelectedItem.ToString)
        End If
poojavb commented: Thank u very much +3
Pgmer 50 Master Poster Featured Poster

Go to the project properties under that u could see Publish click on it. u could see button called Prereqisites click on it. u can choose the framework from there and see other options as well.

poojavb commented: its helped a lot.... +3
Pgmer 50 Master Poster Featured Poster

The new ASP application u designed is having code behind files as vb.net or c#? If vb.net is ur option u need not to convert any code. u can use the code which u wrote for windows app.

Pgmer 50 Master Poster Featured Poster
Try
            Dim iCell1 As Integer
            Dim icell2 As Integer
            Dim icellResult As Integer
            iCell1 = DataGridView1.CurrentRow.Cells(1).Value
            icell2 = DataGridView1.CurrentRow.Cells(2).Value
            icellResult = iCell1 * icell2
            DataGridView1.CurrentRow.Cells(3).Value = icellResult

        Catch ex As Exception
            MessageBox.Show(ex.ToString)
        End Try
Make sure the selectionMode is set to cellSelect. Once user leaves the cell 3 it will get the calculated values in it.
Pgmer 50 Master Poster Featured Poster

What you want to achieve? When you click on each link lable you will get the POPup? please explain.

Pgmer 50 Master Poster Featured Poster
Dim arrImage() As Byte
        Dim openFile As New OpenFileDialog
        If openFile.ShowDialog() = Windows.Forms.DialogResult.OK Then
            arrImage = System.IO.File.ReadAllBytes(openFile.FileName)
        Else
            Exit Sub
        End If
Pgmer 50 Master Poster Featured Poster

Go to the properties of lable.. under Image select the image u want to assign.
Make the text emty. And set autosize=false and set the size you want.

Pgmer 50 Master Poster Featured Poster

Usually Module should contain the method or functions which can be used in all the forms of projects. Example: Error handler code, database connections etc..

debasisdas commented: agree +13
Pgmer 50 Master Poster Featured Poster

Why cant u set the MAXLength propery of textbox to 10?

Pgmer 50 Master Poster Featured Poster

IF it has solved your problem then plz mark the thread as solved.

Pgmer 50 Master Poster Featured Poster

Its ok... welcome to Daniweb :) happy coding

zhackon commented: thanks +0
Pgmer 50 Master Poster Featured Poster

If only few values, We can save in Application setting files?

adam_k commented: I agree +6
Pgmer 50 Master Poster Featured Poster

Yes as debasis said, Have one column like Status or somthing, Update it to Incactive if attemt reaches to 3+ and check this status while ur doing validation when user hits on logon button. If Status is Inactive give message and exit..

Pgmer 50 Master Poster Featured Poster

Hi, This is the code given by debasis das in this forum for some one.
See if this can help you..

Public Function NumToWord(ByVal numstr As Object) As String

        Dim newstr As String
        Dim tempstr As String = ""
        numstr = CDec(numstr)

        If numstr = 0 Then
            NumToWord = "Zero"
            Exit Function
        End If

        If numstr > 10 ^ 24 Then
            NumToWord = "Number too big"
            Exit Function
        End If

        If numstr >= 10 ^ 12 Then
            newstr = NumToWord(Int(numstr / 10 ^ 12))
            numstr = ((numstr / 10 ^ 12) - _
            Int(numstr / 10 ^ 12)) * 10 ^ 12
            If numstr = 0 Then
                tempstr = tempstr & newstr & "Bilion "
            Else
                tempstr = tempstr & newstr & "Bilion "
            End If
        End If




        If numstr >= 10 ^ 6 Then
            newstr = NumToWord(Int(numstr / 10 ^ 6))
            numstr = ((numstr / 10 ^ 6) - _
            Int(numstr / 10 ^ 6)) * 10 ^ 6
            If numstr = 0 Then
                tempstr = tempstr & newstr & "milion "
            Else
                tempstr = tempstr & newstr & "milion "
            End If
        End If

        If numstr >= 10 ^ 3 Then ' thousand
            newstr = NumToWord(Int(numstr / 10 ^ 3))
            numstr = ((numstr / 10 ^ 3) - Int(numstr / 10 ^ 3)) * 10 ^ 3
            If numstr = 0 Then
                tempstr = tempstr & newstr & "thousand "
            Else
                tempstr = tempstr & newstr & "thousand "
            End If
        End If

        If numstr >= …
debasisdas commented: thank you for sharing from my post. :) +13
Pgmer 50 Master Poster Featured Poster

Try using Ajax update panel.. Only the controls which all are in ajax panel will get refreshed rather the complete page..

Pgmer 50 Master Poster Featured Poster

Yes write it in modlue level. so that all the methods in all the form can use it..
Log the Stracktrace in textfile so that developer will come to know where the error is..

I heard using try catch finally block everywhere is expensive... so do some R&D on try catch and use accordingly..

Pgmer 50 Master Poster Featured Poster

What exactly you want? write what u want dont just say plzzz reply and all

Pgmer 50 Master Poster Featured Poster

ohh ok I am very sorry i think i have not read it properly before replying.
sorry debasis and sorry jaseem.

debasisdas commented: :) +9
Pgmer 50 Master Poster Featured Poster

You can do like this also

Private Sub TextBox1_MouseClick(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles TextBox1.MouseClick, TextBox2.MouseClick, TextBox3.MouseClick, TextBox4.MouseClick...till textbox10
        Dim strName As String = ""
        Dim text As TextBox = sender
        strName = text.Name
        MsgBox(strName)

    End Sub
Pgmer 50 Master Poster Featured Poster

Ya Adatapost, Its nice way actually.. Sorry i forgot that.:)

Pgmer 50 Master Poster Featured Poster

Hi,
Write the property in the form with get set values...
and set the values based on that. hope this will give you an idea