.NET Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgramming.NET Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old November 9th, 2005, 11:32 PM
IceNeo IceNeo is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2005
Posts: 2 IceNeo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 18 m 8 sec
Reputation Power: 0
Red face Assigning first character of variable into an array (VB.NET)

What I am trying to do is a very simple encrypt/decrypt program. I must point out now that I am very new at this and this is my first working program.

I load a file into a text box and have the content of the textbox in a variable. I need to then assign the first 20 characters into an array, change the characters, then read the array backwards.

This is what I came up with:

Code:
FileOpen(1, OpenFileDialog1.FileName, OpenMode.Input)
        Do While Not EOF(1)
            Dim InputArry(19) As String
            VarCount = 0
            Do While Not VarCount < 19 And Not EOF(1)
                InputArry(VarCount) = InputString(textFile, 1)
                ThisChar = Asc(InputArry(VarCount))
                Select Case ThisChar
                    Case 90
                        TempText = 65
                    Case 65 To 98
                        TempText += 1
                    Case 122
                        TempText = 97
                    Case 97 To 121
                        TempText += 1
                    Case Else
                        TempText = TempText
                End Select
                InputArry(VarCount) = Chr(TempText)
                VarCount = VarCount + 1
            Loop
            For AVar = VarCount To 0 Step -1
                StrO = StrO & InputArry(AVar)
            Next
        Loop
        FileClose(1)
        txtBox.Clear()
        txtBox.Text = StrO


Any suggestions? What am I doing wrong?

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgramming.NET Development > Assigning first character of variable into an array (VB.NET)


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT