1,857 Posted Topics

Member Avatar for williamscorn

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.

Member Avatar for Yetzederixx
0
295
Member Avatar for kunwar094

[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)

Member Avatar for DM Galaxy
0
264
Member Avatar for Paul_15

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), …

Member Avatar for Paul_15
0
145
Member Avatar for Paul_15

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), …

Member Avatar for Paul_15
0
117
Member Avatar for pc20912

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

Member Avatar for pc20912
0
281
Member Avatar for Ahmed.C

Try: PictureBox1.Image = New System.Drawing.Bitmap(New IO.MemoryStream(New System.Net.WebClient().DownloadData(New Uri(ToolStripLabel1.Text))))

Member Avatar for tinstaafl
0
777
Member Avatar for nikki05

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.

Member Avatar for nikki05
0
230
Member Avatar for pearl.kumar1

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)

Member Avatar for tigerwoods11
0
296
Member Avatar for Ahmed.C

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.

Member Avatar for tinstaafl
0
157
Member Avatar for imBaCodes

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.

Member Avatar for Troy III
1
616
Member Avatar for monching
Member Avatar for Kratoswoo

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 …

Member Avatar for ss125
0
304
Member Avatar for chad.calamba05

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")

Member Avatar for nashy13
0
2K
Member Avatar for branding4you

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.

Member Avatar for xcrunner15
0
984
Member Avatar for chocomilk

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 …

Member Avatar for tinstaafl
0
230
Member Avatar for Saqlainz

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` …

Member Avatar for Mike Askew
-2
285
Member Avatar for Mr.M

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 …

Member Avatar for Mr.M
0
328
Member Avatar for dev90

Not sure where you got that syntax from. It is truncating 8 characters from your string though. And it works on 2 different compilers.

Member Avatar for dev90
0
128
Member Avatar for Sebastian_1

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, …

Member Avatar for Sebastian_1
0
166
Member Avatar for singularity~

You will probably need more specific explanation about how exactly you want the repositories combined and what the code is or isn't doing.

Member Avatar for tinstaafl
0
206
Member Avatar for Shels

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 …

Member Avatar for tinstaafl
0
208
Member Avatar for de Source

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 …

Member Avatar for tinstaafl
0
168
Member Avatar for de Source

Also you're declaring an object called `posde`, but you're using an object called `RBSDE`. Is this on purpose?

Member Avatar for de Source
0
182
Member Avatar for ammukarthi

Use a Dictionary(Of String, String), make the key the long name and the value the abbreviation.

Member Avatar for ShahanDev
0
221
Member Avatar for Zezo_1

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 …

Member Avatar for tinstaafl
0
236
Member Avatar for jacksmith655

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.

Member Avatar for tinstaafl
0
237
Member Avatar for Minko
Member Avatar for Eruditio

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 …

Member Avatar for Eruditio
0
671
Member Avatar for Mr Programmer

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 …

Member Avatar for <M/>
0
219
Member Avatar for G_Waddell

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 …

Member Avatar for G_Waddell
0
657
Member Avatar for AquaNut

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 …

Member Avatar for AquaNut
0
265
Member Avatar for marouane12

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.

Member Avatar for marouane12
0
3K
Member Avatar for eos.paks

Here you go take your pick: [Click Here](http://social.msdn.microsoft.com/Search/en-US?query=barcode%20generator&ac=2)

Member Avatar for heartbeet
0
176
Member Avatar for Sebastian_1

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. …

Member Avatar for tinstaafl
0
268
Member Avatar for shenn.to

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.

Member Avatar for shenn.to
0
176
Member Avatar for nnayram
Member Avatar for Jake.20

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

Member Avatar for Jake.20
0
1K
Member Avatar for ComputerFirstAde
Member Avatar for BigFatMama
0
410
Member Avatar for AmrMohammed

[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.

Member Avatar for tinstaafl
0
166
Member Avatar for GeekPlease

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 …

Member Avatar for tinstaafl
0
467
Member Avatar for alfdon1
Member Avatar for Phalla_1

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.

Member Avatar for Phalla_1
0
233
Member Avatar for Sebastian_1
Member Avatar for yagelnnn1

> 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`

Member Avatar for tinstaafl
0
151
Member Avatar for yvrej17_1

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 …

Member Avatar for tinstaafl
0
2K
Member Avatar for nosfa

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 …

Member Avatar for tinstaafl
0
174
Member Avatar for imperator

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 …

Member Avatar for tinstaafl
0
220
Member Avatar for avinash.jay.7

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; …

Member Avatar for tinstaafl
0
246
Member Avatar for Mr.M

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.

Member Avatar for tinstaafl
0
223
Member Avatar for Fangling

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 …

Member Avatar for Fangling
0
107

The End.