638 Posted Topics
Re: Please read [URL="http://msdn.microsoft.com/en-us/library/system.drawing.printing.printersettings.aspx"]here[/URL] about the System.Drawing.Printing.PrinterSettings class. Hope this helps | |
Re: Do you need an index to set the destination index value in the priceArray. [CODE]Dim Idx as Integer = 0[/CODE] Then, On the enterButton_Click yopu need to add the value to the array like [CODE]priceArray(Idx) = Ctype(enterPriceTextBox.Text, Decimal) ' This can fail if the entered value is not numeric [/CODE] … | |
Re: The main goal is to avoid the situations where an unexpected exception is thrown. Using try / catch blocks can help you to properly catch the execptions, but not to avoid it. Even more, you need to code the actions to do when the catch block is hit. IE: If … | |
Re: There is no insert, no update and no delete commands of the dataadapter to be used in the da.Update(ds, "Register") sentence. Please provide the corresponding commands. (see [URL="http://msdn.microsoft.com/en-us/library/system.data.oledb.oledbdataadapter(v=VS.100).aspx"]here[/URL]) | |
Re: Without seeing your code is difficult to say what is the origin of the problem. Instead of disposing the DGV, try disposing the Second form and creating a new one before showing in dialog mode. Hope this helps. | |
Re: I would suggesto to do some changes in the Button1_Click sub like: [CODE]Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim strOriginalWords As String() Dim strPigLatin As String strOriginalWords = TextBox1.Text.Trim.Split(" "c) Label1.Text = "" ForEach strWord as String in strOriginalWords Call Convert_to_Pig_Latin(strWord, strPigLatin) Label1.Text &= … | |
Re: Just some hints. On the getLastId sub, you miss to close the datareader. It is required for the loadOrder to work. Maybe, the getTotals sub must be called after the loadOrder to have all the info. If you need to load the info from only one order number, i will … | |
Re: You can use a loop/end loop to still searching while <pre> is found. Also you need to use the last position of the </pre> to start the new search from that point. This is an untested excample: [CODE]start = htmlsource.indexof("<pre>") Loop While start <> -1 start += 5 end = … | |
Re: Use the [URL="http://msdn.microsoft.com/en-us/library/system.string.split.aspx"]string split [/URL]to separate each line in the source info, using the # as separator char (this will remove the separator from the response. The string split, will return an array of strings. Each element of hte array will contain one of the lines. You will need to … | |
Re: Just to clarify, when you say [QUOTE]all the combo boxes are linked to the same table [/QUOTE] that means you have a unique datatable as data source for all the comboboxes? Or you are filling the combobox items using a datareader? In the first scenario when you select an item … | |
Re: Please, try to add [CODE]frmMain.lvTraining.Refresh()[/CODE] just before the End Sub. Hope this helps | |
Re: For your knowledge, and only if you prefer to implement your own sorting algorithm, there are a [URL="http://en.wikipedia.org/wiki/Sorting_algorithm"]bunch of them.[/URL] Hope this helps | |
Re: I normally install each application in a separate folder, to be able to mantain their assemblies separately, but, there is no restriction to install two or more applications in the same folder. [URL="http://msdn.microsoft.com/en-us/library/yx7xezcf(v=VS.100).aspx"]How the runtime locates assemblies[/URL] is what determines wich assembly will be used by your application. Hope this … | |
Re: you can change this event as: [CODE]var returnList = e.Result.ToList(); dgv.ItemsSource = resultList; txtlastrep.Text=(string) returnList[returnList.Count-1];[/CODE] Hope this helps | |
Re: Yes, your father is right. But ... This is allowed only to users with Admin rights, and givin admin rights only to use IE appears to be risky. If you want 2 normal users to use the server to navigate with IE, you will need to buy the Terminal Server … | |
Re: One method can be: Create a new empty ArrayList Open the file with a text reader. Then read the file one line at time using the readLine method until the end of file. For each read line( if any ), add the string to the ArrayList. Finally, close the text … | |
Re: IMO you miss to pass the parameters values to the query before executing the insert. See [URL="http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlcommand.parameters.aspx"]here[/URL] for an example. Hope this helps. | |
Re: In your code, line 44 you create a new dataset, overriding the previous. With this action, in your dataset you will have only one table. Instead youu need to have both. I would suggest to remove this line. Then, when you create the relation, in [CODE]DataRelation datare = ds.Relations.Add("percon", ds.Tables[0].Columns[0], … | |
Re: Assuming there is one record to show, the [CODE]If objDataReader.Read = 0 Then End If[/CODE] will read the first record returned; then [CODE] While objDataReader.Read[/CODE] will try to read the second one, but only one exist so the condition is currently false and nothing filled in the listview. I will … | |
Re: As far as I can see, the preview is returning a blank page, because the line [CODE]Dim strText As String = Me.ListView1.Text[/CODE] returns an empty string, as expected because you never filled his text propery. Probably you should need to do some thing like [CODE]Dim strText as String For Each … | |
Re: Do not use the following characters in the file name: / (slash) \ (back slash) ? (question mark) * (star) " (quotes) > (greater than) < (less than) | (pipe) : (colon) (\0) (null char) The : (colon) character can appear only once in the full path to define de … | |
Re: I would suggest to uae [CODE] textBox7.Text = oreader.GetString(0)[/CODE] Hope this heslps | |
Re: Please post your table design and code written in order to try to help you | |
Re: I would suggest 2 points: 1) Change [ICODE]Public Function GenerateCode() As Object[/ICODE] to [ICODE]Public Function GenerateCode() As String[/ICODE] 2) Change [ICODE]Public Function GetPID()[/ICODE] to [ICODE]Public Function GetPID() as String[/ICODE] Hope this helps | |
Re: Please try: [CODE]Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim myVar As String myVar = Strings.StrConv(TextBox1.Text, VbStrConv.ProperCase) TextBox1.Text = myVar End Sub[/CODE] | |
Re: A simple way is to Use a log in form to ask for them ( a 2 textbox form and an accept and cancel buttons may be enough) If the user cancels, then close the application. You can verify if this is an allowed user by searching it in the … | |
Re: Please be so kind to describe the goal of your[CODE]Private Sub frangracecombolist_SelectedIndexChanged[/CODE] and where you fill this fragancecombolist before the SelectedIndexChange event is fired. Thanks in advance | |
Re: Read [URL="http://blogs.office.com/b/microsoft-access/archive/2010/05/10/download-access-2010-runtime-database-engine-redistributable-and-source-code-control.aspx"]here[/URL] for the Access 2010 Runtime, Database Engine Redistributable Hope this helps | |
Re: On your installer project, on the file system, under application folder add the database. If if you need the database in a distinct folder, then add it to the file system tab and put the database inside. Hope this helps | |
Re: Plase, be so kind to try [CODE]dr = cmd.ExecuteReader While dr.Read() If cbPartylist.Text = (dr("PartylistName").ToString())Then cbPres.Items.Add dr("Lname") & ", " & dr("Fname") & " " & dr("MI").ToString()) End If End While[/CODE] Hope this helps | |
Re: Is really easy to implement. Assume you want to modify the value of a progress bar, in htis example toolStripProgressBarMain. Direcly assigning the value to the control can result in a cross threading unsafe call. To avoid this Create a delegate like: [CODE]Delegate sub SetProgressDel(percentage as double)[/CODE] And instantiate it … | |
Re: In order to retrieve data from a database you'll need: a) Open a connectino to the database b) Create a SELECT command from the table, filtering the result if needed. [INDENT]The result of this command can be retieved using 2 ways * Fill a table in a dataset using a … | |
Re: You can't convert a file being an exe to be a .bat or a .msi In fact, what you are doing on your code is just renaming a .txt file as .exe Obviously you can rename a file to whatever you want, but this will not [B]convert[/B] it. | |
Re: You are trying to get a position 128 bytes before the end of file. As you just created it, the file is empty and the seek position results to be before the BOF. Hope this helps | |
Re: The listbox selected item is always an object. You can use the [URL="http://msdn.microsoft.com/en-us/library/0ec5kw18(v=vs.80).aspx"]TypeOf [/URL]operator to verify if it is a FileInfo or a DirectoryInfo class object, then act according. Hope this helps | |
Re: You must control the LWin and RWin key codes on the keypreview event on form. Hope this helps | |
Re: For your purpose, line 89 should be [CODE]Try myData = command.ExecuteReader() If Not myData.HasRows Then ' Password not found 'TODO: what you will need when the user and password does not exists in the DB Else ' Password found 'TODO: What you will decide when the password is found End … | |
Re: Just can try some thing like: [CODE]Dim sepChars() as Char = {" "c} For Each strLine In RichTextBox.Lines Dim wordInLine As String = strLine.Split(sepChars) ... End For[/CODE] Hope this helps | |
Re: 2 options: a) do not hid the primary key, hid their visibility in the datagridview b) use an OleDbCommand to upate the database, then refill the datatable and refresh the datagridview. Hope this helps | |
Re: I reproduced the problem using the following punch_details table definition in SQL 2008: ColumnName Data Type empCode int date date time time Then I filled it with your example data and I wrote the following query: [CODE]SELECT a.empCode, a.[date], a.[time] AS intime, b.[time] as break_out, c.time as break_in, d.time as … | |
Re: Did you tried to use only AnchorStyles.Right for those 2 labels? BR | |
Re: Probably this is happening because the last addres is always a blank("; ". To avoid this, I would suggest to do a simple change in the get function to be like: [CODE] Do While Not Result.EOF If (strEmailAdd.Length>0) Then strEmailAdd = strEmailAdd & "; " strEmailAdd = strEmailAdd & Result("emailAdd") … | |
Re: I would suggest do some thing like: Option a: 1) Define the characters to be separators_cahrs 2) Define the valid_result_line 3) Define a boolean to be true is the_previous_charactes_was_a_separator 4) For each character in the strLine [INDENT]a) if the_previous_charactes_was_a_separator and this character is a separator_char [INDENT]* Continue the foreach[/INDENT] b) … | |
Re: Most propably is that one (or more) of the comboboxes has no SelectedItem. By default, there is no SelectedItem on a combobox. To verify if the combo has one, verify that the SelectedIndex value is greater than -1. Also is a common good practice to verify that all the fields … | |
Re: If you are usiong SQL Server, you can merge a query from your table obtaining an empty structure and the table filtered contents using a union all joint like [CODE]SELECT Month, Year, Sum(F1) AS Fi1, Sum(F2) AS Fi2, Sum(F3) as Fi3, Sum(F4) as Fi4 FROM (SELECT DISTINCT Month, Year, 0 … | |
Re: I would suggest to put a second eye on the installed languages, the supported codes, and the one used as default language, the default keyboard, and in the regional settings the default number of decimal places for numeric formats. Also, if the output format is a requirement, i will suggest … | |
Re: In order to compute the length of a structure mostly you'll need to create a default (dummy) instance of it an then compute their size. Maybe this code, from [URL="http://www.informit.com/guides/content.aspx?g=dotnet&seqNum=698"]Jim Mischel[/URL], is valid for you: [CODE]public static int GetSize<T>() { Type tt = typeof(T); int size; if (tt.IsValueType) { if … | |
Re: Of Course you can load it using some thing like:[CODE] For RowNum as Integer = 0 to ds.Tables(0).Rows.Count -1 Dim CurrRow as DataRow = ds.Tables(0).Rows(RowNum) ' ' Assuming the data Grid View has enough rows ' DataGridView1.Rows(RowNum).Cells("column1").Value = Currrow("column1").Value DataGridView1.Rows(RowNum).Cells("column11").Value = Currrow("column11").Value . etc Next[/CODE] Hope this helps | |
Re: Videolan player (free for personal use) has the possibility to be used as an ActiveX control an can report most of the metadata related to the media. Plese refer to [URL="http://wiki.videolan.org/.Net_Interface_to_VLC"]this page[/URL] for more info Hope this helps | |
Re: Maybe you need to close the preceding apostrophe before the WHERE clause like: [CODE] "', TIN_No='", rec.txtTIN, "',PAG_IBIG_No='", rec.txtPagibig, "[COLOR="Red"]'[/COLOR] WHERE Emp_ID=",rec.Emp_ID), clsData.con);[/CODE] Hope this helps |
The End.