![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#11 |
|
Caffeinated Neural Net
![]() Join Date: Jun 2005
Location: Dry west coast of Canada
Posts: 1,005
Rep Power: 5
![]() |
Okay, things you need to know to write a game include general program logic and basic I/O (you need input from the user, after all). You also need to learn how to validate that input, so that your program doesn't puke on its shoes when the user does something 'wrong' (which users do quite often).
Other things that you will likely need to learn are:
__________________
And once again, Probability proves itself willing to sneak into a back alley and service Drama as would a copper-piece harlot. - Vaarsuvius, Order of the Stick |
|
|
|
|
|
#12 |
|
Hobbyist Programmer
Join Date: Feb 2006
Posts: 214
Rep Power: 0
![]() |
Please try learning this somewhere else first. Use this more as a guideline. If you just copy and paste this.. you won't learn a thing. Thus, the harder stuff will seem impossible.
Opening a file intNewFile = FreeFile
cdl1.Filter = "Text files (*.bat)|*.bat"
cdl1.ShowOpen
If cdl1.FileName <> "" Then
Open cdl1.FileName For Input As #intNewFile
txtFile.Text = ""
Do While Not EOF(intNewFile)
Line Input #intNewFile, strTextLine
txtFile.Text = txtFile.Text + strTextLine & vbCrLf
blnFile = True
Loop
Close #intNewFile
End If
strFileName = cdl1.FileName
timerCheckFile.Enabled = True
strStats = txtFile.Text//******** saving a file
intNewFile = FreeFile
' cdl1.Filter = "Text file (*.txt)|*.txt"
cdl1.InitDir = "H:\ICS3M"
cdl1.Filter = "Text file (*.bat)|*.bat"
cdl1.Flags = cdlOFNOverwritePrompt
cdl1.ShowSave
If cdl1.FileName <> "" Then
Open cdl1.FileName For Output As #intNewFile
Print #intNewFile, txtFile.Text
Close #intNewFile
End If
strFileName = cdl1.FileName
__________________
Death smiles at us all. All a man can do is smile back. |
|
|
|
|
|
#13 | |
|
Programmer
Join Date: May 2006
Posts: 85
Rep Power: 3
![]() |
Quote:
__________________
Code Forums |
|
|
|
|
|
|
#14 |
|
Newbie
Join Date: May 2006
Posts: 10
Rep Power: 0
![]() |
not really that but the opening code i had screwed up majorley but do u really think thats non hackable to newbies?? or peeople who cant program???
|
|
|
|
|
|
#15 |
|
Programmer
|
Um, what? "non hackable to newbies" is a very broad definition. Since you're storing the data in text files, I'll assume it's plain text since you're storing the data that will be in the list box. So, if you want security, that's not what you do.
|
|
|
|
|
|
#16 |
|
Hobbyist Programmer
Join Date: Feb 2006
Posts: 214
Rep Power: 0
![]() |
It's been a while since I've used VB 6. However, the code I posted uses a common dialogue box. If you want to save to a file without a common dialogue box, then just do some research.
__________________
Death smiles at us all. All a man can do is smile back. |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|