Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




Convert Hex To ASCII, Code Is Attached


Arnout, I don't see CLng() returns a Decimal value from Hex. I tried as follows but a mismatch error happens. It only takes values 0 to 9

Option Explicit

Dim SMSOctetOutput

Dim StrHextoDecimal, StrDecimalToAscii

Dim strText


Private Sub Command1_Click()


SMSOutput = Text1.Text


StrHextoDecimal = CLng(SMSOctetOutput)

StrDecimalToAscii = Str(StrHextoDecimal)

Text2.Text = StrDecimalToAscii


End Sub


My intention is to convert a Hex value to ASCII




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
How To Convert Ascii To Hex Code?
How to convert Hex code to ASCII code and convert
ASCII code to HEX code by VB code?
how to analyse the hex code bit by bit?

Convert Char To ASCII Code
Helo! Any idea ya? Or i should convert one by one?

Convert ASCII Code To Character
I am able to get the ASCII code for a character by using the Asc function, but how do I go about getting the character for that ASCII code? If there a command that is pretty much the opposite of Asc?

-Matt.
<('.')>
"Unthinking respect for authority is the greatest enemy of the Truth."

Convert Character To Ascii Code?
hi,

Is there anybody help me on this.
How can i convert Character A or B or C and other, to ASCII code

Thank you very much
Regards
Ooi

How To Convert Binary Code To Ascii Code
Does anyone know how to convert binary file to text file

Comport Read Code(how I Wil Convert Ascii To Decimal)
Respected Sir

I am facing problem to read data from comport I have used MSCOMM but i am getting data in ASCII code But i want it in decimal format How i will get it ?

Your help (sample code) and guidance is greately appreciated!

Regards

Bama

Convert Ascii Constant To Ascii Value With Program
How would I go about doin the following? If a string contains "vbKeyF1", how would i get vbKeyF1's ASCII value equivalent (ie: 112) to be written in another string?



Edited by - Marce22 on 10/10/2003 7:04:38 PM

Convert .wav To ASCII
Hi,
I would like to convert a file in wav format into txt format, so to obtain a vector of numbers to create a graphic, with a program, like excel, that is not Matlab.
Exactly I've an algorithm in Visual Basic that analyses a vector of points (graphic) and then gives me in output a series of parameters.
In matlab this is easy, because it recognizes wav files but if I would like to do the same thing in Ms Access, I've to convert before, the wav file in txt file so that my algorithm in Visual Basic can analyse it.
Anyone knows if there exist some algorithm or code that convert wav files in ASCII text files?
Thanks
Bernd

Convert Ascii To Hex
ok i know to convert hex to ascii is simply Val("&h" & hexvalue), but how do you convert ascii to hex? using somthing simple like that (if existant), maybe i just need sleep to realize how to do it but right now i cant think of how to do it. help!!!

Convert *.Wav To ASCII
Is there a way to convert a *.wav file to a ASCII text that contains the sound in a numerical way. I also want to know the otherway around (converting ASCII to *.wav)
I f there's anybody who has a idee please let me know

Thanks

Christian

Convert CSV To ASCII
I am trying to take a CSV file and convert it to ASCII. Any suggestions?

Please Help...Code Attached
I have attached a project that I am trying to de-bug. I didn't write this program and to be honest it is beyond my abilities to code something like this, however I have "reverse engineered" it and understand the concept. The program looks at a table in an Access2K DB and pulls non-sequntial numbers out. It then places these into a temp table that is created programatically (Missing_Pairs_Report). This table is then supposed to feed a report form with the numbers from the newly created table.

The table is being created successfully, however when the .SHOW method is called for the report I am told that the table Missing_Pairs_Report cannot be found. If I open the DB the table is there and spelled correctly. I am assuming that the connection to the DB is being lost or broken in code somewhere, but I can't find out where.

I have commented the code where the error seems to take place.
frmMissingPairs(Code).timer

There is also a comment in the module regarding a g_conConnection.Close that I don't understand

I am using the KINTA button as my test.

Any feed back will be greatly appriciated.

Thank you in advance for your assistance

Bart

Code Attached...help Anyone?
Here is the code

Public Sub ExecCmd(cmdline$)
Dim proc As PROCESS_INFORMATION
Dim start As STARTUPINFO
Dim ReturnValue As Integer

' Initialize the STARTUPINFO structure:
start.cb = Len(start)
start.wShowWindow = 4

' Start the shelled application:
ReturnValue = CreateProcessA(0&, cmdline$, 0&, 0&, 1&, _
NORMAL_PRIORITY_CLASS, 0&, 0&, start, proc)

' Wait for the shelled application to finish:
Do
ReturnValue = WaitForSingleObject(proc.hProcess, 0)
DoEvents
Loop Until ReturnValue <> 258

ReturnValue = CloseHandle(proc.hProcess)
End Sub



My problem is the "START.WSHOWWINDOW" line.

No matter what value I set it to (see msdn lib page 'WshShell.Run') it DOESNT affect the outcome.

I'm trying to exec a command that when kicked off is invisible to the user...all they'll see is a form with an increasing progress bar.

But whenever I use the above code. It kicks off the app okay..and waits until its finished before continuing BUT it runs in in a visible window...which I don't want.

Can someone please point out where I'm going wrong?

Thanks

X

How To Convert Raw Binary Into Ascii Hex
i need to know how to convert raw binary into ascii hex, i searched around but couldnt find anything on it. anyone know?

Convert Char To ASCII
I was wondering if there was a way to check that the first character in a string is a letter vs. a number.
Example: "123M" vs. "M123"
I was thinking of taking the first charcter, changing it to its ASCII value and comparing it with ASCII value of letters vs. numbers to figure it out that way..
Is there some feature in VB 6.0 that i can use to see whether the character is a letter or number? (Zero is included in the numbers.)

Thanks!!

Convert 5 Lines Of Hex To ASCII
OK, I have been reading up on ASCII but still can not get this right.
My app reads from a device on com port that sends 5 lines of ASCII code
Example

Quote:




49 02 01 00 00 00 31
49 02 02 47 36 4B 44
49 02 03 35 34 59 58
49 02 04 32 55 31 33
49 02 05 34 38 33 32

>





Which I need decoded to

Quote:




1g6kd54yx2u134832






The documentation I have found says this

Quote:




Returns 5 lines, A is line ordering flag, B-E ASCII coded VIN Digits





So I guess the 49 02 of each line is to be ignored?
and the rest needs to be converted?

Below is a screen shot of the message I received today

Convert A Word To Ascii
Hi peeps i was wondering if anyone can help me with this problem.

i am making a program to convert words to ascii and then display the ascii in a textbox

i can make it convert 1 letter of the word only. is there anyway to make it convert the whole word into ascii

thx

Convert Characters To Ascii No.
i have an array called chars(). when my program runs, 1 character is stored in each variable of the array eg. chars (0) stores 1 character, chars(1) stores 1 character and so on. i heard that there are 256 ascii characters, is there a simple and fast way to convert each character into its ascii number, say chars(0) had the letter u stored in it and the number of u was 132 then chars(0) would be changed to 132
thanks

How To Convert It To ASCII File
I download a log file from SUN server,if i open it with notpad,it looks like: ???? % @#w./.....; it's a binary file , my custumer can't read it unless it is a ASCII file.so i want to know how to convert it to ASCII file readable with .TXT or .XLS


maybe I should use following :
open "d:log001" For Binary As 1
...
...
Get .....
...
Close 1
Open "d:
esult.txt" For Random As 1
.....
Put ...

but it's difficult to know the rule of binary file,
any advice is very useful to me!thanks

Convert Ascii To Binary
Hi all.
I have a bit of a problem. I am getting a value from an OCX and it is in ascii. How can I convert the string so that it shows the binary representation of these values?

I.E. I get the value "Hi" "H" is 072 ascii and "i" is 105 ascii.

Then turning and converting those values to binary so that I get

"010010001101001" the binary equivilant.

Any help would be GREATLY appreciated

Convert String To ASCII
How would I go about converting a string into and ASCII string. Just for an example, say I had the string apple (the ascii characters arent right)

Apple
a=4 p=7 p=7 l=2 e=1
Then the ascii string would be 47721

Anyone?

Thanks

Convert KeyCode To Ascii
How can I convert KeyCode and Shift to ascii under the KeyDown event?

I understand that not all the keys even convert, but I would like to be able to get lower and upper case letters, numbers, backspace, and enter.

I cannot use the keypress event.

Thanks!

Convert Binary To ASCII
I'd like to convert binary code into ASCII. Does anyone have any code that could pull that off?? Thanx in advance!

How To Convert Ascii Into Binary
Hi,
I want to know that how we can convert our ascii text into binary one.

Convert Ascii To Text
i can convert text to ascii using asc(), but how do i reverse it?

Convert Hex? Decimal? Ascii??
**



Edited by - Marce22 on 6/1/2005 11:23:36 AM

Convert Ascii String To Hex
Hi. I am having a problem finding the syntax to convert a 2 charactor String to a Hex value. The String will always be 2 charactors in length and will have ascii values from 00 to FF. Once in Hex, I will be using the value to set the .Height value of a Shape (Rectangle) which will represent the signal strength of a radio receiver. The receiver reports the signal level as a 2 charactor String, 00 to FF. I have tried a few different things and var types but keep getting a Type Mismatch.

Dim Signal_Level_Rec_A As Variant

Private Sub RecAComm_OnComm()
    Select Case RecAComm.CommEvent
        ' Errors
      Case comEventBreak ' A Break was received.
      Case comEventFrame ' Framing Error
      Case comEventOverrun ' Data Lost.
      Case comEventRxOver ' Receive buffer overflow.
      Case comEventRxParity ' Parity Error.
      Case comEventTxFull ' Transmit buffer full.
      Case comEventDCB ' Unexpected error retrieving DCB]

   ' Events
      'Case comEvCD ' Change in the CD line.
      'Case comEvCTS ' Change in the CTS line.
      'Case comEvDSR ' Change in the DSR line.
      'Case comEvRing ' Change in the Ring Indicator.
      Case comEvReceive ' Received RThreshold # of chars.
        Do
            DoEvents
            Comm_Recd_Rec_A = Comm_Recd_Rec_A & RecAComm.Input
        Loop Until InStr(Comm_Recd_Rec_A, vbCrLf) 'wait to receive <CR><LF> from receiver
        'Loop Until Len(Comm_Recd_Rec_A) = 4
        temp = Len(Comm_Recd_Rec_A)
        Comm_Recd_Rec_A = Right(Comm_Recd_Rec_A, temp - 1) 'strip off leading char.
        Comm_Recd_Rec_A = Left(Comm_Recd_Rec_A, temp - 3) 'strip off trailing CF,LF
         
        Rec_A_Meter_Comm_Rec.Caption = Comm_Recd_Rec_A
        If Left(Comm_Recd_Rec_A, 2) = "G0" Then 'status data follows
            DoEvents
        ElseIf Left(Comm_Recd_Rec_A, 2) = "G2" Then 'comm protovol version data follows
            DoEvents
        ElseIf Left(Comm_Recd_Rec_A, 2) = "GE" Then 'destination country data follows
            DoEvents
        ElseIf Left(Comm_Recd_Rec_A, 2) = "H9" Then 'scan status data follows
            DoEvents
        ElseIf Left(Comm_Recd_Rec_A, 2) = "I1" Then 'S-meter data follows 'This Case for Signal Level
            Signal_Level_Rec_A = Right(Comm_Recd_Rec_A, 2)
            Call Rec_A_Signal_Meter
        ElseIf Left(Comm_Recd_Rec_A, 2) = "I2" Then 'Center meter data follows
            DoEvents
        ElseIf Left(Comm_Recd_Rec_A, 2) = "I3" Then 'DTMF data follows
            DoEvents
        ElseIf Left(Comm_Recd_Rec_A, 2) = "NE" Then 'bandscope buffer data follows
            DoEvents
        End If '* add busy status I0/
             
      'Case comEvSend 'There are SThreshold number of characters in the transmit buffer
                      
      'Case comEvEOF ' An EOF charater was found in the input stream
                      
    End Select
    Comm_Recd_Rec_A = "" 'clear buffer
End Sub

Private Sub Rec_A_Signal_Meter() 'bargraph for Signal strength
    Dim temp As Byte
    temp = Signal_Level_Rec_A 'Trouble is here
    Rec_A_Meter_Signal_Level_Shape.Height = temp '* 3 'Signal_Level_Rec_A
    Rec_A_Meter_Signal_Level_Shape.Top = 1380 - Rec_A_Meter_Signal_Level_Shape.Height
End Sub '^ this number sets bottom position of bargraph


 

Convert Binary To Ascii
I am not familiar with binary file access, so forgive me if this is obvious:

When opening and reading a binary file, how do you convert it to Ascii?

Code For The Attached Project:
HI,

Dear Friends, Could anyone of you write code for my attached project plz.

What I need all is:

1. Balance Amount should be updated whenever a new cheque amount entered

2. Search button should be able to search the dates either it is a invoice date or a cheque date and return the search result in a MSFlexGrid form.

Please modify the attached project and send it back...

Though it is really a hard job but as I am new to VB I have to seek some help from friends..

Millions of thanks for any help in this regard....

E-mail Help, Code Attached
This code can send an e-mail with attachment, It works GREAT with Outlook Express. However I do NOT want it to open the address book when the 'SEND' button is pressed and it currently does. I want to send it to a specfic address. Can anyone help me correct this.

I would also like someone to try this code with Microsoft Outlook.

Thanks

**************************************

Option Explicit
Private bNewSession As Boolean ' Flag to signal logon status.

Private Sub Command1_Click()
Me.CommonDialog1.ShowOpen
Label3.Caption = Me.CommonDialog1.FileName
End Sub

Private Sub Command2_Click()
Dim strMessage As String
Dim strFilePath As String

On Error GoTo btnClickErr
strFilePath = "C:Documents and SettingsMichaelDesktop raker3Mileage Tracker 1dbMileage.mdb"
With mapMess
.AddressEditFieldCount = 2
.Compose
.MsgNoteText = Text3.Text
If Not strFilePath = "" Then
.AttachmentPosition = Len(.MsgNoteText) - 1
.AttachmentPathName = strFilePath
End If
.MsgSubject = Text2.Text
.Show False
.ResolveName
.AddressResolveUI = True
If chkMsgRec.Value = vbChecked Then
.MsgReceiptRequested = True
End If
.Send False
End With
Exit Sub

btnClickErr:
If Err.Number = mapUserAbort Then
Resume Next
Else
MsgBox Err.Number & ": " & Err.Description
End If

End Sub
Private Function LogOn() As Boolean
' If a session is already started,
' exit sub.
If mapSess.NewSession Then
Debug.Print "Session already established"
Exit Function
End If

On Error GoTo errLogInFail
With mapSess
' Set DownLoadMail to False to prevent immediate download.
.DownLoadMail = False
.LogonUI = True ' Use the underlying email system's logon UI.
.SignOn ' Signon method.
' If successful, return True
LogOn = True
' Set NewSession to True and set0
' variable flag to true
.NewSession = True
bNewSession = .NewSession
mapMess.SessionID = .SessionID ' You must set this before continuing.
End With

Exit Function

errLogInFail:
Debug.Print Err.Number, Err.Description
If Err.Number = 32003 Then
MsgBox "Canceled Login"
LogOn = False
End If
Exit Function
End Function


Private Sub Form_Load()
LogOn
End Sub

Private Sub Text2_Change()

End Sub

How To Convert Extended Ascii To Hexadecimal?
Dear Friends

I am using Visual Basic 6.0. I have to convert Extended Ascii(Characters having ascii values > 127) into hexadecimal while interfacing an Electronic equipment. Please guide me on this.

Thanks in advance,
dpr

Convert Text File To Ascii
Does anyone have some code out there that will convert a text file to an ascii file????

Convert ASCII To Unicode And Back??
This may be much simpler than I think, but I haven't found an answer yet...

I need to convert ASCII characters to Unicode and back.

I'm looking to get the actual code that I can use, say in a web app. i.e. "u00e9" (I understand I'll have to add the 'u' myself...)

So, how can I input "A" and get the correct unicode equivalent?

Thanks.

Convert Ascii To Alpha***RESOLVED***
i have the following code

VB Code:
For X1 = 1 To 9            FoundPhoto = CheckForPhotos("D:DC290_0" & X1)                    If FoundPhoto = 1 Then Exit DoNext X1


which checks the first ten folders on the d drive.
What i want to do is check all the way up to the 'Z' drive in the same loop, but i don't know how to increment the alphanumeric value in the second loop.
I am thinking i can convert it to ascii, increment it and convert back but am unlclear on the process.

Psuedocode as follows

loop through drives a to z
loop through folders 1 to ten until photo found
end loop
end loop

thanks for any help you can give

Convert Characters Into Their ASCII Number..
What is the command to turn Characters into their ascii value?

I know chr$(#) turns the number into a character..

I can't remember how to reverse it though.

Thanks,
Kedaeus

Convert Clipboard RTF Data To Ascii
I'm using the WebBrowser Control and MSHTML to create a WYSIWYG web text tool.
Here's the problem. If the user copies and pastes from something like MSWord, it brings in all the XML crap along with the text. All I want is the basic text.
Is there a way to only allow ASCII text in the clipboard...no RTF or XML or anything else?

thanx

Convert Ascii To Binary( 0[zeros] And 1[ones])
Most of you should know what binary is! I don't know how to do this:
convert ASCII characters to binary any help?
THANKS!

------------------
DiGiTaIErRoR

How I Can Convert UTF8 String To ASCII
I read string from file. This string in UTF8 format. I need ASCII symbol. Function strconv() convertino only 16 bit unicod. For .NET i can use system.text class, but in excel VBA i don't use this class. Help, please.

Mapping Bug In My New RPG (Code, And Source Attached)
Hello, I am seeming to have some problems recently with a scrollable map system. It is pretty simple, and I'm not sure what's wrong. Download the source to try and see what's wrong in frmMain under "MAP CODE START". Mapping code is also done in Module1. It's pretty short, and simple, it should (as I see it) draw different tiles as you move, but how it is now, everything is bunched up in the corner of the screen. I'll post the code here aswell if it helps.

FRMMAIN


Code:
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
'////////////////////////MAP CODE START///////////////////
'This is the most important code
'What will happen if you press a special key?
Select Case KeyCode
Case vbKeyUp
'Up
PositionMap = Mid(Map(CharY + 2), CharX + 3, 1)
CharFacing = 1
Label1 = CharY
Call CharacterMovements
If PositionMap = "1" _
Or PositionMap = "2" _
Or PositionMap = "3" _
Or PositionMap = "4" _
Or PositionMap = "Q" _
Or PositionMap = "W" _
Or PositionMap = "E" _
Or PositionMap = "R" _
Or PositionMap = "A" _
Or PositionMap = "S" _
Or PositionMap = "D" _
Or PositionMap = "F" _
Or PositionMap = "Z" _
Or PositionMap = "X" _
Or PositionMap = "C" _
Or PositionMap = "V" _
Then
CharY = CharY - 1
DrawIt
End If
Case vbKeyDown
'Down
PositionMap = Mid(Map(CharY + 4), CharX + 3, 1)
CharFacing = 2
Label1 = CharY
Call CharacterMovements
If PositionMap = "1" _
Or PositionMap = "2" _
Or PositionMap = "3" _
Or PositionMap = "4" _
Or PositionMap = "Q" _
Or PositionMap = "W" _
Or PositionMap = "E" _
Or PositionMap = "R" _
Or PositionMap = "A" _
Or PositionMap = "S" _
Or PositionMap = "D" _
Or PositionMap = "F" _
Or PositionMap = "Z" _
Or PositionMap = "X" _
Or PositionMap = "C" _
Or PositionMap = "V" _
Then
CharY = CharY + 1
DrawIt
End If
Case vbKeyRight
'Right
PositionMap = Mid(Map(CharY + 3), CharX + 4, 1)
CharFacing = 3
Label2 = CharX
Call CharacterMovements
If PositionMap = "1" _
Or PositionMap = "2" _
Or PositionMap = "3" _
Or PositionMap = "4" _
Or PositionMap = "Q" _
Or PositionMap = "W" _
Or PositionMap = "E" _
Or PositionMap = "R" _
Or PositionMap = "A" _
Or PositionMap = "S" _
Or PositionMap = "D" _
Or PositionMap = "F" _
Or PositionMap = "Z" _
Or PositionMap = "X" _
Or PositionMap = "C" _
Or PositionMap = "V" _
Then
CharX = CharX + 1
DrawIt
End If
Case vbKeyLeft
'Left
PositionMap = Mid(Map(CharY + 3), CharX + 2, 1)
CharFacing = 4
Label2 = CharX
Call CharacterMovements
If PositionMap = "1" _
Or PositionMap = "2" _
Or PositionMap = "3" _
Or PositionMap = "4" _
Or PositionMap = "Q" _
Or PositionMap = "W" _
Or PositionMap = "E" _
Or PositionMap = "R" _
Or PositionMap = "A" _
Or PositionMap = "S" _
Or PositionMap = "D" _
Or PositionMap = "F" _
Or PositionMap = "Z" _
Or PositionMap = "X" _
Or PositionMap = "C" _
Or PositionMap = "V" _
Then
CharX = CharX - 1
DrawIt
End If
Case vbKeyEscape
'{Esc}ape
End
End Select
End Sub

Public Sub DrawIt()
'Drawing the map
For Y = -3 To 6
For X = -3 To 6
PassToNext = 0
If Y + CharY + 0 < 1 Then PictureHandler
If X + CharX + 0 < 1 Then PictureHandler
If X + CharX + 0 > Len(Map(1)) Then PictureHandler
If Y + CharY + 0 > 51 Then PictureHandler
If PassToNext = 0 Then PositionMap = Mid(Map(Y + CharY + 1), (X + CharX + 1), 1)
Select Case PositionMap
Case Is = "1"
PaintPicture GrassCornerNorthWest.Picture, (X + 3) * 32, (Y + 3) * 32
Case Is = "2"
PaintPicture GrassEdgeNorth1.Picture, (X + 3) * 32, (Y + 3) * 32
Case Is = "3"
PaintPicture GrassEdgeNorth2.Picture, (X + 3) * 32, (Y + 3) * 32
Case Is = "4"
PaintPicture GrassCornerNorthEast.Picture, (X + 3) * 32, (Y + 3) * 32
Case Is = "Q"
PaintPicture GrassEdgeWest1.Picture, (X + 3) * 32, (Y + 3) * 32
Case Is = "W"
PaintPicture Grass1.Picture, (X + 3) * 32, (Y + 3) * 32
Case Is = "E"
PaintPicture Grass2.Picture, (X + 3) * 32, (Y + 3) * 32
Case Is = "R"
PaintPicture GrassEdgeEast1.Picture, (X + 3) * 32, (Y + 3) * 32
Case Is = "A"
PaintPicture GrassEdgeWest2.Picture, (X + 3) * 32, (Y + 3) * 32
Case Is = "S"
PaintPicture Grass3.Picture, (X + 3) * 32, (Y + 3) * 32
Case Is = "D"
PaintPicture Grass4.Picture, (X + 3) * 32, (Y + 3) * 32
Case Is = "F"
PaintPicture GrassEdgeEast2.Picture, (X + 3) * 32, (Y + 3) * 32
Case Is = "Z"
PaintPicture GrassCornerSouthWest.Picture, (X + 3) * 32, (Y + 3) * 32
Case Is = "X"
PaintPicture GrassEdgeSouth1.Picture, (X + 3) * 32, (Y + 3) * 32
Case Is = "C"
PaintPicture GrassEdgeSouth2.Picture, (X + 3) * 32, (Y + 3) * 32
Case Is = "V"
PaintPicture GrassCornerSouthEast.Picture, (X + 3) * 32, (Y + 3) * 32
Case Is = "9"
PaintPicture Water1.Picture, (X + 3) * 32, (Y + 3) * 32
Case Is = "0"
PaintPicture Water2.Picture, (X + 3) * 32, (Y + 3) * 32
Case Is = "-"
PaintPicture Water3.Picture, (X + 3) * 32, (Y + 3) * 32
Case Is = "5"
PaintPicture MountCornerNorthWest.Picture, (X + 3) * 32, (Y + 3) * 32
Case Is = "6"
PaintPicture MountEdgeNorth1.Picture, (X + 3) * 32, (Y + 3) * 32
Case Is = "7"
PaintPicture MountEdgeNorth2.Picture, (X + 3) * 32, (Y + 3) * 32
Case Is = "8"
PaintPicture MountCornerNorthEast.Picture, (X + 3) * 32, (Y + 3) * 32
Case Is = "T"
PaintPicture MountEdgeWest1.Picture, (X + 3) * 32, (Y + 3) * 32
Case Is = "Y"
PaintPicture Mount1.Picture, (X + 3) * 32, (Y + 3) * 32
Case Is = "U"
PaintPicture Mount2.Picture, (X + 3) * 32, (Y + 3) * 32
Case Is = "I"
PaintPicture MountEdgeEast1.Picture, (X + 3) * 32, (Y + 3) * 32
Case Is = "G"
PaintPicture MountEdgeWest2.Picture, (X + 3) * 32, (Y + 3) * 32
Case Is = "H"
PaintPicture Mount3.Picture, (X + 3) * 32, (Y + 3) * 32
Case Is = "J"
PaintPicture Mount4.Picture, (X + 3) * 32, (Y + 3) * 32
Case Is = "K"
PaintPicture MountEdgeEast2.Picture, (X + 3) * 32, (Y + 3) * 32
Case Is = "B"
PaintPicture MountCornerSouthWest.Picture, (X + 3) * 32, (Y + 3) * 32
Case Is = "N"
PaintPicture MountEdgeSouth1.Picture, (X + 3) * 32, (Y + 3) * 32
Case Is = "M"
PaintPicture MountEdgeSouth2.Picture, (X + 3) * 32, (Y + 3) * 32
Case Is = ","
PaintPicture MountCornerSouthEast.Picture, (X + 3) * 32, (Y + 3) * 32
End Select


skip:
Next
Next


Select Case CharFacing
Case Is = 1
PaintPicture Car1.Picture, 5 * 32, 5 * 32
Case Is = 2
PaintPicture Car3.Picture, 5 * 32, 5 * 32
Case Is = 3
PaintPicture Car4.Picture, 5 * 32, 5 * 32
Case Is = 4
PaintPicture Car2.Picture, 5 * 32, 5 * 32
End Select

End Sub

Public Sub CharacterMovements()
Select Case CharFacing
Case Is = 1
PaintPicture Car1.Picture, 5 * 32, 5 * 32
Case Is = 2
PaintPicture Car3.Picture, 5 * 32, 5 * 32
Case Is = 3
PaintPicture Car4.Picture, 5 * 32, 5 * 32
Case Is = 4
PaintPicture Car2.Picture, 5 * 32, 5 * 32
End Select
End Sub

Public Sub LetsBegin()
'Da Main Sub ;)
CharX = 28
CharY = 8
Map_A1
DrawIt
PositionMap = Mid(Map(CharY + 4), CharX + 3, 1)
CharFacing = 2
Label1 = CharY
Label2 = CharX
CharacterMovements
End Sub

Public Sub PictureHandler()
PassToNext = 1
PaintPicture Water1.Picture, (X + 3) * 32, (Y + 3) * 32
'////////////////////////MAP CODE END///////////////////
End Sub

What Type Is LastRowInColumn? (code Attached)
I have code that starts at the top of the spreadsheet, and goes down the spreadsheet until it gets to a blank row, processing as it goes. I found this code in the forum that will give me the first row that's blank:

LastRowInColumn = Cells(Rows.Count, intCol).End(xlUp).Row

My question is: What type is LastRowInColumn? Is it an integer?

DB Dummy Needs A Hand. Code Attached.
I was hoping someone could look at this code and give me some direction.

I wrote this for our newsroom to take down info from people reporting school and business closings during snowy weather.

It’s basically a MS Database with 4 tables: Churches, Business, Schools and Daycares.

There are 4 buttons that allow you to select which you are searching.

There is a filter box that runs a query against the table selected whenever you type in the box.

Once you find the entry you are looking for, you can double click the row and it will bring up an edit box with the entry you selected.

Here is where the problem starts. I need to be able to edit and save any changes the user makes in the edit form when they click save.

Everything thus far works great; I just can save any changes!

There has to be a simple trick to saving edited fields back to a table.

Anyone got a second to look and post me a reply.

Thanks everyone!

How To Detect A Device Attached On USB With VB Code?
Hi GURUs!

How v can detect any device which is being attached with USB Port of the system, with VB code? I want to write a program which can detect any deivce as that is attached with USB.

Any Help or hint.

Thanx



Asad Ijaz

" ...You may be disappointed if you fail, but you are doomed if you don’t try. "

Convert A Unicode Text File To ASCII
I'm trying to read a text file into visual basic, change a part of it, and write it back out a text file. I had been having problems using OPEN (always resulted in an error 36), even though I had tried using LOF and EOF.

I found that the problem was the text file that I am trying to read from is in Unicode. Is there an easy way to convert this text file into an ASCII text file before I read from it?

Convert Binary Value To ASCII (NEVER MIND, RESOLVED))
What is an easy way for that ?




Thank ya all!

Help Me Figure Out How To Convert 3 Ascii Characters Into Time?
I am making a stats program for the game half-life, if i send a string to the server through udp, i get back a packet that has the player info, which contains their name, how many frags they have and also 3 ascii characters that somehow represent their time in the game... name is easy, its just written in normal letters, the frags is a single character ascii but it is easy to figure it since you just use Asc() to turn it into a a number
Well i have been stuck on the player's time in game for a while now, it is 3 ascii characters, im not sure if you have to do anything with hex, or anythign else, but i cant figure it out, here is a list of the characters ive put together and along with that their APROXAMATE time i use another program to retrive, ive went ahead already and converted the ascii charactes into their numbers using the Asc() function

Maybe someone with more brain power can figure how i would turn the 3 characters into seconds, i belive it is in seconds, but i dont think just multiplying or deviding will work... IF YOU CAN SOLVE THIS MYSTRY I WILL BE GREATFUL, thanx a bunch!


Code:


67 37 32 <-42m
67 245 29 <-42m
179 72 18 <-39m
51 24 19 <-39m
179 23 19 <-39m
51 22 19 <-39m
179 13 19 <-39m
143 132 16 <-38m
143 84 14 <-37m
71 7 13 <-37m
143 147 9 <-36m
102 216 255 <-34m
102 222 246 <-32m
102 126 242 <-32m
133 99 242 <-32m
102 252 232 <-31m
102 186 223 <-29m
31 34 211 <-28m
133 87 212 <-28m
31 22 181 <-24m
102 247 168 <-22m
102 235 138 <-18m
102 122 139 <-18m
102 120 139 <-18m
102 112 139 <-18m
102 125 139 <-18m
102 126 139 <-18m
142 203 130 <-17m
28 93 68 <-13m
28 91 68 <-13m
28 85 68 <-13m
28 83 68 <-13m
28 75 68 <-13m
28 71 68 <-13m
28 61 68 <-13m
28 37 68 <-13m
28 13 68 <-13m
28 123 67 <-13m
11 65 54 <-12m
28 177 1 <-8m
124 124 239 <-7m
22 14 234 <-7m
22 10 234 <-7m
22 254 233 <-7m
22 250 233 <-7m
22 234 233 <-7m
22 226 233 <-7m
22 206 233 <-7m
22 158 233 <-7m
22 110 233 <-7m
22 74 232 <-7m
247 16 90 <-3m
247 8 90 <-3m
247 240 89 <-3m
247 232 89 <-3m
247 200 89 <-3m
247 184 89 <-3m
247 144 89 <-3m
247 48 89 <-3m
247 208 88 <-3m
247 136 86 <-3m
44 108 73 <-3m
47 163 13 <-2m
225 56 225 <-1m




oh, and if it helps any, i looked in the protcol readme for this information, and it says
players name is a string
players frag is int32
and for the players time in game, it says its float32
btw, the protocol was also meant for C++

How To Do Visual Basic 2005 Ascii Convert?
Hi everyone,

I need some help...
I'm using Visual Basic 2005..

I now doing an application that will
Receive 2Byte Hex data.. and show in textBox..

But recently i found that my textBox cannot show Hex!! :'(

I need to take Received Hex data and change it to Ascii then put it into textBox..
So that when we display at the textBox.. the textBox will show the Hex..

Please help me..

Thanks

Regards
Wanxi

Convert Wordstar Data To Ascii Format
raghu
Can you please help me to convert the data present in Word start to proper Text format using VB.



Edited by - rag_rr on 10/10/2003 10:35:25 PM

Convert A Binary File To Ascii String
Dear All:

I have a problem on converting a binary file to a Ascii String.
The following is a sub to convert an input binary String to ascii string but I found that
it does not working
Can someone point out where did I do wrong???

Thanks in advance


public Sub Bin2Asc(strBin as string, strAsc as string)
Dim lLen as Long, i as Long, strBin2 as string
lLen = len(strBin)
strAsc = ""
for i = 1 to lLen
Dim strTmp as string
Dim btByte as Byte
strTmp = Hex(Asc(mid$(strBin, i, 1)))
If len(strTmp) &lt; 2 then
strTmp = "0" & strTmp
else
If len(strTmp) = 4 then
lLen = lLen - 1
End If
strAsc = strAsc + strTmp
If i = lLen then
Exit for
End If
next i
End Sub

Need Pro Help With Attached Code For Listing And Deleting IE Cache
The code I attached is used for listing an removing IE cache entries. I picked this code up from MVPS or from AllApi, I can't remember exactly.

What I added to is a Public Boolean type variable InProcess
to be able to stop the listing process. Like when I want
to list the cache I first set the variable to be InProcess = True
and the I call the ListCache procedure. After that, if I want,
I can just set the variable to InProcess = False and the
procedure will stop.

The problem is this. If the cache is a little larger (hasn't been
emptied for 3 weeks):

1. I start the listing process
2. Stop it at some time (before it finishes)
3. Start it again

and the application gets stuck and never finishes. If I leave it to work when I call it the first time it will eventually finish. But only
when I stop it and start again, it gets stuck...

Can someone tell me what am I doing wrong... I really can't
figure this one out.

Copyright © 2005-08 www.BigResource.com, All rights reserved