476 Posted Topics

Member Avatar for Ruan10

This is a duplicate post. [Original thread](http://www.daniweb.com/software-development/vbnet/threads/423668/vb-windows-form-applications)

Member Avatar for Reverend Jim
0
1K
Member Avatar for Ruan10
Member Avatar for mustaffa hasan

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 …

Member Avatar for Oxiegen
0
76
Member Avatar for codeorder

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 …

Member Avatar for codeorder
0
4K
Member Avatar for mie.ilani

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**

Member Avatar for Oxiegen
0
161
Member Avatar for Iamkenny

What is the exact error message? Put a messagebox in the Catch statement: **MessageBox.Show(ex.ToString)**

Member Avatar for Oxiegen
0
245
Member Avatar for Oxiegen

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 …

Member Avatar for Oxiegen
0
137
Member Avatar for bigzos

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`

Member Avatar for bigzos
0
99
Member Avatar for toomutch

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).

Member Avatar for toomutch
0
446
Member Avatar for Oxiegen

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 …

Member Avatar for Oxiegen
0
56
Member Avatar for juster21

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)

Member Avatar for Oxiegen
0
319
Member Avatar for harinath_2007

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.

Member Avatar for Oxiegen
0
68
Member Avatar for mitchfizz05

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 …

Member Avatar for codeorder
0
375
Member Avatar for Rogue.

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.

Member Avatar for codeorder
0
95
Member Avatar for ponkan20

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

Member Avatar for Oxiegen
-1
87
Member Avatar for jhedonghae

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

Member Avatar for jhedonghae
0
140
Member Avatar for vbDotMe
Member Avatar for vbDotMe
0
128
Member Avatar for mitchfizz05

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 ~~~

Member Avatar for Begginnerdev
0
124
Member Avatar for mitchfizz05

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.

Member Avatar for Oxiegen
0
181
Member Avatar for jhedonghae
Re: LAN

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.

Member Avatar for jhedonghae
0
150
Member Avatar for jhedonghae

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. …

Member Avatar for jhedonghae
0
119
Member Avatar for kampao00

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` …

Member Avatar for Mitja Bonca
0
195
Member Avatar for SyncMaster170

See if it helps to set the property "Copy Local" to True for that reference.

Member Avatar for Oxiegen
0
117
Member Avatar for kampao00

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 …

Member Avatar for Oxiegen
0
163
Member Avatar for raju1234

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 …

Member Avatar for raju1234
0
238
Member Avatar for reds8

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`

Member Avatar for poojavb
0
157
Member Avatar for Begginnerdev

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?

Member Avatar for Begginnerdev
0
5K
Member Avatar for eawedat

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 …

Member Avatar for Oxiegen
0
244
Member Avatar for Eternal Newbie

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")`

Member Avatar for Eternal Newbie
0
315
Member Avatar for dilse4sk

And regarding the use of the [+] button. Can't you change the label to say "Add new booking" instead of a [+] sign?

Member Avatar for dilse4sk
0
187
Member Avatar for mheoxe
Member Avatar for mido22

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.

Member Avatar for Oxiegen
0
208
Member Avatar for choosechrist

Try setting the mdiparent of that second form to the MDI form. [CODE] mastersupplier.MdiParent = <name of mdi form> [/CODE]

Member Avatar for choosechrist
0
175
Member Avatar for GTTravis

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 …

Member Avatar for Oxiegen
0
97
Member Avatar for remya1000
Member Avatar for Shodow

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, …

Member Avatar for Oxiegen
0
593
Member Avatar for birdlover2010

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 …

Member Avatar for codeorder
0
929
Member Avatar for VIPER5646

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 …

Member Avatar for VIPER5646
0
116
Member Avatar for renzlo

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 …

Member Avatar for ChrisPadgham
0
113
Member Avatar for collin_ola

This is how you set landscape printing. [CODE] Dim settings As New System.Drawing.Printing.PrinterSettings settings.DefaultPageSettings.Landscape = True PrintForm1.PrinterSettings = settings [/CODE]

Member Avatar for Oxiegen
0
120
Member Avatar for Toxikr3

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 …

Member Avatar for Oxiegen
0
140
Member Avatar for GAiXz

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 …

Member Avatar for M.Waqas Aslam
0
610
Member Avatar for wael meto

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 …

Member Avatar for Oxiegen
0
312
Member Avatar for VB 2012

Is there an error? Have you debugged the code to see if the code for TimerMemProgress is being trigged and executed?

Member Avatar for codeorder
0
180
Member Avatar for Atmos1234

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]

Member Avatar for Oxiegen
0
961
Member Avatar for jbutardo

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]

Member Avatar for jbutardo
0
332
Member Avatar for shredder2794

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]

Member Avatar for Oxiegen
0
199
Member Avatar for SeniorAlexandro

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 …

Member Avatar for Oxiegen
0
3K
Member Avatar for PF2G

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 …

Member Avatar for Oxiegen
0
238
Member Avatar for shredder2794

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 …

Member Avatar for Oxiegen
0
115

The End.