4,911 Posted Topics
Re: We won't do your homework for you. You have to show some effort first. We can help with specific suggestions but you will have to do the majority of the work yourself. | |
Re: When you say >For example >Streetname / house number / box number You are not actually giving an example. Do you actually mean that the format is like Main Street/1234/57 Without knowing what formats are valid I can't show you how to parse it. Typical addresses might be 5B-1017 Cornet … | |
Re: It is possible you are deleting records in the dataset (an in-memory copy of the table) but not the underlying database table. You haven't shown us any code so a definitive answer is not possible. This is one of the reasons I prefer to work with ADO rather than datasets … | |
Re: Microsoft has an article, [Walkthrough: Deploying a Winidows Based Application](http://msdn.microsoft.com/en-us/library/k3bb4tfd%28v=vs.100%29.aspx) which should help. | |
Re: Please do not hijack threads. This is a new question so start a new thread. | |
Re: I think you should decide if you are going to post as hhm_pro992 or mh.cool992. Don't post as both and don't post the same code as both. | |
Re: Where is your code? | |
Re: Deleting the history from within the browser might not do it. I have noticed that even though I have IE and FireFox set to clear the cache and history on exit there is always "stuff" left behind. For example, after manually clearing the Firefox Cache and exiting, CCleaner reports that … | |
Re: The way communism was supposed to work was "from everone according to their ability and to everyone according to their need". That was the theory. In practice it always seemed to work out that those in power got and those who weren't didn't. | |
Re: This will trim a trailing comma from a string If str.EndsWith(",") Then str = str.Substring(0, Len(str) - 1) | |
Re: The following code will replace the record that matches "Fred 17" with the new text if it exists in the ListBox. Dim text As String = "Fred 17" Dim ind As Integer = ListBox1.Items.IndexOf(text) If ind >= 0 Then ListBox1.Items(ind) = "Jim 29" Else 'add the text End If | |
Re: Assuming you want to display seconds, create a timer on the form, set the interval to 1000 (one second in milliseconds), then in the timer event handler, write the current time into a label. Make sure you set the Enabled property of the timer to True at some point (form … | |
![]() | Re: Once I understood how the voting worked I found it to be very easy. I'd rather see it stay the way it is than go to a popup. |
Re: There appears to be a problem with the formatting. The above code should look like Dim dat As New Date dat = #10/2/2012 4:04:45 AM# MsgBox(dat.ToLongTimeString) | |
Re: Dim bill As integer=textbox14.text You have to convert textbox14.text from string to integer. One way to do this is If IsNumeric(textbox14.text) Then bill = textbox14.text Else 'textbox14.text is not a number End If As for the rest, I'll assume the error occurred on line 3 (you didn't specify) and that … | |
Re: 1. You haven't asked a question 1. You haven't told us anything about the data in the listbox In general cost = numchairs * 1200 + numsofa * 200 tax = cost * 0.16 total = cost + tax | |
Re: Walt Disney and Arnold Schwarzennegger. But not because of their personal beliefs or their politics. What I admire is that in spite of all the people who repeatedly told them "You can't do it", or "It can't be done", they just went ahead and did it anyway. | |
Re: You declare and create ds in Sub sReadDbf but you didn't declare or create it in Sub sWriteAccess | |
Re: If you want to do something repeatedly you have three basic chouces 1. Get the user to inititate the action each time (e.g. click something). This will be too inconvenient for the user. 1. Use a loop (you'd need to sleep between iterations). This will make the application less responsive. … | |
Re: You might want to read [Printing with Visual Basic 2010](http://media.wiley.com/product_ancillary/74/04705328/DOWNLOAD/532874_both02_p2.pdf) | |
Re: Isn't "**<tag/>**" shorthand for "**<tag></tag>**"? In which case the original code **is** malformed. It looks like double clicking the code is just replacing the shorthand with the longhand version. | |
Re: Your select is select last_name, first_name, middle_name None of those items is the contact_number. Try changing your select to select last_name, first_name, middle_name, contact_number | |
Re: You use My.Computer.Registry.GetValue. For example Dim key As String = "HKEY_CURRENT_USER\Software\Helios\TextPad 5\Recent File List" Dim name As String = "File3" MsgBox(My.Computer.Registry.GetValue(key,name,Nothing)) | |
Anyone care to recommend a good file split/join utility? I want to use TeamViewer's file transfer feature to send files to my son in Long Island and I want to split large files into smaller chunks so that if there is an error/dropout I don't have to resend the entire … | |
Re: Try using absolute file paths and replacing the forward slash with a back slash. Also, this won't make a difference, but you can reword your loop header as While FileTrue | |
Re: Sounds like a homework assignment to me. We don't do homework for other people. You don't learn anything that way. | |
Re: You could try Private Sub TextBox1_KeyPress(sender As System.Object, e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress TextBox2.AppendText(e.KeyChar) End Sub This would also allow you to filter out certain keys like backspace. | |
Re: > Help other people in need!! :) Unrelated to the actual post but not to Dani's comment. Front page story in Winnipeg this week was about a 38 year old Winnipeg Transit bus driver who stopped his bus when he saw a barefoot homeless man on the sidewalk. The driver … | |
Re: If you don't do your own homework you won't learn anything. | |
Re: When a paramer is passed By Val then the sub/function gets a copy of the parameter.Any changes made inside the sub/function will not affect the original parameter. However, if you pass By Ref then any changes will affect the calling parameter. For example Dim x As Integer = 5 MySub(x) … | |
Re: Use the following handler Private Sub TextBox1_KeyPress(sender As Object, e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress If Char.IsDigit(e.KeyChar) Then e.Handled = True End If End Sub | |
Re: If you don't have any code then we are not going to write it for you. First you have to acquire some programming knowledge and skills. Then you have to design your data structures and divide your project up into modules/subs/functions/etc and document the interfaces/functionality. Then you can start to … | |
Re: You can use My.Settings.Go to the project properties page then select the "Settings" section (sixth one down the left side). There you can add a settings variable of any type. Pick a name (like FisrtRun) and a type (like Boolean) and set the initial value to True. In your code … | |
Re: To further explain Dim txtBx As TextBox declares a variable which can contain the address of a TextBox control. It does not create the control. Dim txtBx As New TextBox both creates the control (New) and assigns the address to txtBx. The above line is equivalent to (shorthand for) Dim … | |
Re: Not quite correct. The select should be sql = "SELECT Position from tblLogin WHERE username = '" & txtUsername.text & "'" and somewhere, sometime, somehow, someone is going to mention how you should be using parameter entry instead of concatenation to protect against SQL injection attacks. | |
Re: Please read what's in front of you. In big bold letters it states **This question has already been solved: Start a new discussion instead**. It was put there for a reason. If you aren't going to read what's in front of you then there is no point an anyone trying … | |
Re: I already answered how to do that [here](http://www.daniweb.com/software-development/vbnet/threads/423618/adding-multiple-textboxes-to-a-form-control-array#post1864578) and you know that because you just posted there an hour before you posted here. Instead of asking us to give you the code, take some time to work with the example. | |
Re: A short version would be Dim txt() As String = Filter(System.IO.File.ReadAllLines("d:\temp\test.txt"), "(Yes)") TextBox1.Text = Join(txt, vbCrLf) A shorter version is TextBox1.Text = Join(Filter(System.IO.File.ReadAllLines("d:\temp\test.txt"), "(Yes)"), vbCrLf) | |
Re: If you want to prevent edits by other users then three possibilities are: 1. separate database for each user with a common database for login info 1. separate tables for each user with a common login table 1. all tables contain a field identifying the user Option 1 is probably … | |
Re: Why does the data have to be copied manually from Excel to the RMS? Who not just write a script or app to do this? And if it has to be done manually, why put it in Excel in the first place? | |
Re: Since you already know how to read and write from/to the database I assume you are wondering how to preserve the number last used by the app. Before I offer a suggestion, what version of VB are you using? Newer versions of VB use My.Computer.Settings to save settings between sessions … | |
Re: I think you'll have to sort the data from within a VB data structure unless you write a SQL stored procedure to do the query. Any sorting of the records as strings (varchar) will put records (for example) starting with "23" after "2" and before "3" which is not what … | |
Re: It would help to know the specific error. Perhaps a simple example that I have tested locally. I have a table named "users" defined as UserID int UserName varchar(50) UserType varchar(50) and a text file (bulk.txt) that contains (tab delimited) 1 Jim user 2 George admin 3 Fred admin 4 … | |
How does the search feature on Daniweb work? I have had to recreate (several times) a posting to point people at the Microsoft article on how to deploy an application. I'm sure I have used 1. the actual article name 1. the word "walkthrough" 1. the word "deploy" and each … | |
Re: There is a seldom used (I hope) technique called "the self modifying program" that, like a GOTO, when used properly can be very convenient. Here is an example of such a program written in vbScript FILELOC = "" FILENAM = "" 'keep the above two lines as the first two … | |
Re: You can't just copy the exe file to another computer and run it. You have to create an installer, then run it on the target computer so that all of the required components are also made available. Microsoft has a walkthrough on how to deploy a windows applicatiion [here](http://msdn.microsoft.com/en-us/library/k3bb4tfd%28v=vs.80%29.aspx). There … | |
Re: When I consider the ratio of the number of threads that I have started to the total number of postings I have made, the "inconvenience" of having to ignore the social media requestor is insignificant compared to the benefit to the site as a whole. I don't mind the added … | |
Re: I don't know what the target system is but it sounds like an access rights problem. It could be that the folder containing the database is restricted to read only. Or it's possible that the database file itself has insufficient access rights. You could try taking ownership of the file … | |
Re: Why don't you access the embedded control by qualifying it? For example, if your user control is named myControl and your embedded ToolStrip is declared as Public myToolStrip As New ToolStrip then you can access the ToolStrip as myControl.myToolStrip If you need to access it more directly then you can … |
The End.