Click here to Skip to main content
15,922,166 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Windows Control Panel Pin
Tom Deketelaere2-Aug-07 4:30
professionalTom Deketelaere2-Aug-07 4:30 
GeneralRe: Windows Control Panel Pin
faruk_ozturk2-Aug-07 4:35
faruk_ozturk2-Aug-07 4:35 
GeneralRe: Windows Control Panel Pin
Tom Deketelaere2-Aug-07 4:41
professionalTom Deketelaere2-Aug-07 4:41 
GeneralRe: Windows Control Panel Pin
faruk_ozturk2-Aug-07 4:44
faruk_ozturk2-Aug-07 4:44 
GeneralRe: Windows Control Panel Pin
Tom Deketelaere2-Aug-07 4:59
professionalTom Deketelaere2-Aug-07 4:59 
AnswerRe: Windows Control Panel Pin
Luc Pattyn2-Aug-07 7:16
sitebuilderLuc Pattyn2-Aug-07 7:16 
QuestionView binary equivalent to data variable Pin
Cory Kimble2-Aug-07 3:46
Cory Kimble2-Aug-07 3:46 
AnswerRe: View binary equivalent to data variable Pin
Luc Pattyn2-Aug-07 7:28
sitebuilderLuc Pattyn2-Aug-07 7:28 
Hi Cory,

still trying to tame the CRC beast?

for bit-oriented stuff I usually use hexadecimal format; it shows four bits
at a time, keeping the strings a lot shorter.
For some basic types the ToString() method accepts an optional format parameter,
so int.ToString("X8") generated an 8-digit hex string (forcing leading zeroes).
AFAIK byte type does not support this.

Maybe there also is a code to order bit formatting, but I would never use
it, the binary strings get too long.
if a really would like to have a binary format I would write my own converter,
that inserts a comma after every 4 bits

this is an attempt in C#, you would have to create your own in VB;
it works from right to left, because that's how I like to do this
(the lowest bit has value 1, doing it this way I never need the highest bit).

public static string ToBinary(uint val) {
    string s="";
    for (int i=8; i>0; i--) {        // 8 nibbles in a 32-bit uint
        for (int j=4; j>0; j--) {    // 4 bits per nibble
            string c="0";
            if ((val & 1)!=0) c="1";
            s=c+s;                   // prefix a binary digit
            val=val>>1;              // shift right by one position
        }
        if (i!=1) s=","+s;           // prefix a separator per nibble
    }
    return s;
}


Smile | :)




GeneralRe: View binary equivalent to data variable Pin
Cory Kimble2-Aug-07 9:15
Cory Kimble2-Aug-07 9:15 
Questionshortcuts Pin
Tom Deketelaere2-Aug-07 3:19
professionalTom Deketelaere2-Aug-07 3:19 
AnswerRe: shortcuts Pin
Luc Pattyn2-Aug-07 7:34
sitebuilderLuc Pattyn2-Aug-07 7:34 
GeneralRe: shortcuts Pin
Tom Deketelaere2-Aug-07 8:01
professionalTom Deketelaere2-Aug-07 8:01 
GeneralRe: shortcuts Pin
Luc Pattyn2-Aug-07 8:07
sitebuilderLuc Pattyn2-Aug-07 8:07 
GeneralRe: shortcuts Pin
Tom Deketelaere2-Aug-07 9:53
professionalTom Deketelaere2-Aug-07 9:53 
Questioncount of rows in datarow Pin
SamRST2-Aug-07 3:17
SamRST2-Aug-07 3:17 
AnswerRe: count of rows in datarow Pin
ctlqt122-Aug-07 3:36
ctlqt122-Aug-07 3:36 
GeneralRe: count of rows in datarow Pin
SamRST2-Aug-07 3:52
SamRST2-Aug-07 3:52 
GeneralRe: count of rows in datarow Pin
ctlqt122-Aug-07 4:04
ctlqt122-Aug-07 4:04 
Questionsend data from listbox to an array variable Pin
sixecho2-Aug-07 2:28
sixecho2-Aug-07 2:28 
AnswerRe: send data from listbox to an array variable Pin
Tom Deketelaere2-Aug-07 2:44
professionalTom Deketelaere2-Aug-07 2:44 
QuestionCalculating employee age Pin
x-Taka-x2-Aug-07 1:43
x-Taka-x2-Aug-07 1:43 
AnswerRe: Calculating employee age Pin
DA_Loring2-Aug-07 1:50
DA_Loring2-Aug-07 1:50 
AnswerRe: Calculating employee age Pin
_Damian S_2-Aug-07 2:03
professional_Damian S_2-Aug-07 2:03 
AnswerRe: Calculating employee age Pin
Tom Deketelaere2-Aug-07 2:06
professionalTom Deketelaere2-Aug-07 2:06 
GeneralRe: Calculating employee age Pin
Luc Pattyn2-Aug-07 7:38
sitebuilderLuc Pattyn2-Aug-07 7:38 

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.