Forum: VB.NET Aug 14th, 2009 |
| Replies: 4 Views: 2,045 This should work:
label24.Text = String.Format("{0:F2}", a/b) |
Forum: VB.NET Aug 14th, 2009 |
| Replies: 3 Views: 399 It would probably be possible, but I would probably rethink why there are database calls inside of the constructor. I would rather split it out into a separate call.
Here's a link to a Microsoft... |
Forum: VB.NET Aug 5th, 2009 |
| Replies: 4 Views: 208 Have you tried taking renamed "Colour Name" to something like "ColourName"? It might not like the space. |
Forum: VB.NET Feb 20th, 2009 |
| Replies: 2 Views: 719 You would probably have to play with the count and where the message box is displayed to get this to be exactly what you want, but I think something like this should work.
Public Class Form1
... |
Forum: VB.NET Feb 13th, 2009 |
| Replies: 2 Views: 649 You could use a Dictionary to create a set of key-value pairs. You could use the name of the food as a string key and the votes as an int value.
... |
Forum: VB.NET Feb 13th, 2009 |
| Replies: 2 Views: 538 Have you tried just reading in the lines and splitting based on the "." and "{"?
Dim streamRead as StreamReader = new StreamReader("xyz.css")
Dim input As String = streamRead.ReadLine()
Dim... |
Forum: VB.NET Jan 23rd, 2009 |
| Replies: 1 Views: 326 If all you have to do is validate each line of text, the System.IO.StreamReader class would be my choice. Just read in each line and do any validation you need to do. Splitting each line by the '\'... |
Forum: VB.NET Nov 26th, 2008 |
| Replies: 3 Views: 1,078 I'm assuming you want to check the values before making the call to the FV function. If that's the case, you could accomplish what you're trying to do with three simple if statements. Something like... |
Forum: VB.NET Apr 30th, 2008 |
| Replies: 7 Views: 3,307 If you're simply trying to see if a row was returned, just take your result DataSet and do something like...
if result.Tables[0].Rows.Count = 0 then
'nothing was found
end if
or
if... |
Forum: VB.NET Apr 30th, 2008 |
| Replies: 7 Views: 3,307 Let me know if you try that and anything is deprecated. I originally used it in .NET 2.0. |
Forum: VB.NET Apr 30th, 2008 |
| Replies: 7 Views: 3,307 The first piece of code you would need is a way to execute the queries. The following is a simple method that just takes a SqlCommand and returns a DataSet with the results.
Private Function... |
Forum: VB.NET Apr 30th, 2008 |
| Replies: 3 Views: 890 Assuming both PC's will be Windows, you could always just try putting the database on a different computer inside of a shared folder like and using \\IP_address\shared_folder\database as the... |
Forum: VB.NET Apr 30th, 2008 |
| Replies: 7 Views: 3,307 What version of .NET are you using?
If you have the System.Data.SqlClient (or even System.Data.OleDb) library available, it's actually really easy to do what you're trying to do. I can put up some... |