????? ????? ????? ????? ???? ??? ??? ???? ????

?????? ????????? ?????? ?????????
???? ???????: 161304 - ??? ???????? ???? ????? ????? ??? ???????.
????? ???? | ?? ????

?? ??? ??????

??????

????? Microsoft Visual Basic ???? Hex$() ?????? ??? ??? ????? ?? ??????? ????? ????. ??? ???? ???? ?? ?? ???? ????? ????? ??????? ??????. ?????? ??? ??????? ????? ??????? ?????? Val() ?????? ????? ???? ??????? "??? ???? ????" ???????? ??? ?????? ?????.

??????? ????

???? ??????? ?????? Val() ????? ????? ?? ??????? ??????? ??? ???. ???? ?? ?????? ??? ????? ?? ??????? ???? ????? ???? ??? ???? ????? ?????? "& H" ??? ????? ??????? ???? ?????? ?????? Val() ????? ?????? ??????? ?? ????? ???????.

??? ???? ??????:
  A = Val("1234")    ' performs decimal conversion

  A = Val("7FFF")    ' results in 7 - the F's are ignored

  A = Val("&H7FFF")  ' performs hexadecimal conversion
				

??? ???? ??????

??? ??? ?????? ????? ??????? ??? ????? ??? ???? ???? ???? ????? ???? ???? ??????? ?? ?????? 80000000 ??? FFFFFFFF ??? ??????? ??? ??? ??????? ??????? ???. ??? ???? ??? ????? ???????? ???? ? ??????? ?? ?????? ?? 8000 ??? FFFF ???? ????? ??????? ??? ?????.

???? ??? ???? ??? ????? ??????? ?? ????? ??? ?? ????? ????? ????? ????? 2 ????. ??? ????? ???? ??????? ??? ???? ?? ????? ??? ??? ???? ???? (?? 4 ????) ? ??? ??? ?????.

Visual Basic 4.0/Access 95 ? ???

?????? ????? ???? "&" ??? ????? ?????? ????? ????? ???? ??? ?????? ?????. ?????? ??????? ?????? ??????? ???? ????:
      Function HexToLong(ByVal sHex As String) As Long
        HexToLong = Val("&H" & sHex & "&")
      End Function
				

Visual Basic 3.0/Access 2.0 ? ???

?? ???? ??????? ?? ???? ????? ?? Microsoft Visual Basic 3.0 ?? ????? ???? ?? ????? ?? ????? ???? ?? ????? 80000000. ?????? ?????? ??? "???????" ?? ??? ??????? ?????? ??? ???? ?? ?????????.

???? ?? ???? ??? ??????? ?? ??????? ???? ??? ?? ???? "?????? ??? ????" ? ???? ?????? ?????? ????? ????? ????? ????? "???" ???????? ??? ???? ???? ????? ??????? "&" ????:
      Function HexToLong(ByVal sHex As String) As Long
        On Error Resume Next
        HexToLong = Val("&H" & sHex & "&")
        If Err Then
          On Error Goto 0
          HexToLong = Val("&H" & sHex)
        End If
      End Function
				
??? ??????? ?? ????? ?? ?????? ??? ???:
      A = HexToLong("8000")
				

?????

????? ??????? Microsoft Visual Basic: ???? ???

??????? Microsoft Visual Basic 4.0 ????????: "????? ??? ????? ????"

????? ?? ?????????? ?????? ?????? ??????? ??????? ?? "????? ??????? ?? Microsoft:
95431??? ??? ????? ????? FIX: ??? ?????? ???? VAL ??? ???? ?????

???????

???? ???????: 161304 - ????? ??? ??????: 25/????? ??????/1425 - ??????: 3.2
????? ???
  • Microsoft Visual Basic 6.0 Learning Edition
  • Microsoft Visual Basic 6.0 Professional Edition
  • Microsoft Visual Basic Enterprise Edition for Windows 6.0
  • Microsoft Visual Basic Control Creation Edition
  • Microsoft Visual Basic 5.0 Learning Edition
  • Microsoft Visual Basic 5.0 Professional Edition
  • Microsoft Visual Basic 5.0 Enterprise Edition
  • Microsoft Visual Basic 4.0 Standard Edition
  • Microsoft Visual Basic 4.0 Professional Edition
  • Microsoft Visual Basic 4.0 Enterprise Edition
  • Microsoft Visual Basic 2.0 Standard Edition
  • Microsoft Visual Basic 3.0 Professional Edition
  • Microsoft Visual Basic 2.0 Professional Edition
  • Microsoft Visual Basic 3.0 Professional Edition
????? ??????: 
kbmt kbhowto KB161304 KbMtar
????? ????
???: ??? ????? ??? ?????? ???????? ?????? ????? ???? ????? ?????????? ????? ?? ????????? ?????? ????. ???? ???? ?????????? ???? ?? ???????? ???????? ?????? ????????? ????? ????????? ???????? ????? ???????? ?????? ?? ?????? ??? ?? ???????? ???????? ?? ????? ??????? ?????? ??? ??????? ?????? ??. ?????? ?? ???? ??? ??????? ???????? ????? ?? ???? ????? ?????? ??? ????? ??? ????? ??????? ?? ????? ?? ?????? ??? ??? ??????? ??????? ?? ????? ????? ????? ????? ?????. ?? ????? ???? ?????????? ??????? ??? ????? ?? ??????? ?? ????? ?????? ?? ??? ????? ?? ????? ??????? ?? ???????? ?? ??? ???????. ???? ???? ?????????? ???????? ??? ????? ?????? ??????? ??????
???? ??? ????? ??????? ?????? ??????????161304

????? ???????

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com