Welcome Guest [Log In] [Register]
Welcome to KOEI Warriors (Forum). We hope you enjoy your visit.

You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to use many member-only features such as customizing your profile, sending personal messages, and voting in polls.

As a member you will also have access the exclusive Members Only Section where you will be privvy to a wide range of KOEI Warriors Renders, OSTs and Videos.
Registration is simple, fast, and completely free!

Join our community!

If you're already a member please log in to your account to access all of our features!

Username:   Password:
Locked Topic
Visual Basic Help; Anyone who can help with VB?
Topic Started: Nov 17 2008, 04:29 PM (90 Views)
Sanada
Member Avatar
The truth is not based on your predications.
[ *  *  *  *  *  *  *  * ]
I really need help with this Project I am doing.

I have done this before, but never while using File Handling, and never to a seperate form.

I have gotten the actual thing working, all I need now is to seperate the display onto seperate lines of a Text box.

This is the Output currently.

To clarify, it is put into the correct form within the Dat file as shown here.

my code is
Code:
 
'Records Highscore
Private Sub Highscores()

filename = App.Path & "\Highscores\Scores.dat"

'Sets Username for saving the Highscore
Uname = InputBox("Please Enter Name")

Score = Uname & " - " & Moves
'Lays out the data which will be put within the Highscore Table
Open filename For Append As #1

Print #1, Score
Close #1

frmHighscore.Visible = True

End Sub

to obtain the information, and then open the form, and then for the actual displaying I have
Code:
 
Private Sub Form_Load()
filename = App.Path & "\Highscores\scores.dat"

Open filename For Input As #1

txtHighscore.Text = Input$(LOF(1), 1)

Close #1
End Sub


can anyone who knows Visual Basic tell me how to sort this?
Edited by Sanada, Nov 17 2008, 04:36 PM.
Posted Image
Signature and Avatar by my Nemesis

Posted ImagePosted Image
Join my Kingdom Under Fire and Ninja Gaiden Cast Lists.
Offline Profile Goto Top
 
Mr.Honda
Member Avatar
Actively Retired
[ *  *  *  *  *  *  *  *  *  * ]
Crap ... I'm so out of touch with VB.

I used it semi-regularily for years and I may still have my resources boxed up somewhere, but I doubt I can provide any really helpful information. Its been awhile.

Sorry, Rival :/
Posted Image
Thanks to Shadow for the matching SW3 Tadakatsu set! :ph43r:
Posted Image
Currently Playing:
Warriors Orochi PSP - Personal Items & 4th Weapon Farming
Dynasty Warriors Strikeforce (PSP) - Diao Chan
Shin Sangoku Musou MULTI RAID 2 Demo (PSP) - Ling Tong :ph43r:
Offline Profile Goto Top
 
Sanada
Member Avatar
The truth is not based on your predications.
[ *  *  *  *  *  *  *  * ]
damn... its alright Rival :/

maybe this will help you remember a bit?

in a normal variable, when displaying it, just put ";" at the end, and it will create a new line for it.

When dealing with Multiple Forms and File Handling though, I am lost
Posted Image
Signature and Avatar by my Nemesis

Posted ImagePosted Image
Join my Kingdom Under Fire and Ninja Gaiden Cast Lists.
Offline Profile Goto Top
 
Mr.Honda
Member Avatar
Actively Retired
[ *  *  *  *  *  *  *  *  *  * ]
I'm trying to browse through MS Excel VB Editor to see if I can refresh my memory of some of this stuff, but as I recall there are some differences between VB as used in Office applications and the stand-alone VB program, which I have used both.

However, I'm still finding it difficult to come up with a solution to your problem though :/

That's why I gave up trying to include VB in the spreadsheet I made for tracking WO2 progress, I couldn't remember how to code things for it to do what I wanted it to do :/
Posted Image
Thanks to Shadow for the matching SW3 Tadakatsu set! :ph43r:
Posted Image
Currently Playing:
Warriors Orochi PSP - Personal Items & 4th Weapon Farming
Dynasty Warriors Strikeforce (PSP) - Diao Chan
Shin Sangoku Musou MULTI RAID 2 Demo (PSP) - Ling Tong :ph43r:
Offline Profile Goto Top
 
Musou
Member Avatar
as in "Last Post By"
[ *  *  *  * ]
I learned VB last year at school so I'll give it a shot but I didn't get as advanced as using files so I don't think I'd be much help.

Is that .dat thing an array? If so, have you tried a for loop where it's something along the lines of

FOR i = 0 to 9
IF array(i) > array (i + 1) THEN
temp = array(i + 1)
array(i + 1) = array(i)
array(i) = temp
END IF
Next i

And you'd have to place some additional checks afterwards.

If that doesn't help, here are some popular sorting algorithms (click on the main article links to get the pseudocode). I've heard of a couple of them, but I haven't actually learned any of them yet, though they might mean something to you.

Sorry if that was no help, that's about my level of VB lol.
Posted Image
Star Ocean Universe | Forum
Spoiler: click to toggle

Woo! Suikoden!
Offline Profile Goto Top
 
Sanada
Member Avatar
The truth is not based on your predications.
[ *  *  *  *  *  *  *  * ]
oh, I figured this out last night, forgot to say.

it was such a stupid mistake as well, it was just I forgot to change the Multiline Variable of the Textbox to True >_<



and the .dat is a external file, using File Handling to save data to it, I have not got an array involved it in....well yet anyway, when I get to sorting the information I will need an array
Posted Image
Signature and Avatar by my Nemesis

Posted ImagePosted Image
Join my Kingdom Under Fire and Ninja Gaiden Cast Lists.
Offline Profile Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · Archives · Next Topic »
Locked Topic

Composed & Designed by, ©KOEI Warriors, 2005-2010. All rights reserved.