VB.NET Color Dialog Return String Value

Here recently I have been working more and more with Visual Studio again, and more specifically the Color Picker / Color Dialog control. For my purposes, I wanted the user to pick a color, and that color to then populate a text box in the form of an HTML compliant hex value, in other words, I need the result from the color picker as a string. Now, in VB.NET 2010 which is what I am using, the result from the color picker is in a format that is primed and ready to apply to a control, to change its fore or back round color. It does not give you a value in string format. So, I had to do a good bit of searching and work to figure this out.

Basically, what I ended up with was a function that you run the color picker response or value through. It’s pretty simple really:

Public Function Color2Html(ByVal MyColor As Color) As String
  Return "#" & MyColor.ToArgb().ToString("x").Substring(2).ToUpper
End Function

That’s it, that will return to you a hex color code formatted for HTML use. Just in case you are unsure of exactly how to use the function, this is the code I use with my color picker control (I use a standard button to fire it off with the result going into a text box):

Private Sub btnColor1_Click(sender As System.Object, e As System.EventArgs) Handles btnColor1.Click
  Dim NewColor As New ColorDialog()
  NewColor.AllowFullOpen = True
  NewColor.ShowHelp = True
  If (NewColor.ShowDialog() = Windows.Forms.DialogResult.OK) Then
    txtColor.Text = Color2Html(NewColor.Color)
  End If
End Sub

That’s all there is too it. I hope this helps you get your string data from your Color Dialog / Color Picker control. Enjoy!

Blizzard Hearthstone Blank Screen Not Responding FIX

If you are trying to play Hearthstone, now in open BETA, and are having a problem where as soon as you hit the Play button the screen or window goes dark and the process in the task manager says it’s “Not Responding”, I may have a fix for you.

I had this very same problem and after no help from the forums or tech support, I figured it out myself. Really it was just basic troubleshooting. Getting to the part that helped me with the problem, I disabled my firewall and associated agents (I am running Avast Internet Security, one of the best), the game suddenly ran fine! Imagine that. That meant that the problem was with my firewall. Sure enough, I re-enabled everything and the game stopped working, went right back to the blank screen.

So, here is where the fix comes in. Even if you aren’t running Avast, this could be your problem regardless of what brand of firewall you are running. Check out what I found and see if you have the same problem with your firewall.

I went into the settings and in the application specific rules section, where firewall rules are associated with specific executable programs, I found rules for the Blizzard Agent, the Updater and many more, even the Hearthstone Setup executable. What I did not find was any rule for the Hearthstone game app at all! They had rules for everything but the game itself! So, I simply added a rule for the Hearthstone executable itself

C:\Program Files(x86)\Heartstone\Hearthstone.exe on my system

and then all went well after that, the game ran fine. The whole problem was that the game executable could not talk through the firewall. Once that was enabled, everyone was happy, including me! I hope that helps you with your problem.

Check Out Linux Mint

Linux Mint Operating SystemI have to share something with everyone now. Anybody and everybody that knows me, knows that I am a die hard UNIX and Linux fan. I made the majority of my career managing UNIX and Linux boxes, with a server to admin ratio of sometimes 100 to 1. Everyone also knows that I am a die hard Debian fan, my distro of choice for my servers and my desktops is Debian, hands down. However, that doesn’t mean that I don’t use or like other distributions, I mean every one has it’s place and purpose. I really dig Ubuntu and SuSE and I cut my teeth on Red Hat and CentOS just as an example.

That being said, the purpose of this post is to tell you about another distro that I just recently checked out called Linux Mint. I know a lot of people have found it since it is in the number one slot over at distrowatch. On the recommendation of my friend Steve, I tried it out and I have to tell you that I was absolutely blown away by it. It’s based on Ubuntu which itself based on Debian so right there is a plus in my book, it has a solid core and foundation, but that’s not what blew me away.

Continue reading

Get Your Internet IP Address Fast And Free!

Network Connection InformationJust in case you need to know your Internet facing IP address, I have setup a new page just for the purpose of showing you that information and more, right down to your longitude and latitude just in case any of you are hiding some ICBM’s in your backyard and want to reach out and touch someone! So check it out, go to http://yerip.com and see what it has to say about you, and before you say it, I know this has already been done. There are other sights on the net that show you what your IP address is, but I wanted one that wasn’t going to display ads or have any ulterior motives, just quickly and cleanly providing a good service!

Create Your Site’s Favicon In One Step

folderAre you working on a website? Do you want to do all of the creating and coding of the ‘favicon’ stuff by hand? Heck no, it’s a pain in the rear! No doubt you can do it but it takes a long time and it gets old after you do it a few bazillion times, right? So what’s a poor web developer to do? Well, check out this site: Faviconit.com! Upload one image, and press a button. Their site turns that not only into the regular favicon you need, but all of the variants for other systems, mobile, different browsers and more. Plus, you get the code that makes it all work too. Upload your image, hit the button, and you get a zip file with all of your goodies in it. Now, how much does this cost I hear you asking. Yet another great thing about this site, it is completely free!! So go check it out and off load some of your website setup work for a change! Enjoy!!

Post Link: http://faviconit.com