Register | Login | |||||
Main
| Memberlist
| Active users
| ACS
| Commons
| Calendar
| Online users Ranks | FAQ | Color Chart | Photo album | IRC Chat |
| |
0 user currently in Programming. | 3 guests |
Acmlm's Board - I2 Archive - Programming - Help!! | | | |
Add to favorites | "RSS" Feed | Next newer thread | Next older thread |
User | Post | ||
jescis Red Goomba Level: 11 Posts: 4/38 EXP: 5724 For next: 261 Since: 03-15-04 From: Ledbetter, KY USA 42058 Since last post: 92 days Last activity: 90 days |
| ||
here is the code: Private Sub mnuFileOpen_Click() Dim sFile As String With dlgCommonDialog .DialogTitle = "Open" .CancelError = False 'The flags and attributes of the common dialog control .Filter = "All Files (*.*)|*.*|FDS Files (*.fds)|*.fds" .ShowOpen If Len(.FileName) = 0 Then Exit Sub End If sFile = .FileName FileNum = FreeFile End With 'ToDo: add code to process the opened file Get FileNum, &H66, sFile Text1.Print FileNum End Sub (edited by jescis on 03-19-04 11:02 AM) |
|||
dan Snap Dragon Level: 43 Posts: 8/782 EXP: 534516 For next: 30530 Since: 03-15-04 Since last post: 20 hours Last activity: 14 hours |
| ||
Um, what's the problem exactly? Or what do you want help with? It would help us answer you if told us either of these things. | |||
HyperLamer <||bass> and this was the soloution i thought of that was guarinteed to piss off the greatest amount of people Sesshomaru Tamaranian Level: 118 Posts: 76/8210 EXP: 18171887 For next: 211027 Since: 03-15-04 From: Canada, w00t! LOL FAD Since last post: 2 hours Last activity: 2 hours |
| ||
Originally posted by jescis I assume that's it, but he'll need to tell us what sort of processing he intends to do. Also you should be printing sFile, not FileNum. |
|||
jescis Red Goomba Level: 11 Posts: 5/38 EXP: 5724 For next: 261 Since: 03-15-04 From: Ledbetter, KY USA 42058 Since last post: 92 days Last activity: 90 days |
| ||
I'm trying to make a SMB2j text editor.Don't laugh or anything because it would be my first editor program,other than a hello world program it gives me "Bad file name or number (Error 52)" at the "Get FileNum, &H66, sFile " line. (edited by jescis on 03-19-04 11:14 AM) |
|||
Acmlm Torosu heh Level: 51 Posts: 228/1173 EXP: 981994 For next: 31944 Since: 03-15-04 From: Somewhere that isn't outside of Sherbrooke, Québec, Canada Since last post: 39 days Last activity: 3 hours |
| ||
Hmm ok, FreeFile just returns the first available file number? (like #1) So you give FileNum that value, then try to load something from it ... but where do you open the file? What the code does is this: - Show a "Open file" dialog where you can select *.* or *.fds - If you select no file, exit - Put the selected filename in sFile - Get a free file number and put it in FileNum - Load from that file number at offset $65 and store in the sFile variable Something isn't right, at the end Try this instead: FileNum = FreeFile Open sFile For Binary As FileNum And to load from the file, use the variable you want the data to go in, not the filename ... also, it'll load as many bytes as the variable can hold (like 4 bytes for integer) |
|||
jescis Red Goomba Level: 11 Posts: 6/38 EXP: 5724 For next: 261 Since: 03-15-04 From: Ledbetter, KY USA 42058 Since last post: 92 days Last activity: 90 days |
| ||
Ok, that worked, thanx. now, how do I put the text from the rom into a textbox? (edited by jescis on 03-19-04 01:25 PM) |
|||
dan Snap Dragon Level: 43 Posts: 10/782 EXP: 534516 For next: 30530 Since: 03-15-04 Since last post: 20 hours Last activity: 14 hours |
| ||
You could try these functions I wrote a few years ago to do just that. You need to setup the table within the module to use it. |
Add to favorites | "RSS" Feed | Next newer thread | Next older thread |
Acmlm's Board - I2 Archive - Programming - Help!! | | | |