476 Posted Topics
Re: This is a duplicate post. [Original thread](http://www.daniweb.com/software-development/vbnet/threads/423668/vb-windows-form-applications) | |
Re: Nothing is given for free. You have to at least try to do something yourself. If you get stuck on something specific we'll all be happy to help. Here's a tip. Browse the web for similar projects and software to get an idea of what you want your project to … | |
Re: By using a Try...Catch statement you can catch the error and do something about it. It's a very useful debugging tool. However, you don't have to enclose every single piece of altering code in it's own statement. You can start the Try statement even before the line **With Me** and … | |
Re: A string is rarely Nothing. But it can be empty. Change the line **If strTo Is Nothing Then** to **If String.IsNullOrEmpty(strTo) Then**. That should cover all the bases. As a second thought, you should do the same for strFrom. Include that in the If statement. **If String.IsNullOrEmpty(strTo) OrElse String.IsNullOrEmpty(strFrom) Then** | |
Re: What is the exact error message? Put a messagebox in the Catch statement: **MessageBox.Show(ex.ToString)** | |
Hi! Ok. So I've got this problem. I have a reference to a WebService that provides a whole bunch of classes representing a table in a database. Now, it's a simple thing to retrieve a list of all those classes and store them for future use. What I would like … | |
Re: Depending on the format of the age column, you can limit the results by checking to see if the age is equal to or greater than the current year - 4. Ex if column is DateTime/SmallDateTime datatype: `SELECT * FROM <table> WHERE YEAR(<asset age column>) >= 2009` | |
Re: On the client. But you may also need to configure the mysql server to allow incoming connections to other than localhost. In the permission table. (If I'm not mistaken). | |
Hey! I know Dani has a lot of important stuff to do, but I am a bit curious. I thought it was kind of nifty that you could type :) or :-) and get that yellow little smiley staring back at you. Is that a thing of the past, or … | |
Re: a) What are the errors? and b) Have you ever heard of or tried [GemBox Spreadsheet](http://www.gemboxsoftware.com/spreadsheet/overview)? With it you can read the Excel file and import the data into a DataTable. From there you can transfer it to any database, including Access. [Import/Export DataTable](http://www.gemboxsoftware.com/support/articles/import-export-datatable-xls-xlsx-ods-csv-html-net) | |
Re: Try exporting the data (structure and information as create and inserts) to a common format SQL file. You can then import that into the MySQL server as a query. | |
Re: This is how you can create Zip files from within .NET: http://www.codeproject.com/Articles/28107/Zip-Files-Easy Or you can use this: http://dotnetzip.codeplex.com/ And as for the download progress. Now, I don't have much experience in working with TCP messages. But I'm thinking that you can start the transfer by sending to size of the … | |
Re: This is the VB.NET forum. This question should be posted in the [Web Design forum](http://www.daniweb.com/web-development/web-design/15) instead. | |
Re: I found this solution for detecting a USB drive. In particular, read post #13 for the working code. http://www.vbforums.com/showthread.php?t=534956 | |
Re: Here's how you can get an ArrayList of available drives. Imports System.IO Public Function GetDrives() As ArrayList Dim drives As New ArrayList For Each drive As DriveInfo In My.Computer.FileSystem.Drives drives.Add(drive.Name) Next Return drives End Function | |
Re: [Here](http://support.microsoft.com/kb/908877/en-us) is an idea. | |
Re: In order to avoid the flickering, use the SetStyle method of the form. ~~~ vb Public Sub EnableDoubleBuffering() ' Set the value of the double-buffering style bits to true. Me.SetStyle(ControlStyles.DoubleBuffer _ Or ControlStyles.UserPaint _ Or ControlStyles.AllPaintingInWmPaint, _ True) Me.UpdateStyles() End Sub ~~~ | |
Re: There is an [article](http://www.codeproject.com/Articles/12938/LAN-Chat-Using-Multicating) on CodeProject that deals with exactly this. It may not be **exactly** what you're looking for, but it will get you very close. | |
Re: If the program relies on a database, just set up a central database server and have your program connect to it. That's basically it. Several copies of your program on various computers can connect to the database and share information. | |
Re: Iterate through the items in the ListView and check the .Text property if the selected item is already present. For Each item As ListViewItem In lv.Items If item.SubItem(0).Text = <combobox>.SelectedItem Then MessageBox("The selected item is already added") Return End If Next item.SubItem(0) represents the very first column in the ListView. … | |
Re: First. Get rid of the line `com.ExecuteNonQuery()`. You ARE executing a query. Second. In order to compare the selected item in the combobox with the result from the query, you should actually perform a check on it. Not assign it. Replace `Combobox3.Text = rid(2)` with `If Combobox3.Text = rid(2) Then` … | |
Re: See if it helps to set the property "Copy Local" to True for that reference. | |
Re: The ListView control is sometimes very smart. Create a String array, and add your information to that. And then you create a new ListViewItem and assign the array to it. Last, add the ListViewItem to the ListView. Dim str(6) As String Dim dt As New DataTable Dim da As New … | |
Re: Boot into recovery mode from the install CD/DVD or Live CD. From there you can access the terminal and mount the device containing /etc (usually /dev/hda1). Edit the shadow file and just remove the encryption string for the root account. Example: From `root:$1$aB7mx0Licb$CTbs2RQrfPHkz5Vna0.fnz8H68tB.:10852:0:99999:7:::` To `root::10852:0:99999:7:::` Then just reboot and login … | |
Re: I'm assuming that you're looking for the SQL expression to accomplish this. Here it is: `SELECT tblData.num,SUM(tblData.cost) AS Total,tblPrize.prize FROM tblData, tblPrize WHERE tblData.num = tblPrize.num GROUP BY tblData.num` | |
Re: Why not skip the MouseDown event all together and move that code into a method that you call at the end of execution in the MouseClick event? | |
Re: Yeah. Threading may just be the way to go. But I have to ask. I'm guessing the purpose is to enter an URL and have the webbrowser control go there. But if you iterate through a bunch of sites on the SAME webbrowser control, no one will ever have time … | |
Re: I've been successful in using IO.File.Copy when transfering files to and from another computer. `IO.File.Copy("\\" & cmbservername1.Text & "\SharedNow\database.txt", "C:\database.txt")` | |
Re: And regarding the use of the [+] button. Can't you change the label to say "Add new booking" instead of a [+] sign? | |
Re: Should have been posted in Web Development->PHP forum. | |
Re: You should make it a rule to include an ID field and make it a Primary Key when creating tables in a database. And also include that in your SELECT statements. That's why you get that message. | |
Re: Try setting the mdiparent of that second form to the MDI form. [CODE] mastersupplier.MdiParent = <name of mdi form> [/CODE] | |
Re: I created a similar thing on a project once. Here's what I did. I created a class with two main methods. One for reading messages from the database, and one for writing the message to the database. I then used threading to run that class and let it trigger the … | |
Re: Have you tried printing using landscape orientation? | |
Re: This is a solution I created in one of my projects. Create a public method on each of the MDI childs. In that method, clear all controls and recall InitializeComponent and then recall the forms load event. Like so: [CODE] Public Function ReloadForm() As Boolean Try Me.Hide() Me.Controls.Clear() InitializeComponent() Form1_Load(Form, … | |
Re: First, why do you have this? strSelection = boConversionType.SelectedIndex.ToString() Second. I can see what the code does, but I can't see what strSelection is for. If you select something from the combobox, the SelectedIndex will be > -1. So, the Select Case statement works as it should. You might wanna … | |
Re: Using a public servers date and time would require that the user of your program has an active internet connection, or is on a corporate network. Both of which seems a bit hazardous if it's unknown. What you could do is grab the systems date and time on first install/run … | |
Re: First you need to establish what constitutes a block of text. From what I can see, a block starts with a line ending in 091. That would be your queue. Read the text file line by line in a For loop and examine each line to see if it contains … | |
Re: This is how you set landscape printing. [CODE] Dim settings As New System.Drawing.Printing.PrinterSettings settings.DefaultPageSettings.Landscape = True PrintForm1.PrinterSettings = settings [/CODE] | |
Re: Since JAR files are based on the ZIP archive, you should be able to use sharpziplib to extract the contents of the JAR file. And using that library, theoretically you should also be able to manipulate the archive by deleting content. If you know where it is. That's the best … | |
Re: Your best bet would be to use the CONVERT function to convert DateOfReturn into a varchar with a specific format. [CODE] xSQL.AppendLine("UPDATE tblClientRecord SET Status=@Stat WHERE CONVERT(VarChar, DateOfReturn, <format>)='" & DTParrive.Text.Trim & "' AND CONVERT(VarChar, TimeOfReturn, <format>)>='" & lblTimeOfDay.Text.Trim & "' ") [/CODE] Where <format> is any of preset CONVERT … | |
Re: Try setting the class variable directly instead of setting it through the property locally. And see if it helps by changing the property as well. Try this: [CODE] Public Property MAXROWXX() As Integer Get 'Here is the change Return _MAXROWSXX End Get Set(ByVal value As Integer) _MAXROWSXX = value End … | |
Re: Is there an error? Have you debugged the code to see if the code for TimerMemProgress is being trigged and executed? | |
Re: When reading the file, first create a StreamReader object. You can use arguments in it's constructor. Try this... [CODE] Dim file As New StreamReader("filename", Encoding.GetEncoder(437)) Dim content As String content = file.ReadToEnd file.Close() [/CODE] | |
Re: This should have been posted in the ASP.NET forum. You can't use MsgBox nor MessageBox on the web. What you can do is use javascript with a vbscript popup box. Here is a solution: [url]http://www.delphifaq.com/faq/javascript/f1172.shtml[/url] | |
Re: Happy news! Yes, there are several ways to edit the ID3 tags. There are multiple users over at CodeProject who have published classes and projects with that purpose. Here is one: [url]http://www.codeproject.com/Articles/17890/Do-Anything-With-ID3[/url] | |
![]() | Re: You can use the MouseMove event and check if the mouse pointer is within the Bounds of the stripmenu item. If that's the case, simply change the BackgroundColor. [CODE] Private Sub menuitem1_MouseMove(ByVal sender As Object, ByVal e As MouseEventArgs) If menuitem1.Bounds.Contains(e.Location) Then menuitem1.BackColor = Color.Beige Else menuitem1.BackColor = Color.White End … |
Re: It quite simple to write to a text file, in this case a php file. There are many ways you could do this. This would work for me. [CODE] Private Sub CreatePHPFile() 'First, delete the existing (if any) file. If File.Exists(Application.StartupPath & "\filename.php") Then File.Delete(Application.StartupPath & "\filename.php") End If 'Create … | |
Re: But because he posted the question in the VB.NET forum, perhaps something in code would be nice. .NET has two very useful objects for managing files and directories. DirectoryInfo and FileInfo. With those you can do pretty much anything. In order to locate all the files within a directory, you … |
The End.