Eternal Newbie 30 Newbie Poster

"multiple definitions with identical signatures" error means you have 2 (or more) subs with one same name. I suggest u might post those lines twice so better re-check, just delete all unwanted lines.

cgeier's "ModuleCustomer" was to: Seperate sub for timer with others, so you can use it on others forms in your project. Just guessing.

Eternal Newbie 30 Newbie Poster

I'm unable to add IIS Apppool\<pool_name> into Permission for both Components and Folders. When using Check Name: seems like there was no matching Apppool name.
My system: IBM server - Windows Server 2003. Beside, I have no experience for Win 03, but have always success with Win 08 - Really needing helps here!

Eternal Newbie 30 Newbie Poster

Creat a .dll file which you added to your projects, or a class which contains a public shared sub doing changing your language.
Create a public datatable contains languages you needed and their code, then inherit them in your forms.
Anw, writing all those was long and I'm being lazy now :))

Eternal Newbie 30 Newbie Poster

Not being able able to fully understand your question, it was, quite, complicated. If just some tables, why don't you add your tables into a dataset then use:

ds.WriteXml("C:\BackUp\New.xml")
Eternal Newbie 30 Newbie Poster

Oh friend, that was a simple one. Here's a help:

CloseButton.Anchor = AnchorStyles.Top + AnchorStyles.Right
Eternal Newbie 30 Newbie Poster

From "Kevin" (That project creator): If you are interested in the source, you can try http://www.liveswitch.com
you can buy the component there for $50 or contact support and ask to buy the source.
there is a demo component you can try which has a splash screen.
Support will get it to work in VS 2012 for you if you buy the source.

Eternal Newbie 30 Newbie Poster

Hey guys, that was quite a tricky question!
If you had a new table which was the inner join of multiple other tables, you could easily delete a row on the new table, right?
Or if you want to delete a row from the new table and then, together, deleting the rows with the values inside that deleted row from original tables. You must have a key to delete them with code, like:
If

Select a.*,b.* FROM a as Tbl1 INNER JOIN b as Tbl2 ON a.Key1 = b.Key2

, you should get a query to delete rows having Key1 from Tbl1, Key2 from Tbl2.
At least, show us your code then?

Eternal Newbie 30 Newbie Poster

@LUc: Thks again. But, Chart tool's only been available since .NET 3.0, VS 2008. Cause I'm Using VS 2005 and .NET 2.0, I couldn't add chart tool if not installing .NET 3.0. And, in fact, in some of my tries, Microsoft Chart tool is quite... not good, right?

Eternal Newbie 30 Newbie Poster

If you're wanting a startup process, you could go to :
Run > Type "msconfig" > Choose "Startup" tab > Check your process > Ok > Restart computer.
If you're wanting to create a project which run on startup of windows after install, I suggest using Microsoft.Win32 (or 64, I don't care). Seeing some on google, but it's giving out a bunch of junk files so should not try then.

Eternal Newbie 30 Newbie Poster

Here's how I'm handling things:

AddHandler Button1.Click, AddressOf NetworkConnectionChanged

Button1.Click could be remove with your event. And btw, AddHandler sometime doesn't work with Private Sub, use Sub instead might be safer.

Eternal Newbie 30 Newbie Poster

Thks Luc. Al last, I couldn't find a good solution then I removed zedgraph and now using my friend's dll.

Eternal Newbie 30 Newbie Poster

Sure. Here's my code:

        'Naming the axis scale as string
        Dim lablex() As String
        ReDim lablex(0 To dsRp.Tables(2).Columns.Count - 1)
        For xa As Integer = 0 To dsRp.Tables(2).Columns.Count - 1
            lablex(xa) = dsRp.Tables(2).Rows(0).Item(xa)
        Next
        myPane.XAxis.Type = AxisType.Text
        myPane.XAxis.Scale.TextLabels = lablex

        'Creating Bars with legend names
        Dim colN1 As String = ""
        Dim colN2 As String = ""
        Dim x As Integer = 0, y As Double = 0

        For i As Integer = 0 To dsRp.Tables(1).Rows(0).Item("So_ky") - 1
            Dim list As New PointPairList
            list.Clear()
            colN1 = "Ky" + (i + 1).ToString
            colN2 = "NKy" + (i + 1).ToString
            x = i + 1
            y = dsRp.Tables(0).Rows(0).Item(colN1.Trim)
            list.Add(x, y)
            Dim e As BarItem
            e = myPane.AddBar(dsRp.Tables(2).Rows(0).Item(colN2), list, RandomColor())
            e.Color = RandomColor()
        Next
Eternal Newbie 30 Newbie Poster

Recently I've used zedgraph barchart to create a chart with 12 bars. I did want to put each bar on an x-axis scale and change the label name of that scale, but I did not success. Could you please show me the way the put my bars inside the scales?

Eternal Newbie 30 Newbie Poster

Get you Accinfo table into a datatable (dt). You should have a TextBox to insert accname (TextBox1).

    Private Sub TextBox1_Validated(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox1.Validated
        For i As Integer = 0 To Dt.Rows.Count - 1
            If TextBox1.Text = Dt.Rows(i).Item("Text").ToString Then
                MsgBox("Acc has ...")
                Exit For
            End If
        Next
    End Sub
Eternal Newbie 30 Newbie Poster

Did you Dim mydatarow As DataRow() but not DataRow? Ok, normally people do that. But, you cannot add a whole array instead of an item into ListViewItem. Please use For loop to add each ListViewItem.

        For i As Integer = 0 To mydatarow.Length - 1
            ListView1.Items.Add(New ListViewItem(mydatarow(i)("FirstName").ToString, mydatarow(i)("LastName").ToString))
        Next
Eternal Newbie 30 Newbie Poster

Then you should create a GroupObject, you group with Sr.No as key. Then, at the end of each group you set AddNewPage, so you could have each group on different pages. Then do SUM on Group to have the value GrandTotal per page.

Eternal Newbie 30 Newbie Poster

There's no option for .txt in CR, but, you can still get a bad version of .txt if you want.

        Try
            Dim CrExportOptions As ExportOptions
            Dim CrDiskFileDestinationOptions As New DiskFileDestinationOptions()
            Dim CrFormatTypeOptions As New PdfRtfWordFormatOptions
            CrDiskFileDestinationOptions.DiskFileName = "YourDestination"
            CrExportOptions = myReportDocument.ExportOptions
            With CrExportOptions
                .ExportDestinationType = ExportDestinationType.DiskFile
                .ExportFormatType = ExportFormatType.RichText
                .DestinationOptions = CrDiskFileDestinationOptions
                .FormatOptions = CrFormatTypeOptions
            End With
            myReportDocument.Export()
        Catch ex As Exception
            MsgBox(ex.ToString)
        End Try
Eternal Newbie 30 Newbie Poster

I checked briefly through your code and the problem seemed to be that diskDestination.
I'm not sure since I'm not a pro. In my point of view, HTML is not only a file, it contains many objects and they're in a folder. Then when you creating a file but not a file and a folder, things might not working your way.

        Try
            Dim selectedReport As New ReportClass
            Dim CrFormatTypeOptions As New HTMLFormatOptions
            CrFormatTypeOptions.HTMLBaseFolderName = "d:\test"
            CrFormatTypeOptions.HTMLFileName = "htmlformat.htm"
            Dim CrExportOptions As ExportOptions
            CrExportOptions = myReportDocument.ExportOptions
            With CrExportOptions
                .ExportFormatType = ExportFormatType.HTML40
                .FormatOptions = CrFormatTypeOptions
            End With
            myReportDocument.Export()
        Catch ex As Exception
            MsgBox(ex.ToString)
        End Try
Eternal Newbie 30 Newbie Poster

I fixed it, but replaced the For Each with For:

        For i As Integer = 0 To ds.Tables("data").Rows.Count - 1
            If ComboBox1.SelectedItem.ToString = ds.Tables("data").Rows(i).Item("YourColName").ToString() Then
                TextBox1.Text = ds.Tables("data").Rows(i+1).Item("YourColName").ToString()
                TextBox2.Text = ds.Tables("data").RowsRows(i+2).Item("YourColName").ToString()
                '.... add more textbox
            End If
        Next
Eternal Newbie 30 Newbie Poster

I notice you didn't have @farmer when adding value, the query wasn't complete. Try add @farmer value and see what's going to happen.

Eternal Newbie 30 Newbie Poster

You're not conneting with the database, or your query is wrong, or value is NULL, etc.
Say, why did you give out a no-information question? Please show more information, sample code, or image, or description so we could provide better helps.

Eternal Newbie 30 Newbie Poster

First, I should say that CR is not going to filter table out, so you should filter them first in VB.Net.
You should create 2 tables:
Table 1 contains: Sr.No, Sr Name,etc. and a final GrandTotal (which was calculated in VB.Net). Only have 1 row and works as the main information. This table will be added to the HeadReport section on CR so that will only be shown once in report.
Table 2 contains: Detail ProductName,Weight, Rate, Total ,VAT which filter with Sr.No and have multiple rows. This table will be added to Detail section on CR so that will show multiple values in report.

Eternal Newbie 30 Newbie Poster

I tested your code and it was right. But, somehow, your ds did not change during run time and it makes your combobox couldn't change, too.
My recommendation: Place your combobox loading sub on some where it continually checking SQL and update a new dataset when your SQL table change.
Hope this help.

Eternal Newbie 30 Newbie Poster

The login detail may be change due to the change of database path in crystal report. I supposed you used local path when creating data connection in your report, and then when you move to another computer, your report couldn't find the old path.
That's just my first idea, there could be other problems, too. Right now I don't know what kind of connection you're using, what kind of table you have in Ms Access... you should give a more detail sample. We need more information than this.

Eternal Newbie 30 Newbie Poster

I'm using Unicode and Vietnamese with MS Access 2007 and till now no problem rasing. My default encode was UTF-8, I installed Vietnamese language pack and set reagion to +7 in control panel.
Well, I wish my information could help you, those problem with regional language were the worst.

Eternal Newbie 30 Newbie Poster

@GeekPlease: No problem, bro.
Marking this as solved so people can see it.

Eternal Newbie 30 Newbie Poster

@Jim: Yes, it was about objects. Sorry.
@Waddell: I did mentioned the Doc Outline before, and it was better than the property scroll, though.
The thread has become quite long now, thks for great helps, guys :)

Eternal Newbie 30 Newbie Poster

It's quite hard to understand what you're wanting. The problem could lie where you're setting datatable property. But if it's not, I suggest to dim a string first, insert later:

Dim Prdt as String
Prdt = TextBox1.Text.Trim
YourDataTable.Rows.Add(Prdt,Col1Value,Col12Value...)
Eternal Newbie 30 Newbie Poster

I think the problem here is: You're using selecteditem.value, which is - the value return after combobox clicked. To fill a combobox, I'll use .DataSource and .ValueMember:

Dim Dt as New DataTable
objDataReader.Fill(Dt)
cmbExecutor.DataSource = Dt
cmbExecutor.ValueMember = "Executor"
Eternal Newbie 30 Newbie Poster

CustomFormat = "hh:mm t"

Eternal Newbie 30 Newbie Poster

Hmmm then here I have 2 solution:
1. Saving an old datatable of datagridview data, edit your datagridview then loop through 2 tables to see the different, remove old datatable after save. In this case, you could avoid being full of MsgBoxes on screen.
2. Get your editing cells Selected = true together with your calculation. Each time a cell change, it will be select and then you can freely choose to use any solutions from ddanbe or from me.

Eternal Newbie 30 Newbie Poster

@Hearth: Actually, if I want to see all the hidden objects, I can do it better with Document Outline. But Document Outline won't let you keep objects location so it's really annoying.

Eternal Newbie 30 Newbie Poster

Well, if there're some hidden forms which being outside form border, what should I do to make sure they still there?

Eternal Newbie 30 Newbie Poster

Yes, TopMost brings you form to top on screen. That means: You'll see your form on top of everything (even windows which not in your project) and unable to bring it to the back later (it's always on top).
I use True first, bring it to front, then False after then so we can bring it to back later if we want.

Eternal Newbie 30 Newbie Poster

Yes, I did used:

Me.TopMost = True 'Then it will bring the form to top
Me.TopMost = False 'Remove .TopMost state so you can work on other forms, too
Eternal Newbie 30 Newbie Poster

@Jim: Yes, i'm doing it everyday and wanting another solution now.

Eternal Newbie 30 Newbie Poster

@ddanbe: Then I was wrong, sorry then, I did think that GeekPlease wants to return value from col "Id" in his table (which was different from the col index).
@GeekPlease: Changed my code, super fast and easy now:

    Private Sub DataGridView1_CellValueChanged(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellValueChanged
        MsgBox(DataGridView1.SelectedCells.Item(0).ColumnIndex)
    End Sub
ddanbe commented: That's the spirit! +14
Eternal Newbie 30 Newbie Poster

Then when changing your cell value you get it's index together? If you already had a code loop your datagridview through, get the ids and catch cells' index together with it.

Eternal Newbie 30 Newbie Poster

I understand your idea, tinstaafl, but then is there a way so we won't have to use code, some property or some... thing?

Eternal Newbie 30 Newbie Poster

Came up with a bad idea, you might try this out:

    Private Sub DataGridView1_CellEndEdit(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellEndEdit
        MsgBox(DataGridView1.Rows(DataGridView1.SelectedCells.Item(0).RowIndex).Cells("Text").Value.ToString())
    End Sub
Eternal Newbie 30 Newbie Poster

Hmm, normally, I just cut all those controls out and delete the GroupBox. But, it's not easy all the time, so me just wondering if there was a way to do it without touching the child controls.
Remove the relationship? Or other otions?

Eternal Newbie 30 Newbie Poster

Hey Shan, bdev's trying to tell you to fill the Try-Catch with "What you want", for example:

Try
    Dim a as String = ""
    a = txtadd1.Name
    MsgBox(a.ToString)
    '... then do something you want here
Catch ex As Exception
    MsgBox(ex.ToString)
End Try
Begginnerdev commented: Trying to force them to think :) +8
Eternal Newbie 30 Newbie Poster

I fixed it now, try this:

    Public Function GetRandom(ByVal Min As Integer, ByVal Max As Integer) As Integer
        Dim Generator As System.Random = New System.Random()
        Return Generator.Next(Min, Max)
    End Function

    Conn = getConnect()
    sqlCmd = Conn.CreateCommand
    sqlCmd.CommandText = "SELECT question FROM questionnaires"
    dataadapter.SelectCommand = sqlCmd
    dataadapter.Fill(dSet, "questionnaires")
    dTable = dSet.Tables("questionnaires")
    Dim i, j, n As Integer
    n = 2 'Anything is okay
    i = GetRandom(0, n)
    j = GetRandom(0, n)
    If dTable.Rows.Count >= 2 * j + i Then
    q1.Text = dTable.Rows(j + i).Item("question").ToString.Trim
    q2.Text = dTable.Rows(2 * j + i).Item("question").ToString.Trim
    End If
Eternal Newbie 30 Newbie Poster

Add your questions table into an datatable, then:

Dim i, j, n as Integer
n = 3 'Anything is okay
i = CInt(Math.Ceiling(Rnd() * n))
j = CInt(Math.Ceiling(Rnd() * n))
If Dt.Rows.Count >= 3*j + i Then 
    TextBox1.Text = Dt.Rows(j + i).Items("Question").ToString.Trim
    TextBox2.Text = Dt.Rows(2*j + i).Items("Question").ToString.Trim
    TextBox3.Text = Dt.Rows(3*j + i).Items("Question").ToString.Trim
End If

It's a simple version. If you have a array of textboxes, then Loop through it together with your table.

Eternal Newbie 30 Newbie Poster

I discribe brief idea and you'll finished it. This solution lack a Database to store the data, so you might need to create one:

'The public value
    Public Dt As DataTable = GetTable()
    Function GetTable() As DataTable
        Dim table As New DataTable
        table.Columns.Add("Text", GetType(String))
        table.Columns.Add("Date", GetType(DateTime))
        Return table
    End Function
'In form which contains textbox
    Private Sub TextBox1_Validated(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox1.Validated
        If TextBox1.Text <> "" Then
            Dim Dr As DataRow = Dt.NewRow
            Dr.Item(0) = TextBox1.Text
            Dr.Item(1) = Now.ToString()
            Dt.Rows.Add(Dr)
            Dr = Nothing
        End If
    End Sub
    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        FormDgv1.Show()
    End Sub
'FormDgv1: form contains datgridview to show history:
    Private Sub FormDgv1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Me.DataGridView1.DataSource = Dt
        Me.DataGridView1.Sort(DataGridView1.SelectedColumns("Date"), System.ComponentModel.ListSortDirection.Descending)
    End Sub
Eternal Newbie 30 Newbie Poster

Happy to see someone's learning new things in VB.Net. I changed the code so you can understand it better:

        For Each ci As String In CheckedListBox1.Items
            If ci.Trim Like Ftxt.Trim Then
                MsgBox(ci)
            End If
        Next
Eternal Newbie 30 Newbie Poster

Here's a code of mine, almost solving the same problem as yours:

        If TextBox1.Text <> "" Then
            Ftxt = TextBox1.Text
            For i As Integer = 0 To Me.CheckedListBox1.Items.Count - 1
                If CheckedListBox1.Items(i).ToString.Trim = Ftxt.Trim Then
                    CheckedListBox1.SetItemChecked(i, True)
                End If
            Next
        End If
Eternal Newbie 30 Newbie Poster

I believe .FileName in Vb.Net is a name with a path, but that doesn't matter. If you couldn't use For Each then For Next, and if you have a .FileNam then remove the path. Here's your code then, since it finished, mark this question as solved if you found your answer:

        Dim Path As String = "Your Path Here, with a "\" at the end"
        Dim file() As String = Directory.GetFiles(Path.Trim, "*.txt")
        For i As Integer = 0 To file.Length - 1
            Dim SMSdtl As String
            Dim txtReader As New System.IO.StreamReader(file(i))
            Do While txtReader.Peek() <> -1
                SMSdtl = txtReader.ReadToEnd.ToString.Trim
            Loop
            TextBox4.Text = SMSdtl.ToString.Trim
            TextBox1.Text = file(i).Replace(Path.Trim, "").Trim
        Next
Eternal Newbie 30 Newbie Poster

Yuck! I did meant:

LIKE *Name*

Or:

LIKE *@Name*

But the code was auto-corrected later :P
If I'm still wrong, I might need a sample and trying doing this my own :D

Eternal Newbie 30 Newbie Poster

Actually it's quite simple.
The f in the those code lines is itself a .Filename, so you only need to fill f to your TextBox3, SMS information into TextBox4. I'll give you some hints to make it easier, it'll work right away but might need some fixes to avoid marginal errors.

Dim f As String() = Directory.GetFiles("YourTextFilesPath", "*.txt")
For Each f In f()
    Dim SMSdtl As String
    Dim txtReader As New System.IO.StreamReader(f)
    Do While txtReader.Peek() <> -1
            SMSdtl = SMSdtl & txtReader.ReadLine() & vbNewLine
    Loop
    Textbox3.Text = f
    Textbox4.Text = SMSdtl
Next