daviangel (7) [Avatar] Offline
Any VB programmers using this book?
How hard would it be to port the source code to VB?
Anyone tried yet?
daviangel (7) [Avatar] Offline
Re: VB version
Well I'm up to chapter 4 now and hit a major snag in sec 4.2.1 since enum is a keyword in VB!
Well after about an hour I came up with the following equivalent VB code which seems to work:

' Implement method to modify SizeMode property for the picture box
' Hardest to implement since enum is keyword in VB6 so conflicts!
Private Sub ProcessImageClick(ByVal e As System.Windows.Forms.ToolStripItemClickedEventArgs)
Dim item As ToolStripItem = e.ClickedItem
Dim enumVal As String = item.Tag.ToString
If (enumVal <> Nothing) Then
pbxPhoto.SizeMode = [Enum].Parse(GetType(PictureBoxSizeMode), enumVal)
End If

End Sub