Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Also guilty. I don't see the point in adding tags when posting in a specific forum such as vb.net.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Unsecure would be akin to "open to penetration". Insecure would be "unsure of oneself".

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

"Arguing that climate change isn't real because it's cold is like saying the sun doesn't exist because it's night." - Bill maher

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Several times a day I browse the vb.net forum (and a few others) to see what's new and to check if there are any questions for which I can provide feedback. What happens to those questions that don't fit into an existing forum? If, for example, I had expertise in Photoshop or GIMP, how would I check to see if there are any related questions? I suppose I could type "Photoshop" or "GIMP" into the search box, but that would result in all posts that merely contain those phrases, so if someone replies in the Geek's lounge with "I used GIMP to create my avatar" then that post would appear in the list. Is there a search feature that searches only on tags? If not then perhaps there should be a forum dedicated to photo/video processing.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

The problem is, if the doctor works for the hospital, and the hospital profits from excessive tests, then the doctor may order these tests to generate revenue for the hospital.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

When I saw my first Amiga in 1985, and really started grokking the potential.

I noticed the ball from the boing demo in your avatar ;-) I'm still waiting for a port of CygnusEd to Windows so I can see if it is as great as I remember. Know any good (free) Amiga emulators?

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Well, here in Canada the doctor does not get paid more for ordering more tests so I suppose the reasons for more tests would be more akin to 1, 2, & 3.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Just add more clauses to the ORDER BY as in

ORDER BY fld1 DESC, fld2 ASC, fld3 ASC
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

My first personal computer was a Commodore 64, followed ASAP by an Amiga 1000. The first computer I ran a program on was an IBM 1620.

Stuugie commented: The 64 was my first experience with a pc. +0
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I don't know if this works but... how to receive XP security updates until 2019

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Contrary to popular belief, gun ownership in the US is actually declining. In the '70s, nearly half of all American households had a gun. Today it's closer to 34%.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Try downloading a linux livecd and booting off that. Copy the files to another folder/device then delete the bad folders.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

No. There was no sound coming from the drive. It was a "boop" (sort of a mellow "beep") coming from the motherboard. And it was happening whether or not I had to mute on.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

My nephew had a tattoo done in 2009 that he said was extremely painful. The artist got halfway through and asked if he wanted to wait until the next day to complete it. The response was "If I get out of this chair there is no way you'll ever get me back into it."

31d99f70c037d387cbe8be6914a3aa2b

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

The problem is that you are leaving the control to ask the user to enter a value and when you get back to the textbox the got-focus event fires again. If the only valid response to "Do you want to define a value" is "Yes" then why do you ask the question. You should just say "You must define a value to continue. In that case you could do something like display a message in a label like "You must enter a value to continue" and set the background colour of the textbox to red to highlight it. Just make sure that you don't leave the user stuck in the control.

Instead of locking the user in the control you could display a modal dialog box prompting the user to enter a value and testing when the dialog is closed for a valid value or cancel and taking the appropriate action.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Apparently the random sounds were trying to warn me of an imminent drive failure (something for which I still have not found documentation). My drive crashed for good on Monday night. Fortunately I am diligent with my backups and did not lose even a single byte. I have not heard a single beep since.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

What I can't stand is empty-headed people, with nothing to offer but the urge to throw a dictionary at their faces.

Now we're talking vocabulary. When it comes to vocabulary I am more annoyed by people who pepper their speech with $50 words and/or jargon. These people speak to impress, not to inform.

When I hear someone with a 4th grade education say "I seen it with my own two eyes" I am more forgiving than when I hear the same from someone with a college education. When I hear "That's just between you and I.", I positively cringe.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

You do the INSERT when there is no value entered for locid. Is this really what you want? Also, why are you using ExecuteReader for the INSERT? Use ExecuteNonQuery instead. You use ExecuteScalar when you are returning one value or ExecuteReader when you are returning more than one value. In your case you are not returning any values.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

The link to the picture is broken.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I'm assuming you've never been bullied.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

If you want the speed then you can always invest in an SSD.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

The one thing about most languages is even if you lose the indentation you can always recreate it. In Python, if you lose the indentation you are pretty much screwed.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

If you are using OleDb then try

access = "UPDATE tbl_location WHERE locid = ? SET locname = ?, locadd = ?"
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Everyone's chart looks completely different

I didn't see anything on the page that said those were the numbers for me so I assumed it was a generic "this is a sample page with sample data".

Just don't hit the Cash Out button.

So as long as I don't "cash out" I have effectively donated the money back to Daniweb? Sounds good to me. Although if I ever get to Stony Brook to see my son I might want to hit you up for a coffee mug or some other token.

What do the asterisks on the months mean?

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

What exactly am I looking at? I see a graph and a pile of numbers with $12.63 at the bottom. Some of the months are tagged with an asterisk. Without some explanation this page means nothing to me.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

You should be able to figure that out from the code. You can take

sheet.Cells(row, col) = item.SubItems(i).Text

and put headers/text in any cell you want. Just change the values for row and col to select a specific cell and replace

item.SubItems(i).Text

with the string you want in the header cell.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

You mean you want us to do all the work for you even though you have shown no proof that you have put any effort into it yourself?

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

The outdoor set for the Star Trek episode, "Miri", is the same set used for Main Street, Mayberry in "The Andy Griffith Show" but with garbage and debris added.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Contrary to popular belief, captains of seagoing vessels have never had the legal authority to perform weddings.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

You can find lots of good stuff in the Code Snippets section such as how to
Export ListView to Excel Spreadsheet

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

And of course, the Flat Earth Society (of which Canadian Author, Farley Mowat) was a member. The Flat Earth Society is to geography what Pastafarians are to religion.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I can't say enough good things about SpinRite

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Contrary to popular belief, Napoleon was not short. He was actually slightly above average height for a Frenchman of that era. He is unjustly believed to be short because the French foot of that time was slightly longer than our modern foot. He was 5'2" using the old measurement but just shy of 5'7" in today's feet. Also, there were height requirements for his personal guard such that when seen with them in public he appeared short in comparison.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

See here

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

So far all I can find is the beep codes at POST. I don't get any errors or beeps at POST, just randomly while running Windows.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Regardless. You are still asking for someone to do your homework for you. You haven't shown us that you have put in any effort.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

When a good brand (Toshiba) makes a bad laptop, admits to fault and still charges you to fix/replace the laptop, in my mind that brand becomes a bad brand.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

FORTRAN has always been the winner for number crunching because it produces the most highly optimized code. C/C++ runs a close second but is still slightly behind. The major reason for FORTRAN's ability to optimize is the result of how C/C++ manages arrays. In C/C++, arrays are managed through pointers. As such, the compiler can not make the assumption that two arrays do not overlap. FORTRAN has true arrays and the compiler can determine that arrays are non-overlapping and can split array calculations over multiple processors. In the 1999 update to the C specification (C99) arrays could be specified as not overlapping so this definitely narrowed the gap.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Let's look at the statement

Dim MySQLStatement As String = "INSERT INTO player_log (Last_Name, First_Name) VALUES (' " & TxtLastName.Text & " ' , ' " & TxtFirstName.Text & " ')"

If we plug in values "Jim" and "Jones" it evaluetes to

INSERT INTO player_log (Last_Name, First_Name) VALUES (' Jones ' , ' Jim ')

Do you see the problem? You are adding a blank at each end of the names. Try changing it to

Dim MySQLStatement As String = "INSERT INTO player_log (Last_Name, First_Name) VALUES ('" & TxtLastName.Text & "' , '" & TxtFirstName.Text & "')"

If you used parameterized queries as I suggested in your other thread on this topic you wouldn't have had this problem.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I have a Dell Inspiron 1720 running Windows 7 Pro. At random times throughout the day it says "boop" (a short, mellow toned beep). It is not associated with any particular action or program and doesn't seem to be a Windows sound. I've run diagnostics twice and nothing shows up. Any suggestions?

Yes, I do regular backups and disk images.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Cliven Bundy does not have the "ancestral rights," claimed because his family had worked the land since the 1870s, before the creation of the BLM. In fact, according to Clark County property records, his family purchased the land in 1948 from Raoul and Ruth Leavitt. The United States Bureau of Land Management was created in 1946.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

You can play mp3 (or wav) files in the background by embedding the windows media player.

Add a project reference (COM tab) to Windows Media Player

Add Imports WMPLib

At the class level declare

Private Player As New WMPLib.WindowsMediaPlayer

You play a file by

Player.URL = "D:\My Music\SomeFile.mp3"
Player.Controls.Play()

I added a handler to show the current state in the title bar

AddHandler Player.PlayStateChange, AddressOf PlayStateChanged

    Private Sub PlayStateChanged(newstate As Integer)

    Select Case newstate
        Case WMPPlayState.wmppsStopped
            Me.Text = "Stopped"
        Case WMPPlayState.wmppsPlaying
            Me.Text = "Playing"
        Case Else
            Me.Text = Player.playState
    End Select

End Sub

If, for example, you had a list of sound files and you wanted to immediately play the next one when the current one ends you could add that code to the wmppsStopped Case clause. You could add other controls for things like mute, volume, etc.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Question 1

Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
    Cursor.Position = MousePosition + Button2.Location - Button1.Location
End Sub

Private Sub Button2_Click(sender As System.Object, e As System.EventArgs) Handles Button2.Click
    Cursor.Position = MousePosition + Button3.Location - Button2.Location
End Sub

Private Sub Button3_Click(sender As System.Object, e As System.EventArgs) Handles Button3.Click
    Cursor.Position = MousePosition + Button1.Location - Button3.Location
End Sub

Control locations are relative to the form whereas MousePosition is relative to the screen so we calculate the new cursor location by using the difference between the current control being clicked and the target control.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I would code it as

Private Function UserExists(fname As String, lname As String) As Boolean

    Dim con As New MySqlConnection(SQLConnect)
    con.Open()

    Dim cmd As MySqlCommand = con.CreateCommand
    cmd.CommandText = "SELECT COUNT(*) FROM player_log" &
                      " WHERE last_name  = '" & lname & "'" &
                      "   AND first_name = '" & fname & "'"

    UserExists = cmd.ExecuteScalar > 0
    MsgBox(IIf(UserExists, "User exists", "User does not exist"))

    con.Close()

End Function

and call it as

If UserExists(txtFirstName.Text, txtLastName.Text) Then

I'm assuming your objects for MySql are correct. I use MS SQL.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

You don't need a datareader. All you need to know is if you have a record that matches the username and password.

cmd.CommandText = "SELECT COUNT(*) FROM userinfo" &
                  " WHERE usname =     '" & textbox1.Text & "'" &
                  "   AND [password] = '" & textbox2.Text & "'"

If cmd.ExecuteScalar <> 0 Then
    'user is valid
Else
    'user is not valid
End If

But you should really use parameterized queries

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

You could extract the numeric portion of the name like

For Each cbx As CheckBox In Me.Controls.OfType(Of CheckBox)()
    Dim num As Integer = CInt(cbx.Name.Substring(8))
    If num >= 1 And num <= 20 Then
        cbx.Checked = False
    End If
Next
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

The reason is that

Me.Controls("CheckBox" & i)

evaluates to a generic control and while a generic control has a Visible property, it does not have a Checked property. That is why you have to cast it to the correct control type first. You could also use a more specific for loop which enumerates only CheckBox controls.

For Each cbx As CheckBox In Me.Controls.OfType(Of CheckBox)()
    cbx.Checked = False
Next
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I've never personally had a problem with Dells and there have been five in my immediate family. On the rare occasions I've had to get service it was always easily arranged with a fast turnaround time. I was even able to get a replacement battery out at the cottage in the middle of nowhere.

I won't condemn Toshiba forever, but a few years ago we had a problem with a batch of them at the office. A design flaw caused the hard drives to fail on a regular basis. Toshiba admitted the problem was theirs but refused to repair/replace. We are talking about 10-15 laptops. That decision by Toshiba caused my company to switch from Toshibas to Thinkpads. In a corporation of 5000 people, that amounted to a hefty chunk of change that Toshiba lost.