4,901 Posted Topics
Re: Use the **Replace** function to replace the commas with nulls before you do the conversion to int and the addition. | |
![]() | Re: What version of vb.net are you using? For 2010 you can follow the procedure in the attached (I hope) file. |
Re: Conway's game of Life in one line of APL  | |
Re: That is incorrect. You have to convert txtTotal.Text to a number before doing the calculation. There is also no reason to create a temp variable for one calculation. txtTotal.Text = Convert.ToInt32(txtTotal.Text) - Convert.ToInt32(txtfoodprice1.Text) | |
Re: I disagree with you on only one point. Coding solutions from several years ago tend not to work "out of the box". As the particular language evolves with new releases, things that once worked, work no longer. Just try running a Python 2.5 program under Python 3.x, or a vb4-5-6 … | |
Re: >Will be glad if i get help Will be glad if you provide details. 1. what is the error message 1. what line throws the error 1. what is the connection string 1. what type of database are you connecting to 1. what is **FrmMother.Db** | |
Re: You didn't show us how you declared _dic, or what error message you were getting. In any case, try _dic.Add(ctl.Name, ComboBox1.Text) | |
Re: I'm assuming you mean you want to separate the lines in a notepad (text) document into an array of lines. Do you need to get the text from an open instance of notepad or is it sufficient to read the text from a file? If you are reading from a … | |
Re: You are correct in that appending **$** to the share name makes it a hidden share, however all shares are by definition restricted, it's just a matter of to what degree. You control 1. who has access to the share 1. what access rights they have If you want to … | |
Re: You can find examples of querying tables [here](http://www.daniweb.com/software-development/vbnet/code/445801/use-parameterized-queries-to-avoid-sql-injection-attacks). For an Access database you can use the ADO or OLEDB examples. You will need to use a connection string for Access rather than MSSQL (which I used for the examples). You can find connection strings [here](http://www.connectionstrings.com/access/). If you can't follow the … | |
Re: Why such a small drive? I'd go for 250GB at the bare minimum. But as for suggestions, when I was running XP (and I had a lot of apps installed) I allocated 30GB to C and the rest to D. I made a folder on D named **Images**. I relocated … | |
Re: Is the code in the **ComboBox6_SelectedIndexChanged** event handler? If so it should work. It works just fine for me (vb 2010). Iincidentally you can shorten the code to TextBox10.Visible = (ComboBox6.Text = "Enabled") You don't need the parentheses but if you leave them out it looks like a multiple assignment. | |
Re: This thread belongs in the Windows forum. | |
Re: I can't imagine why you would run into memory problems by just using different colours. Using the same colour for everything or a different colour per area should make no difference to the amount of memory used. For that matter, loading a picture with thousands of different colours into the … | |
Re: In vb.net you can treat vbNullString as being equivalent to "" but they are not treated exactly the same. For example, in the following code Dim s As String = "" If s = vbNullString Then MsgBox("same") End If the message "same" will be displayed when run, however, if you … | |
Re: I found that using compressed air on keyboards just drove a lot of the hair (two cats) and lint farther under the keys. Now I use a wide soda straw on the end of a vacuum cleaner. | |
Re: Can you also post the DDL to create the games table? | |
Re: Isn't that pretty much just up to your imagination? That's like asking "what can I program my computer to do?" | |
Re: If you define ListView1 in details view with one column, and one button named Button1 then run this Public Class Form1 Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load ListView1.Items.Add(New ListViewItem({"the"})) ListView1.Items.Add(New ListViewItem({"quick"})) ListView1.Items.Add(New ListViewItem({"brown"})) ListView1.Items.Add(New ListViewItem({"fox"})) End Sub Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles … | |
Re: It's going to be a problem because every time you call g.DrawString it will write overtop of the existing text as the numbers change you will end up with just a black blob. Previously rendered numbers will not be erased. You can find a custom progress bar at [Code Project](http://www.codeproject.com/Articles/26518/Custom-ProgressBar-Control) … | |
Re: One way is For Each item As ListViewItem In ListView1.Items item.Selected = True Next | |
Re: You can use a sorted set as Dim sort As New SortedSet(Of String) Dim sw As New System.IO.StreamWriter("d:\temp\test2.csv") For Each line As String In System.IO.File.ReadAllLines("d:\temp\test1.csv") sort.Add(line) Next For Each line As String In sort sw.WriteLine(line) Next sw.Close() | |
Re: How about Public Class Form1 Private Sub TextBox1_TextChanged(sender As System.Object, e As System.EventArgs) Handles TextBox1.TextChanged SetPlayQuit() End Sub Private Sub TextBox2_TextChanged(sender As System.Object, e As System.EventArgs) Handles TextBox2.TextChanged SetPlayQuit() End Sub Private Sub SetPlayQuit() 'If we are not currently playing a game, this sub will disable the 'play button if … | |
![]() | |
Re: You are in a maze of twisty little passages, all alike... | |
Re: You can iterate through all controls, or in this example, all controls of a given type. For Each ctrl As GroupBox In TabControl1.TabPages(0).Controls.OfType(Of GroupBox)() MyCustomSub(ctrl) Next Private Sub MyCustomSub(ctrl As GroupBox) . . . End Sub | |
Re: Try CornerHover.BackgroundImage = Nothing | |
Re: I'm guessing that what you are trying to say is: **I have a form with a treeview control and a tab control. When the user double-clicks on a child node in the treeview I want to create a Tab page with the selected child node name but only if that … | |
Re: In Excel 2003 (the version I have) you can import the data directly from the database table by defining a query from DATA -> IMPORT EXTERNAL DATA -> NEW DATABASE QUERY | |
Re: We can answer specific questions if you have them. We expect you to show some effort first. Please read [this](http://www.daniweb.com/software-development/vbnet/threads/424836/please-read-this-before-posting) | |
Re: This has been asked and answered multiple times. Search this forum as well as the code snippets. | |
Re: CTRL-A followed by CTRL-C allows me to copy the entire post (the one I am currently entering) to the clipboard. On other posts, double clicking in a code snippet copies the entire snippet (including formatting) to the clipboard. Clicking and dragging selects a block of text, then CTRL-C copies it … | |
Re: What database are you using? What are the settings for the auto-generate column? | |
Re: If you install MS SQL and SQL Management Studio (both free) you can run queries in Studio itself without having to create all the interface objects that you would need if running from vb. This makes it much easier to build your databases and debug/learn queries. | |
Re: All you have told us about the code is "it's about 500 lines". Based on that minimal amout of information the only reponse I can give is "write better code". | |
Re: Perhaps if you asked a clearer question and told us what your code is supposed to do we might be able to help. | |
Re: I'm not sure I understand. Classes shouldn't be using external variables. If you have a file which defines variables and they are used by multiple classes then you are making the inner workings of the classes dependent on external variables. If I've completely missed the point then please elaborate. | |
Re: Any software that claims to boost your wifi speed is at best only a waste of money and at worst a scam to get you to install virus/trojan laden software. | |
Re: Then the bartender says "we don't serve strings in here" so one of the strings tatters himself on top and ties up a few loose ends, then goes back to the bartender who says "are you a string?". To which he replies "No. I'm a frayed knot". | |
Re: Maybe he/she is saving a spot for a later question. See [here](http://loadingreadyrun.com/videos/view/1665/Loading-Time-PlaceholderURL) | |
Re: It also helps if you indent properly. You probably lost all the indentation because you didn't use the **Code** button to insert the code snippet. I fixed it up for you. | |
Re: I believe this has already been asked by you [here](http://www.daniweb.com/software-development/vbnet/threads/459878/tab-control) | |
Re: I think he wants to scale the controls on the form as well. | |
Re: >And above all, don't mention the war! In the same vein have a read [here](http://www.guardian.co.uk/world/2013/jul/11/microsoft-nsa-collaboration-user-data). All of your Skype communications and Outlook email is in the hands of the NSA. ![]() | |
Re: Or you could use the RichTextBox control and write to an rtf file which is readable by Word. | |
Re: That depends on what, specifically you want to do. If you want to implement a search-and-replace feature where the user enters the text to search for and the replacement text then you do it one way. If you want to allow the user to select a block of text and … | |
Re: You are not going to like this answer but don't use DAO. ADO is not confusing or riddled with problems. ADO is actually pretty straightforward. The only confusing part can be getting the connection string right and we can help you with that as long as we know what type … | |
Re: I will certainly put that on my must-watch list. |
The End.