1,857 Posted Topics
Re: looks to me like you're building your connection string wrong. Try adding a semi-colon between dbProvider and dbSource | |
Re: When you declare the class do it in a public module. that way it's accessible to every class in the project, without having to pass it as a parameter. | |
Re: I think the problem you're having is that arr4 isn't initialized fully, so some of the elements in it have random values. Try changing `k<size` to `k<count` | |
Re: How are you verifying the data in the textboxes? Your code should work. If ` EVENT_ASSOC2.Text = "Stolen" And ORIGINAL_VALUE.Text = ""` then you should get the first error message. The second error message will only show if `EVENT_NUMBER.Text = "" Or person.Text = ""` and the first error message … | |
Re: When using Convert you will get that error if there is anything in the text string that is not a digit, a comma, or a period. An easy way to trap this error is to use the `Double.TryParse` method, on each string before you do your calculations, and use a … | |
Re: Was doing some digging on a different matter and came across this [sample code](http://msdn.microsoft.com/en-us/library/cwbe712d.aspx?cs-save-lang=1&cs-lang=vb#code-snippet-1) from MSDN. As was typical, I had to tweak things, namely adding the button to the controls collection, and adding handlers for the button click, and the printdocument printpage. Then I created a text file with … | |
Re: It's kind of hard to tell without the rest of your code, which is probably too big to post. But, one thing I noticed in the `OrderDetails_Inserting` sub routine your passing `OrderDetail` as a parameter but your code doesn't use it. | |
Re: You could use an event handler. How, is hard to say without seeing how you're receiving the text. Here are some [posts](http://www.daniweb.com/search/query/sending-sms-vb.net/0?q=sending+sms+vb.net) that might help | |
Re: If you include the Common Language Runtime you can use the System namespace and the IO class, which includes the File class. Here's an example which works in VS2010: #include "stdafx.h" using namespace System; using namespace System::IO; int main(array<System::String ^> ^args) { if(File::Exists("C:\\1.xml")) Console::WriteLine("Yes"); else Console::WriteLine("No"); String^ Test = Console::ReadLine(); … | |
Re: Try something like this: dataGridView1.Rows.Add("Mark",11,15,14,0); dataGridView1.Rows.Add("John", 10,15,13,0); foreach (DataGridViewRow row in dataGridView1.Rows) { int total = 0; foreach (DataGridViewCell c in row.Cells) { if (c.Value != null) { if (c.ColumnIndex != 0 && c.ColumnIndex != 4) { total += Convert.ToInt16(c.Value); } else if (c.ColumnIndex == 4) { c.Value = total.ToString(); … | |
Re: Only thing I see is, that since 'result','a','b', and 'c' are all doubles, `Convert.todouble` appears to be redundant. Other than that what's not working? Is it not updating when the text has changed in txtLength? If so how did you establish the event handler? The easiest way is to double … | |
Re: It appears your problem is, you're appending all the child elements to the same node. For instance when you create the element `Testers` you append that child to `D100`, `D100.AppendChild(Testers);`. But when you create the element`Tester`, you want it to be appended to `Testers`, not `D100`. | |
Re: That looks to be Ok. There are several ways to do it each with their own pros and cons. As was mentioned you need to do it in a static main class,`static void Main()`, and I'm not sure how necessary it is, but mine always goes inside the `Program` class, … | |
Re: Basically change your thinking. Instead of thinking an 'X' think of a 'V' with an inverted 'V' underneath. By thinking like this you can easily see that whenever you print an `*` you want to print a corresponding one farther down the line. Once you accomplish this, you want to … | |
Re: I would suggest putting you encryption/decryption in a separate class. This will make it much easier to see what is being passed to the textboxes. | |
Re: Does the employee name have any punctuation in it? If so you might need to strip those out of the name and store it without any punctuation. On a side note I would suggest you use a public variable to store the main directory path("C:\Users\Scarlett Hill\Desktop\Time Clock\Employee Directory\"). If you … | |
Re: What code are you using? Off hand I'd say look at the mouse enter event, and the IsMouseOver property. | |
Re: You haven't told the program what to do after the lastname is entered, so when it reaches the end of Main it ends. | |
Re: `|DataDirectory|` is used to point to a database folder. Is this what you intend? If so, you need to set it in your code ahead of time. If not, is the file added as a `Resource` or just stored in the Resources folder? | |
Re: display them as strings. the [Str function](http://msdn.microsoft.com/en-us/library/microsoft.visualbasic.conversion.str%28v=VS.100%29.aspx) should do nicely | |
Re: You can use the default Temp folder, through environment special folders. | |
Re: What code have you got and what part isn't working right? | |
Re: In the first example you only call the code for non matching after you've reached EOF. In the second example you've put that code inside the while loop so that it executes before EOF. The differences might have to do with different interpreters/compilers that you've used in the past. Each … | |
Re: try this [page](http://www.daniweb.com/search/query/html-zoom/0?q=html+zoom) | |
Re: You've set a condition that will restrict you getting only one item from your listview at a time,`If Text1 = ListView1.SelectedItem.Text Then`. | |
Re: try using the /b, switch one directory or filename per line, with full paths. `Dir /?` will also show you more options. | |
Re: Here's a pretty good [C++ reference site](http://www.cplusplus.com/reference/). | |
Re: I would suggest making the login form a dialog, that way you have a built in method for reading success, fail, or cancel | |
Re: The [Val Method](http://msdn.microsoft.com/en-us/library/9da280t0%28v=VS.100%29.aspx) also works. Also when you display the result back into `TextBox12.Text` you'll need to use `agre3.ToString()`. | |
Re: Here's one way, If you show the login form as a dialog, then show it in the start of your main form, you read the dialogresult to either continue or end. Assign `Button_Login` as the Accept button, and assign a Cancel button on the login form. in your authentication code, … | |
Re: Here's articles on the [+ operator](http://msdn.microsoft.com/en-US/library/9c5t70w2%28v=vs.80%29.aspx) and the [For-Next loop](http://msdn.microsoft.com/en-us/library/5z06z1kb%28v=VS.80%29.aspx). When you have code with a problem in it let us know. | |
Re: I think you'll probably need the `Process` class. The following is taken from the MSDN [article](http://msdn.microsoft.com/en-us/library/vstudio/system.diagnostics.process%28v=vs.100%29.aspx?cs-save-lang=1&cs-lang=csharp#code-snippet-2), about that. With this class you could run the .bat or with a little more digging you should be able to run `netsh` directly. using System; using System.Diagnostics; using System.ComponentModel; namespace MyProcessSample { class … | |
Re: try this [thread](http://www.daniweb.com/software-development/vbnet/threads/443453/youtube-mp3-downloader-source-code-in-vb.net) | |
Re: Try this, Dim test2 As Double = 0.3195 Dim test As Double = Fix(test2 * 10 ^ 2) / 10 ^ 2 this will produce `.31` as the value of test. If you want more decimal places change the `2` in `10 ^ 2` to the number of decimal places … | |
Re: That code should work. | |
Re: If I understand what you're trying to do, this might work: FileCopy(txtGrupAddNewArtWrokUploadImage.Text, Application.StartupPath + "\Artwork") This assumes that `Artwork` is in the folder where your program resides and that it is already created. > +OpenFileDialogPicture.SafeFileName Not sure why you have this in there. Are you trying to copy the file … | |
Re: What code are you using, and what specifically is it doing wrong? | |
![]() | Re: Before you call the `SELECT` command you can use a simple conditional statment. If txtUsername.Text.Contains("'") Then 'Tell the user the mistake MessageBox.Show("Username cannot contain a '") 'Erase the bad username txtUsername.Text="" 'Return back to the form and await more input Return End If I would suggest kicking it back to … |
Re: The code you're showing is from a click event. It won't run unless you click Refresh. Is the AddressBar the combobox? If so use the `.SelectedItem.Text` property. | |
Re: First off the one you linked to doesn't do C#, from what I understand it's basically an improved VB6, with cross platform support, compiling in native code, and coding on different platforms. Whereas Mono does support C#, I'm not sure how well you can code C# on a Mac. I … | |
Re: And they're trying to tell you how. One of the quickest ways to see how is to read articles, look at sample code, read articles, look at sample code, etc. One very useful source is the MSDN site. | |
Re: try: `DataGridView1.Columns("Hours").SortMode = DataGridViewColumnSortMode.Automatic` | |
Re: > how can I detect when these threads are done with their job and dispose them of their resources? I think the `ThreadState` property will tell you want you need to know. | |
Re: What text is in the button to start with? If it's not `Connect` exactly then it won't work right. For instance if you included the `&` when you set the text in the design window you have to include it in the code as well. | |
Re: An simpler way, `Dim num1 as Double = Val(TextBox1.Text)` the Val function returns a double, but if you need it to be an Integer, you can convert it to Integer, `Dim num1 as Integer = Convert.ToInt16(Val(TextBox1.Text))` It will convert any string representation of a number to a number, and if … | |
Re: try this, `c.Text ="Account Name"+"orig User"`. | |
Re: is form1 the child form? | |
Re: Since num1 and num2 are integers, I suspect the output of `num1 / num2` is being cast as an integer, which is giving you a bunch of wrong outputs, since any output that equals 5 to 5.99999999 will be converted to 5, and equate to `true`, in `if (num1 / … | |
Re: I would suggest a desktop. One thing I've learned over the decades, you don't want a screen too close, cause you'll end up looking at it for hours upon hours on end, when you're coding. | |
Re: Here's another thought a dialog form without a control box and no text has no title bar. enable autosize, autosizemode growandshrink, windowstate maximized, and size equal to the MDIParent.size, and the form will show maximized inside the parent, with no title bar, and will autosize with the parent. Since you … |
The End.