1,857 Posted Topics
Re: In this context, an algorithm is basically a programmatical solution to a problem. You really should read this [page](http://code.google.com/codejam/africa_arabia/faq.html). It will answer most of your questions. | |
Re: [Click Here](http://www.daniweb.com/software-development/visual-basic-4-5-6/threads/460797/code-for-login) [Click Here](http://www.daniweb.com/software-development/visual-basic-4-5-6/threads/19173/code-for-login-and-password..using-vb6) | |
Re: If you use the OrderBy method right before you cast to list, your list can be sorted by the urlname. Something like this should do: Dim WebLinks = (From line In IO.File.ReadAllLines("C:\Test\URLList.csv") _ Where line.Length > 0 _ Let Items = line.Split(","c) _ Select New With _ {.URLName = Items(0), … | |
Re: If you use the OrderBy method right before you cast to list, your list can be sorted by the urlname. Something like this should do: Dim WebLinks = (From line In IO.File.ReadAllLines("C:\Test\URLList.csv") _ Where line.Length > 0 _ Let Items = line.Split(","c) _ Select New With _ {.URLName = Items(0), … | |
Re: If you pay attention to Intellisense when you're typing your code, you'll be able to see that one of the overloaded options is using the name of the control as an index of the control collection | |
Re: Try: PictureBox1.Image = New System.Drawing.Bitmap(New IO.MemoryStream(New System.Net.WebClient().DownloadData(New Uri(ToolStripLabel1.Text)))) | |
Re: Try: Dim TempComboBox As CombBox = DirectCast(Me.Controls(selectedControl.Name), ComboBox) For Each item As String In TempComboBox.Items 'Do Stuff Next On a side not, the same concept can be used for the 'Text' property without the need for a dictionary. | |
Re: here's a [page of posts about barcodes](http://www.daniweb.com/search/query/printing-barcode-vb/0?q=printing+barcode+vb) here's a [customized barcode control](http://www.codeproject.com/Articles/10344/Barcode-NET-Control) for code 39 barcode here's a [post about printing barcodes](http://social.msdn.microsoft.com/forums/en-us/vbgeneral/thread/BB3FF901-7124-47A5-878E-77B86ED3E9F4) | |
Re: You'll probably have to create a list of file extensions and use the Contains method to see if the selected file's extension is in the list. | |
Re: or the old school trucker's trick, sunflower seeds. Just the act of taking them one at a time and breaking it open and eating it is enough to keep your minnd from getting bored and putting you to sleep. | |
Re: Try using "YYYY-MM-DD" instead | |
Re: A simple little routine like this will loop through the textboxes and set the backcolor of the one with the highest value: Dim MaxTB As New TextBox() MaxTB.Text = "0" For Each tb As TextBox In Me.Controls.OfType(Of TextBox)() Dim MaxValue As Double = 0 If tb.Name.StartsWith("Line") AndAlso Double.TryParse(tb.Text, MaxValue) AndAlso … | |
Re: Since your converting the string to Double in order to format it, you could store that Double, and use that in your calculations. Dim intTotal As Double = Val(lblTotal.Text) lblTotal.Text = intTotal.ToString("#,###,##0.00") Dim intVatable As Double = Val(lblVatable.Text) lblVatable.Text = intVatable.ToString("#,###,##0.00") Dim intTax As Double = Val(lblTax.Text) lblTax.Text = intTax.ToString("#,###,##0.00") | |
Re: You'll probably have to look at the [currency format specifier](http://msdn.microsoft.com/en-us/library/dwhawy9k.aspx?cs-save-lang=1&cs-lang=vb#code-snippet-3) and the [NumberFormatInfo Class](http://msdn.microsoft.com/en-us/library/system.globalization.numberformatinfo.aspx) which will allow you to format the string according to the currency format of different cultures. | |
Re: Or you could simply add the lines directly to the listbox: ListBox1.Items.AddRange(IO.File.ReadAllLines("textfile1.txt") Unless you're confused about the difference between a listbox and a multiline textbox, then add the file to a textbox like this: TextBox1.Lines = IO.File.ReadAllLines("textfile1.txt") If you need to be selective about which lines to add you can … | |
Re: While easy, that will throw an unhandled exceptioon error if the input string can't be converted to an integer. Using the int.TryParse something like this: Console.WriteLine("insert The Number::"); int c = 0; while (!int.TryParse(Console.ReadLine(), out c)) { Console.WriteLine("Invalid input"); } will make your code much less prone to error. `c` … | |
Re: Assuming you're not violating the website's terms of use, with a webbrowser control, the document property contains collections for images and links, that you could use to download them. This is all well and good, except that you'll have to parse the htmldocument and fix every link that needs to … | |
Re: Not sure where you got that syntax from. It is truncating 8 characters from your string though. And it works on 2 different compilers. | |
Re: The easiest is to use the login form template that comes with VB. If that's no good to you and really want to creat your own, follow these instructions for a basic login form. Add a new form to the project. Use a textbox and 2 buttons. In the textbox, … | |
Re: You will probably need more specific explanation about how exactly you want the repositories combined and what the code is or isn't doing. | |
Re: If you're using CLR and the .net librairies, you've come across one of the behavioural quirks of .net. When you handle the click and the double-click events for the same control, and the user double-clicks, the click and the double-click events are fired. One option, to overcome this, is to … | |
Re: The Tag property is an object. Basically cast it to whatever type of object you've set it too, the same as you're doing to cast sender as a button. For instance since you're setting the Tag property to an array of objects. So first you have to cast the tag … | |
Re: Also you're declaring an object called `posde`, but you're using an object called `RBSDE`. Is this on purpose? | |
Re: Use a Dictionary(Of String, String), make the key the long name and the value the abbreviation. | |
Re: As with any problem like this, you need to break it down into smaller problems. Design the solution for each problem to use standalone sub routines. Once you get code that doesn't work the way you'd like, we'll be more than happy to help you solve that problem. Remeber places … | |
Re: Have you at least put any effort into implementing the changes you've been told about? If so show your updated code and outline what it's doing wrong. We're not in the habit of doing people's homework for them. | |
Re: That exception would occur if Size is negative. | |
Re: It appears your main problem is not qualifying the textbox as belongiong to the tabpage. Something like this might work: Friend Sub LoadLog() Dim initialised As Boolean = False Dim CLB As TextBox = DirectCast(ChangelogPage.Controls("ChangeLogBox"), TextBox) While Not initialised Try Dim sr As StreamReader = _ My.Computer.FileSystem.OpenTextFileReader( _ My.Settings.logFilePath) CLB.Text … | |
Re: Since what you ask for is very subjective(what's easy for one person, might not be for another), your best option is to google "C# tutorial" and keep trying the different ones until you find the one(s) that suits you. Since your goal is professional programming, you might be better off … | |
Re: It appears you've miisspelled `"CstrmPmtStsRpt"`. It should be `"CstmrPmtStsRpt"`. Since that is a high level element and the query couldn't find it, the query couldn't find anything else. A tip that may help. You can open the xml file in VS in another tab. This way you can copy and … | |
Re: Here's a simnple routine that will fill your textbox with the ObjectId's. Pass the 2 search patterns in the order you want them searched and the filename, and the texztbox will take the id's. Use `textResults.Lines.Count()` to get the number of items after the sub routine is finished. private void … | |
Re: Welcome to DaniWeb. It's ok to put your code directly into your post. Use the `Code` option in the edit window menu. In addition to the code we also need the exact wording of the whole exception and the line in the code that triggered the exception. | |
Re: Here you go take your pick: [Click Here](http://social.msdn.microsoft.com/Search/en-US?query=barcode%20generator&ac=2) | |
Re: Did some more thinking on your problem, then realized all the info you want can be gleaned from the `ipconfig` utility. Here's some code that will fill a textbox with the connection specific information for the 'Local" connections. This can easily be tailored to whichever connection you want to examine. … | |
Re: Have you looked at the dock property of each control? If your needs are more complicated, you could handle the forms resize event and adjust each control according to the new size. | |
Re: You might want to consider a further check that X doesn't go less than zero. Something like: Do While Panel1.Width < 730 andalso Panel1.Location.X > 0 | |
Re: Or just because it's word doesn't mean you can't use plain text | |
Re: [DirectoryInfo Class](http://msdn.microsoft.com/en-us/library/system.io.directoryinfo.aspx) >- Exposes instance methods for creating, moving, and enumerating through directories and subdirectories. This class cannot be inherited. | |
Re: You basically have the right idea in the first snippet, assuming of course that all the controls were set up in the designer. The code in the child form isn't necessary you can do what you want from the parent form. With this code, when the child form is shown … | |
Re: What code have you tried, and what about it isn't working? | |
Re: Try the code in this [thread](http://www.daniweb.com/software-development/vbnet/threads/454424/search-in-a-datagrid). It actually filters the Datagridview, according to what is typed compared to the data in a specific column, until only one record is left. I might not be exactly what you're looking for but you should be able to adapt it. | |
Re: Show us the code that isn't working right. | |
Re: > I have a combobox and I want to "Add All" to a listbox, but without removing them from the combobox.. One quick and simple way to do that is to use the combobox.items collection as the datasource for the listbox. Something like this: `ListBox1.DataSource = ComboBox1.Items` | |
Re: The question mark might mean the Pos can't interpret the character. If it's supposed to be able to, the documentation should say what character code to use. Formatting should be possible using the PadRight method that is part of the String Class(Label1.Text.PadRight(15,"."c)). The caveat to this is that, if the … | |
Re: As far as your example is concerned the array would be redundant since you can use the Controls collection to do what you want: For Each b As Button In Me.Controls.OfType(Of Button)() b.Visible = False Next If necessary you can pick which buttons to make invisible by using a conditional … | |
Re: You might need to edit the designer file directly. If intellisense isn't returning any errors then the controls are probably declared but not added. It might be easier to build a new form with the controls you need and named properly and copy and paste the code into the new … | |
Re: Here's a way that uses a loop you're familiar with and sorts the 2D array in a linear fashion, which I assume is what you want: void sort(int myArray[5][3], int rows, int col) { for(int i = rows; i >=0; i--) { for (int j = 0; j < i; … | |
Re: If you use the [Process Class](http://msdn.microsoft.com/en-us/library/vstudio/system.diagnostics.process(v=vs.100).aspx) You can run any file and windows will use the associated program to open it. | |
Re: Here's a way based on the code I gave you before. I set it up to use a dictionary with the module code as the key and a list of the admin nos. as the value: 'Declare this class level Dim StudentList As New Dictionary(Of String, List(Of String)) For Each … |
The End.