Tag Archive

c# poker HUD free poker HUD free pokerstars HUD free play chip HUD free pokerstars tools free poker tools make your own poker HUD online poker laws play poker online in the states poker poker cheat poker developers poker edge poker news poker positions pokerstars cheat poker tools programming poker track your wins and losses in poker U.S online poker laws vb.net vb.net custom poker controls vb.net poker heads up display source vb.net poker HUD vb.net poker source code vb vs c# view latest online poker bill

building a pokerstars tournament tracker for PSxP2 in vb.net


the tourney tracker area in PSxP2 is looking better every day
free of spam, free to everyone, it will be added this week








PSxP chat server will be released next week



The chat server allows communication between multiple PSxP apps. This server is intended for morale,  support, and to discuss both good and bad decisions AFTER they are made. THIS IS  NOT FOR COLLUSION. The person who runs the server  will distribute their address to the persons of his/her choice and only those persons can connect to the conference. The chat server has an installed bot to manage the conference environment on the rich text chat panels on PSxP. Many text-based commends include KICK, SEEN, MSG, READ, WEATHER, PRIVATEMSG,  etc.

VB.NET ip chat and socket Source code help on request.


VB.NET vs C#

Here in the real world where work actually gets done for actual monetary compensation, developers choose Visual Basic for one reason and one reason only: It’s the programming equivalent to the Leatherman Pocket Multitool. Visual Basic (for Applications) is employed in the MS Office Object Model (from Office 2000 up to and including the new 2012. Visual Basic (for Applications) is employed in the ArcGIS software suite API. VBA is embedded in dozens of other high-end and industry-specific software products for built-in extensibility as well. Visual Basic is employed in Windows Scripting Host (WSH/wscript) and the Command-Based Scripting Host (cscript), and VBScript is processed/executed in HTML markup by all webbrowsers worth having. In Legacy Visual Basic (6 and earlier) VB also exposed OOP, and in DotNET VB exposes OOP plus DotNET. The syntaxes, array functions, and other basic language behaviors are absolutely identical across these multiple and various platforms meaning that if you VB then you do all of the above. If you’re a Visual Basic developer, all of the above is right at your fingertips as long as you’re willing/able to learn the variant engine capabilities.

C# doesn’t offer half of this. In fact, C# only offers DotNET. C# is however, as others have mentioned, an internationally standardized syntax as opposed to a company proprietary language. C# also enjoys an avid following in non-DotNET circles, with multiple interpreters available for Linux/Unix; if you develop on DotNET with C# though, you’re as tied to Windows with DotNET as you would be with Visual Basic. There is a (allegedly functional) product called Mono to extend DotNET onto Linux/Mac platforms, but Mono sucks hard and loud; many proponents will screech that it’s VB that sucks and therefore the Mono project doesn’t support it as well as C#, but if you’ve ever actually tried to use Mono you’d have learnt really fast that System.Windows.Forms doesn’t work well in Mono in any language and System.Net.Security is almost entirely nonexistent (at least if you want/need to work with any SSL over 1.0 and/or use any crypto newer than 10 years old).

On the whole “$10,000.00 USD per year more for developing with C#” question, because the VB developer can literally do anything the C# developer can do and then a whole lot more, the VB developer gets to write his/her own ticket (very, very literally) when working with/for anybody who relies on Microsoft Products like Windows, MS Office, (and ESRI products, and other VBA-embedded products). The C# developer without any ability to do anything but prattle nonsense about how lowly and worthless VB skills are, on the other hand, literally can’t do anything but weigh in heavily on topics he/she knows little/nothing about and then say nasty things like, “I don’t know what you’re talking about and I don’t think you do either,” when they get called on it. So in the end, you should never, never, never select a programming language for any development based on which language is better than another; you should find a competent developer who can tell you his/her own reasons for preferring one language over the other and then let them do it their own way because that way you’ll get the best possible final product out of them.


entire thread on msdn forums


More Casino / Internet poker pairings emerge


•    Trump Taj Mahal – Ultimate Poker
•    Trump Plaza – Betfair
•    Tropicana – Gamesys
•    Borgata (Boyd Gaming) – bwin.party
•    Golden Nugget – Bally Technologies
•    Caesars (Caesars Entertainment) – 888 Holdings
•    Bally’s (Caesars Entertainment) – 888 Holdings
•    Harrah’s (Caesars Entertainment)  – 888 Holdings
•    Showboat (Caesars Entertainment) 888 Holdings


Sending text programmatically to Pokerstars table

this took me awhile to figure out and I’ve had to change it on occasion after some pokerstars updates, besides the PS updates, it’s never failed.

I included the GetText declarations because It’s simple to first grab any text you may be typing in the pokerstars chat enter area at the moment the sub fires, save it as a string somewhere, and then replace it after the sub has sent the programmed chat. This will keep any text you’re typing to the table from being wiped out by the Sub.

use the sub like this:  SendChatToPokerstarsTable(“nice hand”)

Martin Carter – psxpoker.com
PrivateConst WM_SETTEXT = &HC 
PrivateConst WM_GETTEXT = &HD 
PublicConst WM_CHAR = &H102

PublicDeclareFunction GetWindowTextLength Lib“user32.dll”Alias“GetWindowTextLengthA” (ByVal hWnd AsLong) AsLong

PublicDeclareFunction GetWindowText Lib“user32.dll”Alias“GetWindowTextA” (ByVal hWnd AsLong, ByVal prmstrString AsString, ByVal nMaxCount AsLong) AsLong

PublicDeclareFunction FindWindow Lib“user32”Alias“FindWindowA” (ByVal lpClassName AsString, ByVal lpWindowName AsString) AsInteger

PublicDeclareFunction FindWindowEx Lib“user32”Alias“FindWindowExA” (ByVal hWnd1 AsInteger, ByVal hWnd2 AsInteger, ByVal lpsz1 AsString, ByVal lpsz2 AsString) AsInteger

PublicDeclareFunction SendMessageSTRING Lib“user32”Alias“SendMessageA” (ByVal hwnd AsInteger, ByVal wMsg AsInteger, ByVal wParam AsInteger, ByVal lParam AsString) AsInteger

DeclareFunction sendmessagebynum& Lib“user32”Alias“SendMessageA” (ByVal hWnd AsInteger, ByVal wMsg AsInteger, ByVal wParam AsInteger, ByVal lParam AsInteger)

PublicSub SendChatToPokerstarsTable(ByVal Chat)

Dim pokerstarstableframeclass AsLong = FindWindow(“pokerstarstableframeclass”, vbNullString)

Dim pokerstarschateditorclass AsLong = FindWindowEx(pokerstarstableframeclass, 0&, “pokerstarschateditorclass”, vbNullString)

If pokerstarschateditorclass = 0 Then

Exit Sub


Call SendMessageSTRING(pokerstarschateditorclass, WM_SETTEXT, 0&, Chat)

Call sendmessagebynum(pokerstarschateditorclass, WM_CHAR, 13, 0)




You can also loop thru a textbox and instantly send multilines of text to the table.

Dim ChatLines() AsString = Split(TextBox1.Text, vbNewLine)

ForEach line In ChatLines

If line = “” Then line = “.”





multi color and multi value status bars in vb.net


   Displaying large amounts of data in small areas with the visual benefit of status bars or “bar graphs” is great. Doing this within a poker app requires the graphs to have two, three, four, or even five data values to display for each player’s action. I searched for a control that would handle the problem but had no results. here is my solution.

In each example above, I made three labels…

  • set each back color to the desired color
  • set the text alignment to left-center
  • set the heights to the desired height of the entire control
  • set the widths to the desired width of the entire control
  • set the locations the same

You can make a fourth label, 2 pixels larger, that is bordered for the background and make these three borderless for a nice affect.
You can use picture boxes and stretch images to create an even better effect. Whatever you have time for. ( I have made some very nice controls with this method)



Private Sub DisplayIt(lbl1 As Label, lbl2 As Label, lbl3 As Label, val1 As Integer, val2 As Integer, val3 As Integer)

Martin Carter – psxpoker.com

 ‘the percentage of graph used by each label, times 200 pixels (the width of the control)

lbl1.Width = val1 / (val1 + val2 + val3) * 200

lbl2.Width = val2 / (val1 + val2 + val3) * 200

lbl3.Width = val3 / (val1 + val2 + val3) * 200

 ‘the position of the 2nd and 3rd labels

lbl2.Left = (lbl1.Left + lbl1.Width)

lbl3.Left = (lbl2.Left + lbl2.Width)

‘print the values on the labels

lbl1.Text = Math.Round(val1 / (val1 + val2 + val3) * 100) & “%”

lbl2.Text = Math.Round(val2 / (val1 + val2 + val3) * 100) & “%”

lbl3.Text =Math.Round(val3 / (val1 + val2 + val3) * 100) & “%”

End Sub


‘use the sub like this…


PrivateSub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click

Call DisplayIt(Label1, Label2, Label3, 11, 17, 5)

‘remember to handle the “isnumeric” exeption when passing the values

‘if 1 value is 0 then the other 2 labels will fill the control with the correct %



I use these controls to display “wins-uncalled wins-losses”, “bets preflop-flop-turn-river”, “in hand UTG-UTG+1-mid-mid+1-hijack-cutoff-button”. etc.


Trigger an event from a pokerstars hand completion in vb.net

 This will search the Pokerstars hand history folders on your comp and trigger an event when the size of one of those hand history files changes.

I set the timer to 3 seconds and get NO processor spike at all and it catches every append to pokerstars HH files in as many tables you are on. If you plan on parsing hands just split the string in the streamreader with (vbnewline & vbnewline & vbnewline) .  Add it to an array. You will have an array of every hand played in that HH file to parse any info you need after each hand completes. You could also use lastindexof for the latest completed hand.



Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick 'Martin Carter – psxpoker.com Dim dir As String dir = System.Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) 'this is the pokerstars default directory Dim MyHHpath As String = dir & "\PokerStars\HandHistory\" 'create the array to put all the directories in to search for HH files.
Dim DirList As New ArrayList 'get the subdirectories If (System.IO.Directory.Exists(dir & "\PokerStars\HandHistory")) Then GetDirectories(MyHHpath, DirList) 'this is a folder i also save HH files in DirList.Add(System.Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments).ToString & "\HH") lstDirFile.Items.Clear() For Each x In DirList Dim files() As System.IO.FileInfo Dim dirinfo As New System.IO.DirectoryInfo(x.ToString) files = dirinfo.GetFiles("HH*Hold'em*.txt", IO.SearchOption.AllDirectories) For Each file In files 'skip the holdem omaha mixed games If file.ToString.Contains("Omaha") = True Then GoTo skipOmahaFile 'path and filename Dim FileN As String = dirinfo.ToString & "\" & file.ToString Dim filex As New FileInfo(FileN) sizeInBytes2 = filex.Length 'i use this to only add files modified today (ext.letfof is a function... ext.leftof("blah","ah") returns "bl" Dim Lastwrite As Date = eXt.LeftOf(filex.LastWriteTime, " ") 'add the size in bytes and filename to list a If Lastwrite = eXt.LeftOf(Now, " ") Then lstDirFile.Items.Add(sizeInBytes2.ToString & ", " & FileN) End If SkipOmahaFile: Next Next If lstDirFile.Items.Count = 0 Then Exit Sub Else ' populate list b from list a if its empty If lstDirFile2.Items.Count = 0 Then For i = 0 To lstDirFile.Items.Count - 1 lstDirFile2.Items.Add(lstDirFile.Items.Item(i)) Next Else 'start compare and refresh list here 'loop thru list a For i = 0 To lstDirFile.Items.Count - 1 'loop thru list b For x = 0 To lstDirFile2.Items.Count - 1 'If the 2 filenames are the same If eXt.RightOf(lstDirFile.Items.Item(i), ", ") = eXt.RightOf(lstDirFile2.Items.Item(x), ", ") Then 'if the sizes dont match then a hand has just completed If eXt.LeftOf(lstDirFile.Items.Item(i), ", ") <> eXt.LeftOf(lstDirFile2.Items.Item(x), ", ") Then 'here is the file that changed and it is read into memory Dim sr As New IO.StreamReader(eXt.RightOf(lstDirFile.Items(i), ", ").ToString) Dim Sr2 As String = sr.ReadToEnd 'your event would go here
End If End If Next Next 'now move the items from list a to list b for the next timer trigger to compare again lstDirFile2.Items.Clear() For i = 0 To lstDirFile.Items.Count - 1 lstDirFile2.Items.Add(lstDirFile.Items.Item(i)) Next End If End If End Sub


I collect 77 different data values from 9 players per hand and store that data on a list of 7000+ players. I parse about 2300 hands per minute on a laptop with this code. Don’t forget to handle exceptions.


Hit Counter provided by shuttle service from lax