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

Visual Basic

 
GeneralHelp needed on Undocumented Shell "IDM_SHVIEW_NEWFOLDER". Any experts out here. Pin
Villly4-Apr-03 0:25
Villly4-Apr-03 0:25 
Generaldos commands Pin
r i s h a b h s3-Apr-03 17:22
r i s h a b h s3-Apr-03 17:22 
GeneralRe: dos commands Pin
Tim McCurdy4-Apr-03 1:35
Tim McCurdy4-Apr-03 1:35 
GeneralRe: dos commands Pin
OMalleyW19-Apr-03 7:32
OMalleyW19-Apr-03 7:32 
GeneralVB Endian Conversion Pin
mikasa3-Apr-03 10:40
mikasa3-Apr-03 10:40 
GeneralRe: VB Endian Conversion Pin
Oscar Martin3-Apr-03 21:02
Oscar Martin3-Apr-03 21:02 
GeneralRe: VB Endian Conversion Pin
J. Dunlap6-Apr-03 7:55
J. Dunlap6-Apr-03 7:55 
GeneralRe: VB Endian Conversion Pin
mikasa6-Apr-03 8:07
mikasa6-Apr-03 8:07 
Thanks! Good functions!

Basically I wanted to know how to "Left / Right Shift" a number but the above functions will also come in handy. I will Post here how to do Shifts.

To Right Shift, simply Divide by (2 ^ [No of Bits]). For example, to Right Shift 16Bits:
Public Function ShiftRight(ByVal Value as Long) As Long
     Return (Value / (2 ^ 16))
End Function


To Left Shift, simply do the opposite and Multiply by (2 ^ [No of Bits]).
Public Function ShiftLeft(ByVal Value as Long) As Long
     Return (Value * (2 ^ 16))
End Function


The good news is that in VB.NET 2003, the Left / Right Shift operators will become standard. So now the above Functions would be simplified like this:
Public Function ShiftLeft(ByVal Value as Long) As Long
     Return (Value << 16)
End Function

Of course, you really wouldn't need a Function for it anymore in .NET 2003! Poke tongue | ;-P
GeneralRe: VB Endian Conversion Pin
J. Dunlap6-Apr-03 8:40
J. Dunlap6-Apr-03 8:40 
QuestionLazy Evaluation ternary op? Pin
eidylon3-Apr-03 9:11
eidylon3-Apr-03 9:11 
AnswerRe: Lazy Evaluation ternary op? Pin
Daniel Turini3-Apr-03 9:25
Daniel Turini3-Apr-03 9:25 
GeneralRe: Lazy Evaluation ternary op? Pin
mikasa3-Apr-03 10:44
mikasa3-Apr-03 10:44 
GeneralRe: Lazy Evaluation ternary op? Pin
Daniel Turini3-Apr-03 10:48
Daniel Turini3-Apr-03 10:48 
GeneralRe: Lazy Evaluation ternary op? Pin
mikasa3-Apr-03 10:57
mikasa3-Apr-03 10:57 
GeneralPrintPreview Question 2 Pin
Fleischen3-Apr-03 5:52
Fleischen3-Apr-03 5:52 
GeneralAccess Visual Basic References Pin
Kogorman3-Apr-03 5:17
Kogorman3-Apr-03 5:17 
GeneralRe: Access Visual Basic References Pin
mikasa3-Apr-03 10:50
mikasa3-Apr-03 10:50 
GeneralVB 2 VB.NET Pin
Oscar Martin3-Apr-03 2:27
Oscar Martin3-Apr-03 2:27 
GeneralRe: VB 2 VB.NET Pin
mikasa3-Apr-03 10:59
mikasa3-Apr-03 10:59 
GeneralRe: VB 2 VB.NET Pin
mikasa3-Apr-03 11:00
mikasa3-Apr-03 11:00 
GeneralRe: VB 2 VB.NET Pin
Oscar Martin3-Apr-03 11:07
Oscar Martin3-Apr-03 11:07 
GeneralUse DLL in VBasic Pin
Martin_Viet3-Apr-03 1:44
Martin_Viet3-Apr-03 1:44 
GeneralRe: Use DLL in VBasic Pin
Villly3-Apr-03 1:52
Villly3-Apr-03 1:52 
GeneralRe: Use DLL in VBasic Pin
Martin_Viet3-Apr-03 2:26
Martin_Viet3-Apr-03 2:26 
GeneralRe: Use DLL in VBasic Pin
Oscar Martin3-Apr-03 2:37
Oscar Martin3-Apr-03 2:37 

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.