Click here to Skip to main content
15,914,016 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: FlowLayoutPanel1 and controls Pin
Ammar_Ahmad22-Jun-12 2:59
Ammar_Ahmad22-Jun-12 2:59 
GeneralRe: FlowLayoutPanel1 and controls Pin
Nick Otten22-Jun-12 3:28
Nick Otten22-Jun-12 3:28 
GeneralRe: FlowLayoutPanel1 and controls Pin
Ammar_Ahmad22-Jun-12 3:36
Ammar_Ahmad22-Jun-12 3:36 
GeneralRe: FlowLayoutPanel1 and controls Pin
Nick Otten22-Jun-12 3:42
Nick Otten22-Jun-12 3:42 
GeneralRe: FlowLayoutPanel1 and controls Pin
Ammar_Ahmad22-Jun-12 13:16
Ammar_Ahmad22-Jun-12 13:16 
QuestionCommandBuilder Problem Pin
Pasan14821-Jun-12 5:13
Pasan14821-Jun-12 5:13 
AnswerRe: CommandBuilder Problem Pin
David Mujica21-Jun-12 5:25
David Mujica21-Jun-12 5:25 
GeneralRe: CommandBuilder Problem Pin
Pasan14821-Jun-12 6:30
Pasan14821-Jun-12 6:30 
GeneralCommandBuilder is not preferred method Pin
David Mujica21-Jun-12 10:29
David Mujica21-Jun-12 10:29 
QuestionTrying to merge exel print jobs Pin
Nick Otten21-Jun-12 3:00
Nick Otten21-Jun-12 3:00 
AnswerBuild your own queue Pin
David Mujica21-Jun-12 3:31
David Mujica21-Jun-12 3:31 
GeneralRe: Build your own queue Pin
Nick Otten21-Jun-12 3:50
Nick Otten21-Jun-12 3:50 
AnswerRe: Trying to merge exel print jobs Pin
Dave Kreskowiak21-Jun-12 3:35
mveDave Kreskowiak21-Jun-12 3:35 
GeneralRe: Trying to merge exel print jobs Pin
Nick Otten21-Jun-12 3:44
Nick Otten21-Jun-12 3:44 
GeneralRe: Trying to merge exel print jobs Pin
Dave Kreskowiak21-Jun-12 4:04
mveDave Kreskowiak21-Jun-12 4:04 
GeneralRe: Trying to merge exel print jobs Pin
Nick Otten21-Jun-12 4:25
Nick Otten21-Jun-12 4:25 
GeneralRe: Trying to merge exel print jobs Pin
Dave Kreskowiak21-Jun-12 5:18
mveDave Kreskowiak21-Jun-12 5:18 
GeneralRe: Trying to merge exel print jobs Pin
Nick Otten21-Jun-12 21:26
Nick Otten21-Jun-12 21:26 
AnswerRe: Trying to merge exel print jobs Pin
Mycroft Holmes21-Jun-12 19:42
professionalMycroft Holmes21-Jun-12 19:42 
GeneralRe: Trying to merge exel print jobs Pin
Nick Otten21-Jun-12 21:32
Nick Otten21-Jun-12 21:32 
GeneralRe: Trying to merge exel print jobs Pin
Mycroft Holmes21-Jun-12 22:18
professionalMycroft Holmes21-Jun-12 22:18 
Questionbyte array to string Pin
jkirkerx20-Jun-12 18:06
professionaljkirkerx20-Jun-12 18:06 
I'm stumped.

I tried translating a class in c# to vb, and I'm stuck on this function.

For some reason, it's not looping around enough, to get the desired result.

So the input array is 0 0 6 089 0 0 12 176
and the output of converted is suppose to be "0000000000000000000001100101100100000000000000000000110010110010"

but I get 000000000000

Private Function ByteArrayToBitString(ByVal byteArray() As Byte) As String

        Dim idx As Integer = 0
        Dim jdx As Integer = 0
        Dim newByteArray() As Byte = New Byte(byteArray.Length - 1) {}

        Array.Copy(byteArray, newByteArray, byteArray.Length - 1)
        Dim converted As String = ""

        For idx = 0 To newByteArray.Length - 1
            For jdx = 0 To 7
                converted += If((newByteArray(idx) And &H80) > 0, "1", "0")
                newByteArray(idx) <<= 1
                jdx += 1
            Next
            idx += 1
        Next

        Return converted

    End Function


I took out the code, to test the loop counts, and it comes up short on jdx, and the idx loops around 8 times.

I must of made a stupid mistake somewhere, but I can't figure where. Just looking for other eyes on the code, because I don't see it, perhaps my translation is wrong somewhere, but you should be able to get the idea.
SuggestionRe: byte array to string Pin
Sandeep Mewara20-Jun-12 19:36
mveSandeep Mewara20-Jun-12 19:36 
GeneralRe: byte array to string Pin
jkirkerx20-Jun-12 20:10
professionaljkirkerx20-Jun-12 20:10 
GeneralRe: byte array to string Pin
Sandeep Mewara21-Jun-12 19:17
mveSandeep Mewara21-Jun-12 19:17 

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.