Vb 2003 Framework 1.1 [英] Vb 2003 Framework 1.1

查看:85
本文介绍了Vb 2003 Framework 1.1的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Public Value As Integer = 4096

Private Sub Button1_Click(ByVal sender As System.Object,ByVal e

As System.EventArgs)处理Button1.Click

Dim bytes As Byte()= BitConverter.GetBytes(Value)

End Sub


此代码将创建一个4字节的aan数组{lenght = 4}

(0)= 0

(1)= 16

我怎么知道把这个转换成十六进制值,但仍然保持(2)

单独的字节

解决方案

9月13日星期四2007 18:44:30 -0700,cmdolcet69

< co ************ @ hotmail.comwrote:


> Public Value As Integer = 4096

Private Sub Button1_Click(ByVal sender As System.Object,ByVal e
As System.EventArgs)处理Button1.Click

Dim bytes As Byte()= BitConverter.GetBytes(Value)

End Sub

此代码将创建一个4字节的aan数组{lenght = 4} (0)= 0
(1)= 16

如何知道将其转换为十六进制值但仍然保持(2)
单独的字节



将内容转换为十六进制? Hex没有任何意义,除非显示

值或输入值。


你想做什么?


" cmdolcet69" < co ************ @ hotmail.comschrieb


Public Value As Integer = 4096

Private Sub Button1_Click(ByVal sender As System.Object,ByVal e

As System.EventArgs)处理Button1.Click

Dim bytes As Byte()= BitConverter.GetBytes(Value)

结束子


此代码将创建一个4字节的数组{lenght = 4}

(0)= 0

(1)= 16

我怎么知道将其转换为十六进制值但仍然保持(2)

单独的字节



这种方式?


Dim bytes As Byte()

Dim s As字符串


bytes = BitConverter.GetBytes(4096)

使用新的System.Text.StringBuilder

For i As Integer = bytes.Length - 1 To 0 Step -1

.Append(bytes(i).ToString(" X2"))

Next

s = .ToString

结束


MsgBox

Armin


9月14日上午6:46,Armin Zingler < az.nos ... @ freenet.dewrote:


" cmdolcet69" < colin_dolce ... @ hotmail.comschrieb


Public Value As Integer = 4096

Private Sub Button1_Click(ByVal sender As System.Object ,ByVal e

As System.EventArgs)处理Button1.Click

Dim bytes As Byte()= BitConverter.GetBytes(Value)

End Sub


此代码将创建一个4字节的aan数组{lenght = 4}

(0)= 0

(1)= 16


我怎么知道将其转换为十六进制值但仍然保持(2)

单独字节



这种方式?


Dim bytes As Byte()

Dim s As String


bytes = BitConverter.GetBytes(4096)


使用New System.Text.StringBuilder

For i As Integer = bytes.Length - 1 To 0 Step -1

.Append(b ytes(i).ToString(" X2"))

下一页

s = .ToString

结束

MsgBox


Armin



我想我将使用以下(2)函数来帮助我

Public Sub HiByte(ByVal wParam As Integer)

Dim Hibyte As Integer

Hibyte = wParam \& H100 And& ; HFF&

End Sub


公共函数LoByte(ByVal wParam As Integer)

LoByte = wParam And& HFF&

结束函数

当我有一个

1271值的arraylist时,如何将值传递给这些函数?

我应该做什么过程?


Public Value As Integer = 4096
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button1.Click
Dim bytes As Byte() = BitConverter.GetBytes(Value)
End Sub

This code will create a aan array of 4 bytes {lenght=4}
(0) = 0
(1) =16

How can i know convert this into a Hex value but still keep the (2)
seperate bytes

解决方案

On Thu, 13 Sep 2007 18:44:30 -0700, cmdolcet69
<co************@hotmail.comwrote:

>Public Value As Integer = 4096
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button1.Click
Dim bytes As Byte() = BitConverter.GetBytes(Value)
End Sub

This code will create a aan array of 4 bytes {lenght=4}
(0) = 0
(1) =16

How can i know convert this into a Hex value but still keep the (2)
seperate bytes

Convert what to hex? Hex has no meaning except when displaying a
value or typing in a value.

What do you want to do?


"cmdolcet69" <co************@hotmail.comschrieb

Public Value As Integer = 4096
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button1.Click
Dim bytes As Byte() = BitConverter.GetBytes(Value)
End Sub

This code will create a aan array of 4 bytes {lenght=4}
(0) = 0
(1) =16

How can i know convert this into a Hex value but still keep the (2)
seperate bytes


This way?

Dim bytes As Byte()
Dim s As String

bytes = BitConverter.GetBytes(4096)

With New System.Text.StringBuilder
For i As Integer = bytes.Length - 1 To 0 Step -1
.Append(bytes(i).ToString("X2"))
Next
s = .ToString
End With

MsgBox(s)
Armin


On Sep 14, 6:46 am, "Armin Zingler" <az.nos...@freenet.dewrote:

"cmdolcet69" <colin_dolce...@hotmail.comschrieb

Public Value As Integer = 4096
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button1.Click
Dim bytes As Byte() = BitConverter.GetBytes(Value)
End Sub

This code will create a aan array of 4 bytes {lenght=4}
(0) = 0
(1) =16

How can i know convert this into a Hex value but still keep the (2)
seperate bytes


This way?

Dim bytes As Byte()
Dim s As String

bytes = BitConverter.GetBytes(4096)

With New System.Text.StringBuilder
For i As Integer = bytes.Length - 1 To 0 Step -1
.Append(bytes(i).ToString("X2"))
Next
s = .ToString
End With

MsgBox(s)

Armin

I think i will use the following (2) function to help me out
Public Sub HiByte(ByVal wParam As Integer)
Dim Hibyte As Integer
Hibyte = wParam \ &H100 And &HFF&
End Sub

Public Function LoByte(ByVal wParam As Integer)
LoByte = wParam And &HFF&
End Function
How can i pass values into these function when i have an arraylist of
1271 values?
what process should i do?


这篇关于Vb 2003 Framework 1.1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆