VB Express conversion from ASCII char to hex
VB Express conversion from ASCII char to hex
VB Express conversion from ASCII char to hex
VB Express conversion from ASCII char to hex
VB Express conversion from ASCII char to hex
VB Express conversion from ASCII char to hex VB Express conversion from ASCII char to hex VB Express conversion from ASCII char to hex VB Express conversion from ASCII char to hex VB Express conversion from ASCII char to hex VB Express conversion from ASCII char to hex VB Express conversion from ASCII char to hex VB Express conversion from ASCII char to hex
VB Express conversion from ASCII char to hex VB Express conversion from ASCII char to hex
VB Express conversion from ASCII char to hex
Go Back  Xtreme Visual Basic Talk > > > VB Express conversion from ASCII char to hex


Reply
 
Thread Tools Display Modes
  #1  
Old 06-23-2009, 08:31 PM
darksteel88 darksteel88 is offline
Regular
 
Join Date: Jun 2009
Location: Canada
Posts: 81
Default VB Express conversion from ASCII char to hex


I read in a unique file type, its called .pkm, it's just a collection of hex data. Anyways, I'm using VB Express 2005 (or 2008 since it's free), and I read in the file, and printed out the values. It printed out the ASCII character equivalent, so all I saw were the weird symbols and all (the hex characters in this file do not convert using ASCII). What I want to do is convert it to hex so I can see what the hex values are.

Code:
        Dim file As String
        Dim data1 As String

        file = "D:\Documents and Settings\owner\Desktop\Pokemon\7-10-08_10ANNIV_ENG_Lugia.pkm"

        FileOpen(1, file, OpenMode.Binary)

        Do While Not EOF(1) ' doesn't make a difference since it reads in all at once
            Input(1, data1)
            Console.WriteLine(data1)
        Loop

        Console.ReadLine()
http://i42.tinypic.com/4qhgd5.jpg

Too bad image code is off. That is a screen from a hex editor that reads it in properly. Currently my program displays it the way it is seen on the right, but I need it displayed the way it is on the left, in plain hex.
Reply With Quote
  #2  
Old 06-24-2009, 05:46 PM
AtmaWeapon's Avatar
AtmaWeaponVB Express conversion from ASCII char to hex AtmaWeapon is offline
Fabulous Florist

Forum Leader
* Guru *
 
Join Date: Feb 2004
Location: Austin, TX
Posts: 9,500
Default

There's no such thing as "hex data". Hexadecimal is just a representation of the data; 100 decimal is the same as 0x64 hexadecimal and 0b1100100 binary. All files are either binary files or text files (this is a lie.) The lie in that statement is that text files are just a representation of binary files where the bytes are interpreted as text characters.

The first thing is to avoid using FileOpen and all of the other VB6 file I/O methods. In .NET, you should use FileStream and/or a BinaryReader for editing binary files. Here's the thing: when you read bytes from a file, by default the computer wants to display them as decimal numbers. If you read documentation for the String.Format() method, you will find that you can get use it to convert strings to hexadecimal for you and do alignment.

For example, here's a function that will read a file's bytes and return them in an array:
Code:
    Private Function ReadFileBytes(ByVal fileName As String) As Byte()
        Dim data() As Byte
        Using reader As New BinaryReader(New FileStream(fileName, FileMode.Open))
            data = reader.ReadBytes(reader.BaseStream.Length)
        End Using

        Return data
    End Function
Here's a function that will print an array of bytes, 5 to a row, using 4 spaces for each byte and printing leading zeros:
Code:
    Private Sub PrintHexBytes(ByVal data() As Byte)
        Dim counter As Integer = 0

        While counter < data.Length
            Console.Write(String.Format("{0,4:X}", data(counter)))

            counter += 1

            If counter Mod 5 = 0 Then
                Console.WriteLine()
            End If
        End While
    End Sub
For example, if you pass { 1, 2, 3, ..., 16 } to the function, the output will be:
Code:
  01  02  03  04  05
  06  07  08  09  0A
  0B  0C  0D  0E  0F
  10
__________________
.NET Resources
My FAQ threads | Tutor's Corner | Code Library
I would bet money 2/3 of .NET questions are already answered in one of these three places.
Reply With Quote
  #3  
Old 06-24-2009, 07:07 PM
darksteel88 darksteel88 is offline
Regular
 
Join Date: Jun 2009
Location: Canada
Posts: 81
Default

That is the way I learned to do it at school. The books that we have showed it that way, and our teacher taught it that way. To be honest though, VB is a useless language, and I would have preferred to learn C/C++ (what my teacher used to teach a few years back), or Java, which other schools and the online course teach.

Thanks for that code though, I'll definitely give it a whirl later on. I'm really not in the mood right now to do much of anything, just checking. My sister had a soccer game, dad is the coach. The team doesn't really listen, heck, they don't even understand what he's telling them to do, and only ONE person was at practice yesterday. Oh, and they lost the game, more than 10-0, and the other coach was told not to embarrass them.

Thanks again for the code, you're a champ if it works the way I want to.
Reply With Quote
  #4  
Old 06-24-2009, 08:28 PM
Eradicator Eradicator is offline
Junior Contributor
 
Join Date: May 2008
Posts: 300
Default

Quote:
Originally Posted by darksteel88 View Post
VB is a useless language
I'd really enjoy hearing your reasons for this opinion, because as far as I can tell there's no basis for it.
Reply With Quote
  #5  
Old 06-25-2009, 07:37 AM
Qua's Avatar
QuaVB Express conversion from ASCII char to hex Qua is offline
Impetuous & volatile

* Expert *
 
Join Date: Apr 2005
Posts: 2,177
Default

Incoming fail to resist flame bait:

Quote:
Originally Posted by darksteel88 View Post
That is the way I learned to do it at school. The books that we have showed it that way, and our teacher taught it that way. To be honest though, VB is a useless language, and I would have preferred to learn C/C++ (what my teacher used to teach a few years back), or Java, which other schools and the online course teach.
Visual Basic.NET will help you understand the methodology and key definition of modern object orientated languages just as well as Java or C++. Java and visual basic are for the most parts very alike, and they are obviously using different syntax, but everything regarding classes, inheritance, variables, interfaces and so on is exactly the same. So once you learned either, it's easy to switch between the two of them.

Saying that .NET languages or VB.NET in particular is a useless language is an ignorant statement, and once you get to work with "low-level" C, C++ or event assembler you'll start to realize all the advantages of using a langauge such as VB.NET or C#. Not having to work with registers, manual fixed point representation of decimal numbers, interrupts and memory mangement is a lot of abstraction that just makes the whole development process a lot faster, and that is certainly a keyword for a lot of projects.
__________________
Reading is the foundation for all knowledge - Unknown.
Reply With Quote
  #6  
Old 06-25-2009, 11:39 AM
AtmaWeapon's Avatar
AtmaWeaponVB Express conversion from ASCII char to hex AtmaWeapon is offline
Fabulous Florist

Forum Leader
* Guru *
 
Join Date: Feb 2004
Location: Austin, TX
Posts: 9,500
Default

Quote:
Originally Posted by darksteel88 View Post
To be honest though, VB is a useless language, and I would have preferred to learn C/C++ (what my teacher used to teach a few years back), or Java, which other schools and the online course teach.
VB .NET is not a useless language. It can be used anywhere the .NET framework is used, and many, many places use it. Any C# project you find could have been done in VB .NET. Period. No exceptions.

In fact, any Windows C/C++ project you find could be done with VB .NET; it can call Windows API through P\Invoke.

C/C++ have their place, but a wise programmer does not dismiss a powerful language as "useless". It takes 3 minutes to create a basic Windows Forms application in VB .NET; 0 lines of code hand-written. Doing the same in C requires over 100 lines of hand-written code. When you choose C/C++ you lose levels of abstraction and ease of development in return for gaining power.
__________________
.NET Resources
My FAQ threads | Tutor's Corner | Code Library
I would bet money 2/3 of .NET questions are already answered in one of these three places.
Reply With Quote
  #7  
Old 06-26-2009, 06:29 AM
jwakeman's Avatar
jwakeman jwakeman is offline
Contributor
 
Join Date: Jul 2005
Posts: 420
Default

I am a C++ programmer by profession and a .net programmer by hobby. Love them both. In fact I've never met a language I didn't like
Reply With Quote
  #8  
Old 06-26-2009, 10:17 AM
darksteel88 darksteel88 is offline
Regular
 
Join Date: Jun 2009
Location: Canada
Posts: 81
Default

Here's my basis for my argument.

Both CS teachers at my school didn't know VB. One of them is a C/C++ programmer, the other is Java. Both of them said they never learned it in school, one is like 50 or so and the other is early 20's, so they never taught it back in the day or now.

We did a career night at my school and a Software Development Engineer (fancy name for a programmer), came from Microsoft. I got to talking and she said that VB is being phased out because nobody uses it. At Microsoft, they don't even use it.

So my question is, where would we use it? I hear it's good for learning, but the curriculum says that Java is acceptable to learn as well, as they learn it in many other places, and the CS teacher I had said he used to teach C/C++ back in the day. VB was really easy to learn as well, I zoomed past the class on almost every assignment and finished the course with 100%.
Reply With Quote
  #9  
Old 06-26-2009, 11:21 AM
Eradicator Eradicator is offline
Junior Contributor
 
Join Date: May 2008
Posts: 300
Default

Quote:
Originally Posted by darksteel88 View Post
We did a career night at my school and a Software Development Engineer (fancy name for a programmer), came from Microsoft. I got to talking and she said that VB is being phased out because nobody uses it. At Microsoft, they don't even use it.
I think you're misunderstanding, first of all. There's VB (Visual Basic), and there's VB.NET (Visual Basic .NET). VB.NET is usually referred to as just Visual Basic, because VB.NET is the latest of the Visual Basic family, and because she's right, partially, except that it can't be phased out because it was never used to begin with.

VB was never used as a corporate solution, as far as I know, however, VB.NET is, and will continue to be. If she was in fact referring to VB.NET, she's simply misinformed.
Reply With Quote
  #10  
Old 06-26-2009, 11:30 AM
AtmaWeapon's Avatar
AtmaWeaponVB Express conversion from ASCII char to hex AtmaWeapon is offline
Fabulous Florist

Forum Leader
* Guru *
 
Join Date: Feb 2004
Location: Austin, TX
Posts: 9,500
Default

VB .NET is most definitely not being phased out. Visual Studio 2010 ships with a new language version, and one of the "features" they are touting is that moving forward they will strive for more feature parity between C# and VB .NET. The only thing that might lead to this conclusion is that most of the .NET world has standardized on C#. I believe most of this comes from the bad reputation that C/C++ developers created for VB6 to save their jobs; I use both C# and VB .NET interchangeably and the only cases where I'd prefer one to the other are small niches.

Your teachers are a poor example; I'll address each separately.

When the 50-year-old teacher was in school (I'll assume around 30 years ago in the 70's or 80's), VB didn't exist except as some variant of BASIC. At the time, BASIC was a very easy language but required you to do horrendous things when developing a non-trivial application; C provided a structured programming environment that made developing more complicated applications more fun. When VB came out, the tables were turned. C/C++ windows applications require an immense amount of development effort and knowledge to do simple things. As I pointed out, the most basic Windows C application requires you to write 100 lines or more of code. When VB arrived, it reduced the amount of effort required to write a nontrivial Windows application immensely. There are many that would argue that the VB language lacked features that would make developing large-scale applications easier, but the older I get the more I decide that this was just an excuse used by C/C++ developers to make themselves feel like their jobs were still important. With the right development practices and abstractions, even BASIC could be used to produce beautiful, maintainable code at a large scale.

When the 20-year-old teacher was in school, he didn't learn VB because most schools reserve VB for their non-programmers; typically these are business majors that require some programming credits. VB is ideal for these people because it abstracts away complicated topics like memory allocation and pointers. On the other hand, people who are seriously interested in a computing career should be aware of these topics and C/C++ are fantastic languages to learn. If the 20's teacher only learned Java and didn't learn C/C++, then he's no better off than someone else that only learned VB .NET: Java abstracts away the difficult concepts as well.

Should you learn VB .NET or Java? That's an interesting question.

VB .NET is a language built around the .NET Framework; essentially the .NET Framework is the runtime for VB .NET. If you understand the .NET Framework, you can branch out into languages like C#, make use of the functional language F#, or branch out into dynamic languages with IronRuby and IronPython. Mono is a version of the .NET Framework that runs on Linux (and by virtue of that MacOS), so VB .NET applications can work on all three major computing platforms. VB .NET is an object-oriented language that supports the pillars of OOP: Encapsulation, Abstraction, Inheritance, and Polymorphism. It's a first-class language in the .NET Framework and all MSDN reference articles include VB .NET example code. VB .NET can interface with the Windows API, COM components, or any Windows DLL for instances where the .NET Framework fails to provide something you need. VB .NET can be used to write applications, services, web services, and web applications.

Java is a language built around its own libraries. As far as I know, only Java can use its libraries. Users must have a Java Virtual Machine (JVM) installed to run Java applications. There are JVMs available for practically every platform in existence, and typical Java applications can run on multiple platforms without the need for recompilation. Java is an Object-Oriented language. I'm almost certain it can interface with C DLLs when needed. You can use Java to write applications, web applications, and web services.

Either one is good to learn. Java and the .NET Framework have tons of market share. You might be able to learn both, but I don't think it's possible to be an "expert" in both seeing as they both cover such a broad set of libraries. I feel like there's more opportunity on the .NET side because there's a variety of languages you can learn. However, .NET is going to be continually locked on Microsoft's platform and focused on Windows application development. On the other hand, Java's goal is to be a more general-purpose language, so it might be better for overall development.

It really doesn't matter which you pick, but the view that VB .NET is useless is folly. If MS wanted to phase out VB, why do they add new features? Why have they extended the lifetime of VB6 and promised support on Windows 7? VB .NET will soon be on its 5th language version; that seems odd for something that's doomed.
__________________
.NET Resources
My FAQ threads | Tutor's Corner | Code Library
I would bet money 2/3 of .NET questions are already answered in one of these three places.
Reply With Quote
  #11  
Old 06-26-2009, 04:17 PM
darkforcesjedi's Avatar
darkforcesjediVB Express conversion from ASCII char to hex darkforcesjedi is offline
Trust me, I'm an

* Expert *
 
Join Date: Apr 2001
Location: In ur base, pwnin d00dz
Posts: 1,964
Default

Someone I went to college with actually works for the Visual Studio team. He and many others there have experience using VB.Net. I don't really know him, but I've gone to him with some more obscure questions that I couldn't get answers for here. (If he doesn't know it, he knows someone from the VB team with the answer.)

Saying businesses do not use VB.Net is completely untrue. Many businesses wrote code in legacy VB and write code in VB.Net. Monster.com currently has 783 job postings for VB.Net programmers.
__________________
To err is human; to debug, divine.
Reply With Quote
  #12  
Old 06-27-2009, 11:10 AM
darksteel88 darksteel88 is offline
Regular
 
Join Date: Jun 2009
Location: Canada
Posts: 81
Default

Had no idea it was that popular. Don't yell at me for this one, but I was told that one main reason VB isn't so popular is because it's very limited. There are many other programs that can do what VB does, and more, which makes using VB less useful. From what I'm told, it's better for making quick programs just to see how something works.

And ya, I would have greatly preferred to learn C/C++ or Java.
Reply With Quote
  #13  
Old 06-27-2009, 11:30 AM
Qua's Avatar
QuaVB Express conversion from ASCII char to hex Qua is offline
Impetuous & volatile

* Expert *
 
Join Date: Apr 2005
Posts: 2,177
Default

Quote:
Originally Posted by darksteel88 View Post
Had no idea it was that popular. Don't yell at me for this one, but I was told that one main reason VB isn't so popular is because it's very limited. There are many other programs that can do what VB does, and more, which makes using VB less useful. From what I'm told, it's better for making quick programs just to see how something works.

And ya, I would have greatly preferred to learn C/C++ or Java.
I'd love to hear from you about the experience once you've worked with random hardware APIs in C, setting registers, high and low nibbles and manually handling fixed point aritmetics
__________________
Reading is the foundation for all knowledge - Unknown.
Reply With Quote
  #14  
Old 06-27-2009, 05:20 PM
AtmaWeapon's Avatar
AtmaWeaponVB Express conversion from ASCII char to hex AtmaWeapon is offline
Fabulous Florist

Forum Leader
* Guru *
 
Join Date: Feb 2004
Location: Austin, TX
Posts: 9,500
Default

Quote:
Originally Posted by darksteel88 View Post
Had no idea it was that popular. Don't yell at me for this one, but I was told that one main reason VB isn't so popular is because it's very limited. There are many other programs that can do what VB does, and more, which makes using VB less useful. From what I'm told, it's better for making quick programs just to see how something works.

And ya, I would have greatly preferred to learn C/C++ or Java.
Figure out who gave you that notion, then do yourself a favor and never listen to another word that comes out of their mouth. There are languages that can do this or that better than VB .NET, and languages that can do this or that worse than VB .NET, but only niche activities that VB .NET cannot do. Embedded machines are currently something I'd say it can't do, but the .NET Micro Framework (or whatever it's called) shows a lot of promise and might support VB .NET. Even for those niche activities that it doesn't support, there's nothing stopping you from writing a compiler that can compile VB .NET for that platform (though you might consider that cheating )

It's certainly easy to do rapid prototyping in VB .NET, but that doesn't mean this is all it is able to do.
__________________
.NET Resources
My FAQ threads | Tutor's Corner | Code Library
I would bet money 2/3 of .NET questions are already answered in one of these three places.
Reply With Quote
  #15  
Old 06-27-2009, 07:51 PM
darksteel88 darksteel88 is offline
Regular
 
Join Date: Jun 2009
Location: Canada
Posts: 81
Default

Anyone I've ever talked to who knows CS has said that. Be it either of the two teachers, the Microsoft representative, another teacher of mine that knows a bit, someone who USES VB Script at work, and someone currently enrolled in CS in Poland.


Lets forget about that though, I need a bit of help on the code. I pasted it in but BinaryReader keeps coming up as undefined. I'm not exactly sure what it is supposed to be. I tried declaring it as a variable but it didn't work, so some advice would help. I assume fileName is the predefined file directory before going to the function.
Reply With Quote
  #16  
Old 06-27-2009, 11:15 PM
Eradicator Eradicator is offline
Junior Contributor
 
Join Date: May 2008
Posts: 300
Default

Quote:
Originally Posted by darksteel88 View Post
Anyone I've ever talked to who knows CS has said that. Be it either of the two teachers, the Microsoft representative, another teacher of mine that knows a bit, someone who USES VB Script at work, and someone currently enrolled in CS in Poland.
Once again, VB Script is not the same thing as VB.NET.
Reply With Quote
  #17  
Old 06-28-2009, 01:25 AM
darksteel88 darksteel88 is offline
Regular
 
Join Date: Jun 2009
Location: Canada
Posts: 81
Default

I guess it's not, but it has its similarities does it not?

I still need an answer to my previous question.
Reply With Quote
  #18  
Old 06-28-2009, 11:12 AM
AtmaWeapon's Avatar
AtmaWeaponVB Express conversion from ASCII char to hex AtmaWeapon is offline
Fabulous Florist

Forum Leader
* Guru *
 
Join Date: Feb 2004
Location: Austin, TX
Posts: 9,500
Default

BinaryReader's full name is System.IO.BinaryReader. This means that you either need to type its fully-qualified name or use an Imports statement to tell the compiler to look in System.IO when it sees a type name that is not in the current scope. To do this, add this line to the top of your file:
Code:
Imports System.IO
The only syntax element allowed to come before Imports statements are comments, so make sure this comes before any lines of code.

VB usefulness aside
VB means many things: it is a family of languages intended for different purposes:
  • VB6 is the last of the line of a very popular application development environment and runtime. This was the easiest, quickest way to write Windows applications in its time.
  • VBScript is a language with VB syntax that addresses the problem that Windows' support for command-line usage and scripting is very poor. It is able to do a ton of system configuration tasks, but is a poor choice for general applications.
  • VBA is Visual Basic for Applications. It's similar to VBScript but is intended for use as an automation language for applications such as Office. Office applications use this as their primary scripting language. It's a poor choice for general applications because it cannot execute outside of the application it represents.
  • VB .NET is a .NET language. This means it is object-oriented and uses the .NET Framework as its runtime. This is the spiritual successor to VB6, and alongside C# is a very good choice for Windows application development. Thanks to the .NET Compact Framework, it is a very good choice for Windows Mobile application development. Thanks to the Mono project, it will eventually become a good choice for Linux and Mac application development. Thanks to the .NET Micro Framework, it may become a good choice for embedded application development.

VB Script, VB6, VBA, and VB .NET have syntactical similarities, but run against very different runtimes. Saying that VB Script and VB .NET are the same is kind of like saying that C++ and Perl are similar, or if you prefer car analogies it's like claiming that a helicopter and a car are the same because they both have foot pedals. It would be important to figure out which VB the people you trust are talking about before attributing their malice to all VB languages. I do agree that most of the development world has a very significant bias against VB .NET, but most of this is based on a negative view of VB6 by C/C++ snobs that feared for their jobs. (This is the third time I've said this, I believe.)

Seriously, think about where the bias might have come from. How would you feel if you spent 10 years learning a powerful language that has hundreds of byzantine rules and requires you to think only one level above assembly. It takes you a week to create trivial applications, and then you have to spend a few days checking for memory leaks and tracking down the cause of null pointers. The language proves so difficult that over 2 or 3 years you create a library to do the mind-numbing tedious things for you (like a reference-counting memory manager, or a basic form.) You ascend to the position of senior developer over a large project; you're the most knowledgeable person on your team of 3 dozen and you are indispensable. Then, along comes a new language that claims to make things easier. Kids are writing entire applications in a day after spending only a semester in class. Worst of all, a company has released a product that competes with yours after spending only 3 months on the market! You're implementing new features as fast as you can, but it takes a few weeks to understand the implications of changing parts of your codebase and it seems like the competition adds features before you even start writing code for them! So you decide to evaluate this new language and see how it works. Bah! You can't even use pointers! There's no class inheritance, let alone multiple inheritance! Function pointers aren't there! There's no polymorphism! How could you ever write a program without these features? (You forget that these features were so difficult for you that you spent months writing libraries to help you manage them or making checklists for "good practices" that help you avoid the most common mistakes.) So you and your buddies smear the new language and do your best to convince the less-aware of the development community that VB is a pox.

This is why I feel like VB had a bad reputation. VB6 certainly lacked features that would have helped with large-scale application development. However, I don't think VB6's design goal was to enable users to create sprawling enterprise applications; the people who deride the lack of these features were complaining that hammers are not a good tool to drive screws. On the other hand, clever developers could write libraries that enabled some of the features in VB6; this is similar to what people had to do in C/C++ anyway! VB6 was easy to learn and thus a threat to the old guard of Windows development: it's no surprise that those who were threatened loudly complained that it was a kid's toy and not relevant for commercial development. Their jobs depended on the notion that Windows development had to be complicated and hard and had to require an experienced C/C++ developer. I even find myself today complaining that the ease of developing .NET applications is raising a whole generation of programmers that don't understand some low-level concepts; I should be joyous that the days of worrying about memory allocation may be numbered but instead I'm worried that my knowledge might become useless!
__________________
.NET Resources
My FAQ threads | Tutor's Corner | Code Library
I would bet money 2/3 of .NET questions are already answered in one of these three places.
Reply With Quote
  #19  
Old 06-28-2009, 11:45 AM
darksteel88 darksteel88 is offline
Regular
 
Join Date: Jun 2009
Location: Canada
Posts: 81
Default

Enough with the talk about why VB is good or not. I'll agree that it has some good uses, and it's not a bad language. I personally wish I would have learned JAVA or C++ because of the more widespread use is all.

I tried typing in the Imports part but it gave me a syntax error no matter where it was placed. Normally in VB, as you're aware, when typing something, the list comes up so you can see what commands can be used, but nothing came up. Imports is a key word, but it appears to have incorrect syntax the way you presented it.

Then I decided I would just put the System.IO. in front of it, and then Filestream came up incorrect, so I placed System.IO. in front of that. The open was incorrect as well, so I placed IO. in front, and there are no errors, but it does not work. Here is what it looks like. During runtime, it just shows nothing.

Code:
       Dim fileName As String
        fileName = "D:\Documents and Settings\owner\Desktop\Pokemon\7-10-08_10ANNIV_ENG_Lugia.pkm"

        ReadFileBytes(fileName)

        Console.ReadLine()

    End Sub

    Private Function ReadFileBytes(ByVal fileName As String) As Byte()

        Dim data() As Byte
        Using reader As New System.IO.BinaryReader(New System.IO.FileStream(fileName, IO.FileMode.Open))
            data = reader.ReadBytes(reader.BaseStream.Length)
        End Using

        Return data
    End Function
Thanks for all the help so far, I really appreciate this, and no doubt, I'll be back once this is done with another problem on this program. Hopefully I can do the comparing correctly though. And so you know where I am at with VB, in school, we did basic form and console stuff, 1D and 2D arrays, File I/O the way I was doing it, Record of Arrays, Functions and that's about it. The class was poor so it held me back. The class average was 68% while I ended with 100%.

Last edited by darksteel88; 06-28-2009 at 11:50 AM.
Reply With Quote
  #20  
Old 06-29-2009, 06:14 AM
darkforcesjedi's Avatar
darkforcesjediVB Express conversion from ASCII char to hex darkforcesjedi is offline
Trust me, I'm an

* Expert *
 
Join Date: Apr 2001
Location: In ur base, pwnin d00dz
Posts: 1,964
Default

The very first line in your code file probably looks something like
Public Class Form1

The Imports statement should not be contained inside the class. Scroll all the way to the top of your source and before anything else put the line:
Imports System.IO

Nothing should be above this line in the source file.
__________________
To err is human; to debug, divine.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
VB Express conversion from ASCII char to hex
VB Express conversion from ASCII char to hex
VB Express conversion from ASCII char to hex VB Express conversion from ASCII char to hex
VB Express conversion from ASCII char to hex
VB Express conversion from ASCII char to hex
VB Express conversion from ASCII char to hex VB Express conversion from ASCII char to hex VB Express conversion from ASCII char to hex VB Express conversion from ASCII char to hex VB Express conversion from ASCII char to hex VB Express conversion from ASCII char to hex VB Express conversion from ASCII char to hex
VB Express conversion from ASCII char to hex
VB Express conversion from ASCII char to hex
 
VB Express conversion from ASCII char to hex
VB Express conversion from ASCII char to hex
 
-->