4,911 Posted Topics

Member Avatar for Reverend Jim

Has anyone ever put together a map or table that shows the distribution of DaniWeb members across the globe? I don't know if such an analysis is possible but it might be interesting to see, roughly, where everyone is.

Member Avatar for Dani
0
180
Member Avatar for Mark2349845

How many items do you have in your ListView? Use the debugger and put a breakpoint at line 8 then compare your ListView items with the index. Also, get rid of the goto. If you must use a loop then use a structured loop.

Member Avatar for Reverend Jim
0
142
Member Avatar for number361

My two cents - you try to open the database (lines 14-22) but you continue on and try the query even if the database doesn't open. If the open fails then you should not try the query.

Member Avatar for Reverend Jim
0
119
Member Avatar for _rational_

We used IBM Thinkpads at the office for years. I was so impressed with the quality that I bought one for my younger son when he graduated from high school in 2003. It's been through the mill but it is still running. These things are rugged and dependable. When we …

Member Avatar for dawidbrook
0
370
Member Avatar for raficomps

Instructions on how to save settings can be found [here](http://www.daniweb.com/software-development/vbnet/threads/427539/automated-reference-number-and-save).

Member Avatar for Pgmer
0
201
Member Avatar for iFrolox

You can simplify the loops by using For Each phCheck As CheckBox In Me.Controls.OfType(Of CheckBox)() That will iterate through only CheckBox controls.

Member Avatar for iFrolox
0
3K
Member Avatar for guilherme.carvalho.9250

Wasn't this already asked and answered [here](http://www.daniweb.com/software-development/vbnet/threads/429049/how-to-replace-a-line-of-a-txt-file)?

Member Avatar for guilherme.carvalho.9250
0
2K
Member Avatar for hainahid
Member Avatar for megdan

You run a query on the database to determine if the room is booked for the requested time. I can't be any more specific becuase you haven't provided any details. But as an example, assuming that bookings are for one hour periods, then the query select * from bookings where …

Member Avatar for Pgmer
0
232
Member Avatar for TTTHXC

System.Convert.ToInt32("9a12c",16) As long as the first argument is a string representation of a hex value this will work. In the general case, the first argument is a string and the second argument is the base so you could also use this to convert other bases such as System.Convert.ToInt32("203",8) which would …

Member Avatar for Reverend Jim
0
737
Member Avatar for guilherme.carvalho.9250

You'll have to read all of the lines into an array, modify the requested line, then write the array back out to the file. All you are doing is modifying the line in memory. Dim lines() as String = IO.File.ReadAllLines(MYFILE) For i As Integer = 0 to Ubound(lines) If lines(i).Contains(... …

Member Avatar for guilherme.carvalho.9250
0
2K
Member Avatar for Dani

I don't recall that we ever had a view counter. Of course, that could just be me.

Member Avatar for gerbil
0
206
Member Avatar for vincent5487

You can start by setting the values of min and max outside the loop as follows Dim min As Integer = Integer.MaxValue Dim max As Integer = Integer.MinValue InputBox returns a string so you can't assign it directly to a numeric variable. You have to convert it. However, just because …

Member Avatar for vincent5487
0
175
Member Avatar for Reverend Jim

I happened to be browsing the code snippets in vb.net and I noticed that in the thread list, a code snippet I contributed a while back is credited to "Reverend Jim", however when you go to the [actual snippet](http://www.daniweb.com/software-development/vbnet/code/423678/create-controls-at-run-time-with-events), it is listed as >By It's just a nickname on May …

Member Avatar for Dani
0
191
Member Avatar for TheQuestor

Tell me in English (not in code) what you want (not just the last part put the whole thing) and I'll see if we can come up with something simpler.

Member Avatar for Reverend Jim
0
171
Member Avatar for Nickair

You don't need to create a bootable disc (or USB) to install Office. You have to have Windows running in order to have somewhere to install Office to. You only need to create bootable media in certain cases such as * to install or reinstall your operating system * to …

Member Avatar for Reverend Jim
0
271
Member Avatar for DarkPyros

First you get the "sermon". Since you are required to write pseudocode anyway, write it first, then prefix each line of pseudocode with a single quote. There. You have just created all of your code comments. Now add the actual code. End of sermon. Now a few suggestions. InputBox("Values must …

Member Avatar for DarkPyros
0
205
Member Avatar for mrbungle

In SQL, to select the largest value from a set of values you use the MAX function as in select MAX(citation) from myTable

Member Avatar for mrbungle
0
145
Member Avatar for Minko

I'm a big fan of letting the computer do as much as it can for you. Generally, the less code I have to write, the fewer chances I have to introduce a bug. In that case: Dim mylist As New SortedList(Of Date, String) For Each line As String In System.IO.File.ReadAllLines("d:\temp\test.txt") …

Member Avatar for Minko
0
6K
Member Avatar for themaj

My.Application.CommandLineArgs returns an array of strings, one string per argument

Member Avatar for themaj
0
407
Member Avatar for kkhembrom

The answer is "it depends". It depends on the type of database (Access, SQL, mySQL, etc), and it depends on the actual data in the field. You can use wildcards in SQL queries such that if your query looks like select * from myTable where MovieName like 'Rocky%' then the …

Member Avatar for Reverend Jim
0
102
Member Avatar for kerek2

You have to use a ListView in details view if you want to use different colours for each line. You can do it as follows: Dim item as New ListViewItem() item.Text = "Bad" item.ForeColor = Color.Red ListView1.Items.Add(item)

Member Avatar for Reverend Jim
0
213
Member Avatar for marky101

I can't imagine how you would do this. When the power goes out your computer goes down immediately. If you have a UPS then the computer doesn't know the power is out. If you have a UPS that can send an event to the operating system then you have to …

Member Avatar for M.Waqas Aslam
0
215
Member Avatar for Reverend Jim

I just submitted a code snippet for the competition [here](http://www.daniweb.com/software-development/vbnet/code/428716/using-detached-recordsets-to-sort-data). I entered my description/documentation, then entered the code after clicking on "Code" and pasting in the code window. I submitted the post and was then presented with another window saying "a fully working code snippet must be entered". So I …

Member Avatar for Reverend Jim
0
257
Member Avatar for HibaPro

You just have to change the name of the server in the connection string. You may have to get the DBAdmin to set up access rights for you.

Member Avatar for Reverend Jim
0
93
Member Avatar for Cobrarr2003
Member Avatar for totalwar235

For once I find myself in complete agreement with Rashakil. If you are looking to better your job prospects then take a programming job, any job, that will get you experience. Programming in University is nothing like programming in the real world. In my opinion (and it is just my …

Member Avatar for jenni01
0
377
Member Avatar for BadVinegar
Member Avatar for valestrom

The only time I ever had to program in binary was on an GE SPPC (stored program process controller) micro computer from 1979-1982. There were no symbolic debuggers (or debuggers of any type) at that time. To debug, you hand assembled some debug code then patched it into unused memory …

Member Avatar for ModernC++
0
2K
Member Avatar for ibpet11

It would help to know something about the input data. Are the lines in each file unique (within that file) or are there possibly duplicate lines? How big are the files (can you state an approximate maximum number of lines?). You read file 2 once for each line in file …

Member Avatar for Reverend Jim
0
3K
Member Avatar for tendaimare

You don't say what database you are using. If it is SQL then you can use the COALESCE function in the query. This function is used to replace NULL values with default values. For example: select LastName,MiddleName,FirstName from myTable May return NULL values for MiddleName, however, the query select LastName,COALESCE(MiddleName,"(none)"),FirstName …

Member Avatar for Reverend Jim
0
587
Member Avatar for alexandra.lopez.94043

I think the easiest way would be to create your own msgbox form. Make sure it has a fixed width font like Courier New and display is as Modal.

Member Avatar for M.Waqas Aslam
0
241
Member Avatar for benscomputers

The easiest way to check is to use a regular expression. Here is an example for your particular requirements: Imports System.Text.RegularExpressions Public Class Form1 Private Sub btnTest_Click(sender As System.Object, e As System.EventArgs) Handles btnTest.Click If Regex.IsMatch(txtTestStr.Text, "^[2-9]\d{2}-\d{3}-\d{4}$") Then txtResult.Text = "Match" Else txtResult.Text = "No Match" End If End Sub …

Member Avatar for benscomputers
0
279
Member Avatar for Eruditio

"Something like" code can't be debugged. What I can do with what you have shown is offer some code that does what I think you want. The following scans the "My Documents" folder on my D: drive and colours the lines based on the age (in months) if the files. …

Member Avatar for Eruditio
0
1K
Member Avatar for iFrolox

Have you looked at [autoit](http://www.autoitscript.com/site/). There is a component, AutoitX, that can be created and used from within vb.

Member Avatar for iFrolox
0
3K
Member Avatar for cheesepotato
Member Avatar for cheesepotato
0
764
Member Avatar for alexandra.lopez.94043
Member Avatar for iFrolox

Try For Each Info As String In System.IO.File.ReadAllLines(AccFileR) Info = IDecode.decryptString(Info) 'Debug.WriteLine(Info) Accounts.Add(New Account(Info.Split(CChar(",")))) My.Forms.Main_frm.AccNumber.Items.Add(iCount) iCount += 1 Next

Member Avatar for TnTinMN
0
141
Member Avatar for Reverend Jim

Web Site Not Responding I was trying to go to a thread this morning (06:20 Winnipeg time) and DaniWeb wouldn't display it. All I got was >The connection to the server was reset while the page was loading. I tried several times with the same result. In order to determine …

Member Avatar for Reverend Jim
0
185
Member Avatar for princy.mohan.1

When the picturebox is loaded with a picture you could put a string into the Tag property. When you click on the picturebox you can copy the Tag value to the TextBox.

Member Avatar for Gé48
0
267
Member Avatar for Reverend Jim

I was trying to find a code snippet so I used the advanced search with the following parameters: Query String = encryption Forum = --VB.NET Type of Article = Code Snippet It came back with "No Results" When I did a manual search of code snippets under vb.net I found …

Member Avatar for diafol
0
288
Member Avatar for iFrolox

If you want to handle all textboxes the same way you can create two generic handlers such as Private Sub TextBox_GotFocus(sender As Object, e As System.EventArgs) sender.BackColor = Color.LightGray End Sub Private Sub TextBox_LostFocus(sender As Object, e As System.EventArgs) sender.BackColor = Color.White End Sub then on form load you can …

Member Avatar for iFrolox
0
2K
Member Avatar for iFrolox

Or if you can't or don't want to group the controls, set the Tag property of each to some known value then test in a loop like For Each ctrl As Control In Me.Controls If ctrl.Tag = "my value" Then ctrl.Enabled = True End If Next

Member Avatar for iFrolox
0
192
Member Avatar for HibaPro

To do that you create an installer package. When a user runs the installer it copies all of the files needed to run the application to the user's computer. You can find detailed instructions [here](http://msdn.microsoft.com/en-us/library/k3bb4tfd.aspx)

Member Avatar for Reverend Jim
0
185
Member Avatar for mike_2000_17

And why is it called the “God particle”? Like God, it is everywhere but hard to find, goes the quip. In fact, the origin of the name is rather less poetic. It comes from the title of a book by Nobel physicist Leon Lederman whose draft title was “The Goddamn …

Member Avatar for DavidB
1
167
Member Avatar for Alifarman

Is it possible you have the wrong encryption settings for tis particular wireless connection? It's possible that one end is set to WEP and the other to WPA. Are you being prompted for a network key when you try to connect?

Member Avatar for Dedra
0
99
Member Avatar for Reverend Jim

Forget the problem with commercials being blasted at you, I've noticed in a few of my regular shows lately, noticibly Burn Notice and Royal Pains, dialog is at one volume level, and the music that plays between scenes (camera pans over scenery/cityscape, etc.) is at three times the volume. It …

Member Avatar for VernonDozier
0
182
Member Avatar for Eruditio

>It converts information from hundreds of Excel documents into a few small text files Let's assume your Excel files are named ss-0001.xls, ss-0002.xls, etc. I'm guessing you have two processes at work here. One process runs independently of the GUI app and renders many Excel files into a few text …

Member Avatar for Reverend Jim
0
1K
Member Avatar for Reverend Jim

In case no one has mentioned it before, I just want to say a public thanks to Davey for all of the interesting news items he finds the time to write up and post.

Member Avatar for happygeek
0
41
Member Avatar for Reverend Jim

I think it would be nice to include the original posting date when a related article is suggested. I'd be more inclined to check it out if I knew the article was less than a few months old. More than a year, not so likely.

Member Avatar for Dani
0
53

The End.