Click here to Skip to main content
15,886,919 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Continue to next step in a for..next loop only when the user press a button. Pin
dilkonika21-Apr-15 6:07
dilkonika21-Apr-15 6:07 
GeneralRe: Continue to next step in a for..next loop only when the user press a button. Pin
Richard Deeming21-Apr-15 6:33
mveRichard Deeming21-Apr-15 6:33 
GeneralRe: Continue to next step in a for..next loop only when the user press a button. Pin
dilkonika21-Apr-15 7:28
dilkonika21-Apr-15 7:28 
GeneralRe: Continue to next step in a for..next loop only when the user press a button. Pin
Eddy Vluggen21-Apr-15 9:15
professionalEddy Vluggen21-Apr-15 9:15 
GeneralRe: Continue to next step in a for..next loop only when the user press a button. Pin
Eddy Vluggen21-Apr-15 6:34
professionalEddy Vluggen21-Apr-15 6:34 
GeneralRe: Continue to next step in a for..next loop only when the user press a button. Pin
Sascha Lefèvre25-May-15 17:06
professionalSascha Lefèvre25-May-15 17:06 
GeneralRe: Continue to next step in a for..next loop only when the user press a button. Pin
Eddy Vluggen26-May-15 3:12
professionalEddy Vluggen26-May-15 3:12 
Questionvb.net to vb6 convertion Pin
hitu4u06716-Apr-15 23:04
hitu4u06716-Apr-15 23:04 
Public Class Form1
Private Function getCrc16(b() As Byte, nLen As Integer) As UInt16
Static crctab16() As UInt16 = _
{&H0, &H1189, &H2312, &H329B, &H4624, &H57AD, &H6536, &H74BF, _
&H8C48, &H9DC1, &HAF5A, &HBED3, &HCA6C, &HDBE5, &HE97E, &HF8F7, _
&H1081, &H108, &H3393, &H221A, &H56A5, &H472C, &H75B7, &H643E, _
&H9CC9, &H8D40, &HBFDB, &HAE52, &HDAED, &HCB64, &HF9FF, &HE876, _
&H2102, &H308B, &H210, &H1399, &H6726, &H76AF, &H4434, &H55BD, _
&HAD4A, &HBCC3, &H8E58, &H9FD1, &HEB6E, &HFAE7, &HC87C, &HD9F5, _
&H3183, &H200A, &H1291, &H318, &H77A7, &H662E, &H54B5, &H453C, _
&HBDCB, &HAC42, &H9ED9, &H8F50, &HFBEF, &HEA66, &HD8FD, &HC974, _
&H4204, &H538D, &H6116, &H709F, &H420, &H15A9, &H2732, &H36BB, _
&HCE4C, &HDFC5, &HED5E, &HFCD7, &H8868, &H99E1, &HAB7A, &HBAF3, _
&H5285, &H430C, &H7197, &H601E, &H14A1, &H528, &H37B3, &H263A, _
&HDECD, &HCF44, &HFDDF, &HEC56, &H98E9, &H8960, &HBBFB, &HAA72, _
&H6306, &H728F, &H4014, &H519D, &H2522, &H34AB, &H630, &H17B9, _
&HEF4E, &HFEC7, &HCC5C, &HDDD5, &HA96A, &HB8E3, &H8A78, &H9BF1, _
&H7387, &H620E, &H5095, &H411C, &H35A3, &H242A, &H16B1, &H738, _
&HFFCF, &HEE46, &HDCDD, &HCD54, &HB9EB, &HA862, &H9AF9, &H8B70, _
&H8408, &H9581, &HA71A, &HB693, &HC22C, &HD3A5, &HE13E, &HF0B7, _
&H840, &H19C9, &H2B52, &H3ADB, &H4E64, &H5FED, &H6D76, &H7CFF, _
&H9489, &H8500, &HB79B, &HA612, &HD2AD, &HC324, &HF1BF, &HE036, _
&H18C1, &H948, &H3BD3, &H2A5A, &H5EE5, &H4F6C, &H7DF7, &H6C7E, _
&HA50A, &HB483, &H8618, &H9791, &HE32E, &HF2A7, &HC03C, &HD1B5, _
&H2942, &H38CB, &HA50, &H1BD9, &H6F66, &H7EEF, &H4C74, &H5DFD, _
&HB58B, &HA402, &H9699, &H8710, &HF3AF, &HE226, &HD0BD, &HC134, _
&H39C3, &H284A, &H1AD1, &HB58, &H7FE7, &H6E6E, &H5CF5, &H4D7C, _
&HC60C, &HD785, &HE51E, &HF497, &H8028, &H91A1, &HA33A, &HB2B3, _
&H4A44, &H5BCD, &H6956, &H78DF, &HC60, &H1DE9, &H2F72, &H3EFB, _
&HD68D, &HC704, &HF59F, &HE416, &H90A9, &H8120, &HB3BB, &HA232, _
&H5AC5, &H4B4C, &H79D7, &H685E, &H1CE1, &HD68, &H3FF3, &H2E7A, _
&HE70E, &HF687, &HC41C, &HD595, &HA12A, &HB0A3, &H8238, &H93B1, _
&H6B46, &H7ACF, &H4854, &H59DD, &H2D62, &H3CEB, &HE70, &H1FF9, _
&HF78F, &HE606, &HD49D, &HC514, &HB1AB, &HA022, &H92B9, &H8330, _
&H7BC7, &H6A4E, &H58D5, &H495C, &H3DE3, &H2C6A, &H1EF1, &HF78}
    Dim fcs As UInt16 = &HFFFF
    For i = 0 To nLen - 1
        fcs = (fcs >> 8) Xor crctab16((fcs Xor b(i)) And &HFF)
    Next
    Return Not fcs

End Function

Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
Dim s As String = "0D0103588990532174470001"
Dim inp(s.Length \ 2 - 1) As Byte 'allocate byte array storage assumes string length is even, 2 chars per hex byte
For i = 0 To inp.Length - 1 'for each byte in the array
inp(i) = Convert.ToByte(s.Substring(i * 2, 2), 16) 'convert 2 hex chars from the string into a byte value
Next
TextBox1.Text = (getCrc16(inp, inp.Length).ToString("X"))
End Sub
End Class

This is VS2010(vb.net) code i want to convert it in visual basic 6.0.
is there any one who can solve this issue??? this codding is useful to calculate crc itu error check..
AnswerRe: vb.net to vb6 convertion Pin
Dave Kreskowiak17-Apr-15 2:31
mveDave Kreskowiak17-Apr-15 2:31 
GeneralRe: vb.net to vb6 convertion Pin
Sascha Lefèvre17-Apr-15 2:46
professionalSascha Lefèvre17-Apr-15 2:46 
GeneralRe: vb.net to vb6 convertion Pin
Dave Kreskowiak17-Apr-15 3:56
mveDave Kreskowiak17-Apr-15 3:56 
SuggestionRe: vb.net to vb6 convertion Pin
Richard Deeming17-Apr-15 2:47
mveRichard Deeming17-Apr-15 2:47 
GeneralRe: vb.net to vb6 convertion Pin
hitu4u06717-Apr-15 3:20
hitu4u06717-Apr-15 3:20 
GeneralRe: vb.net to vb6 convertion Pin
Eddy Vluggen17-Apr-15 3:31
professionalEddy Vluggen17-Apr-15 3:31 
GeneralRe: vb.net to vb6 convertion Pin
hitu4u06717-Apr-15 3:44
hitu4u06717-Apr-15 3:44 
GeneralRe: vb.net to vb6 convertion Pin
Eddy Vluggen17-Apr-15 3:51
professionalEddy Vluggen17-Apr-15 3:51 
GeneralRe: vb.net to vb6 convertion Pin
Dave Kreskowiak17-Apr-15 4:03
mveDave Kreskowiak17-Apr-15 4:03 
GeneralRe: vb.net to vb6 convertion Pin
hitu4u06717-Apr-15 4:06
hitu4u06717-Apr-15 4:06 
GeneralRe: vb.net to vb6 convertion Pin
Eddy Vluggen17-Apr-15 8:04
professionalEddy Vluggen17-Apr-15 8:04 
GeneralRe: vb.net to vb6 convertion Pin
hitu4u06718-Apr-15 0:53
hitu4u06718-Apr-15 0:53 
GeneralRe: vb.net to vb6 convertion Pin
Dave Kreskowiak17-Apr-15 3:57
mveDave Kreskowiak17-Apr-15 3:57 
Questionvb6 phsical keyboard detect Pin
Member 1160234116-Apr-15 21:01
Member 1160234116-Apr-15 21:01 
AnswerRe: vb6 phsical keyboard detect Pin
Dave Kreskowiak17-Apr-15 2:28
mveDave Kreskowiak17-Apr-15 2:28 
GeneralRe: vb6 phsical keyboard detect Pin
Member 1160234117-Apr-15 16:17
Member 1160234117-Apr-15 16:17 
AnswerRe: vb6 phsical keyboard detect Pin
Sascha Lefèvre17-Apr-15 3:00
professionalSascha Lefèvre17-Apr-15 3:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.