-
1 Attachment(s)
Open, Print and Close File I/O commands for visual basic
Hello members it is I again, ThEiMp, again so.
I need to know how to write the syntax of the EOF line in the Open and Close command block for File I/O process. I am trying to write a data file, but then i have to read it from the resource file library. this part i have done, but then just need to have the EOF process implemented into my project.
!! Thanks in advance !!
-
Re: Open, Print and Close File I/O commands for visual basic
Post the code inside code tags so we do not have to download, unzip, and load it to look at it.
-
Re: Open, Print and Close File I/O commands for visual basic
It is tough to make out what post #1 is trying to say.
Looking at the code, it appears to be a "dropper" extracting embedded JPEG resources to files. Just to turn around and use LoadPicture() on them. Similar goofiness for other files (.flv).
But it is playing a large number of reindeer games, transcoding binary data from ANSI to Unicode, and then using text I/O to write the file. Lots of garbage gets created in C:\temp which may not even exist on a lot of systems. Chaos!
Why not just throw all of this away?
People go to weird extremes to try to circumvent using an installer.
-
Re: Open, Print and Close File I/O commands for visual basic
Okay I will post the source code in code tags, here
-
Re: Open, Print and Close File I/O commands for visual basic
Code:
Option Explicit
'
Dim a As Integer
Dim Item1 As String
Dim PauseTime, Start, Finish, TotalTime
'
Public Sub Form_Activate()
On Error Resume Next
a = 0
With App
.TaskVisible = False
If .PrevInstance = False Then Exit Sub
If .PrevInstance = True Then Unload Main
End With
End Sub
Public Sub Form_Load()
On Error Resume Next
a = a + 1
Item1 = (StrConv(LoadResData("SEASON1", "EP" & a), vbUnicode))
MkDir ("C:\Temp\Video1234567890")
Blah Blah Blah Blah
Open ("C:\Temp\Video1234567890\Image1234567890.jpg") For Output As #1
Print #1, (StrConv(LoadResData("IMAGE", "DATA"), vbUnicode))
Close #1
With Main
.picBox.Picture = LoadPicture("C:\Temp\Video1234567890\Image1234567890.jpg")
.rtbText.TextRTF = (StrConv(LoadResData("TEXT", "DATA"), vbUnicode))
End With
With Main.CustomDialog1
.Action = 2
.Data = (StrConv(LoadResData("EP" & Item1, "SEASON1"), vbUnicode))
.DefaultFilter = "flv"
.FileName = "Video1234567890"
.Filter = "flv"
.FilterEnabled = False
.Path = "C:\Temp\Video1234567890"
End With
With Main.CustomDialog1
Open ("C:\Temp\Video1234567890\Video1234567890.flv") For Output As #1
Print #1, .Data
Close #1
End With
1 With Main
.Timer1.Interval = .Timer1.Interval - 1
PauseTime = 3
Start = Timer
Do While Timer < Start + PauseTime
DoEvents
Loop
Finish = Timer
TotalTime = Finish - Start
If TotalTime = 0 Then GoTo 2
2 .WMP.URL = ("C:\Temp\Video1234567890\Video1234567890.flv")
PauseTime = 3
Start = Timer
Do While Timer < Start + PauseTime
DoEvents
Loop
Finish = Timer
TotalTime = Finish - Start
If TotalTime = 0 Then GoTo 3
3 .picBox.Visible = False
End With
Item1 = ""
End Sub
Public Sub Form_Resize()
On Error Resume Next
Dim FormLeft As Long
Dim FormTop As Long
With Main
FormLeft = .Left
FormTop = .Top
.Left = FormLeft
.Top = FormTop
.Height = 7515
.Width = 15870
End With
End Sub
Public Sub Form_Unload(Cancel As Integer)
On Error Resume Next
Set Main = Nothing
RmDir ("C:\Temp\Video1234567890")
Unload Main
End Sub
-
Re: Open, Print and Close File I/O commands for visual basic
Like dilettante already stated, you use all kind of string conversions and text based file IO.
Your data is a movie, so it's not text and should NOT be handled with string functions.
-
Re: Open, Print and Close File I/O commands for visual basic
what about in binary data encoding
-
Re: Open, Print and Close File I/O commands for visual basic
Just get the data as a byte blob with "LoadResData("SEASON1", "EP" & a)"
Then dump it with file mode in binary
Code:
' Untested air code
Dim btData() As Byte
Dim fID As Integer
btData = LoadResData("SEASON1", "EP" & a)
fID = FreeFile
Open "C:\Temp\YourFile.flv" For Binary As #fID
Put #fID,,btData
Close #fID
-
Re: Open, Print and Close File I/O commands for visual basic
Thanks for the input, then matey
-
Re: Open, Print and Close File I/O commands for visual basic
My source code, looks like this now, so:
Code:
Dim aa As Integer
Dim Item2 As Byte
Blah Blah
Open ("C:\Temp\Video1234567890\Video1234567890.flv") For Binary As #1
Put #aa, , Item2
Close #1
The data file, inflates to about five bytes, so then something is happening there so. What is the EOF line looks like. I would have to use that to finish off the code block, I guess now???
-
Re: Open, Print and Close File I/O commands for visual basic
To start it should be a byte array, not a single byte.
Second you don't write EOF.
Code:
Dim btData() As Byte
Dim fID As Integer
btData = LoadResData("SEASON1", "EP" & a)
fID = FreeFile
Open "C:\Temp\YourFile.flv" For Binary As #fID
Put #fID,,btData
Close #fID
-
Re: Open, Print and Close File I/O commands for visual basic
yeah, Actually he can, but data corruption has an %99 chance of happening, I tried before by reading an 24 bit .BMP and sending through mscomm with inputmode=text
-
Re: Open, Print and Close File I/O commands for visual basic
yeah, He needs byte array, I think he doesnt have experience with low level.
-
Re: Open, Print and Close File I/O commands for visual basic
I can't remember the syntax of loading files, though
-
Re: Open, Print and Close File I/O commands for visual basic
For a binary file, you just preset the size of the array to what you are going to read from the file, and then just use "Get" to fill the array.
Something along these lines should work.
Code:
Open "c:\c\Alarm01.wav" For Binary As #1
ReDim btData(LOF(1) - 1) As Byte
Get #1, , btData
Close #1
-
Re: Open, Print and Close File I/O commands for visual basic
-
Re: Open, Print and Close File I/O commands for visual basic
-- For a 43.1MB file, it is taking nearly 34hours for it to import the data into the file, and then it's still working on it. Also it's still working on the file data size, also still. OMG what do i do, to import the data quickly, then so???
-
Re: Open, Print and Close File I/O commands for visual basic
Show the actual code you used
-
Re: Open, Print and Close File I/O commands for visual basic
Quote:
Originally Posted by
ThEiMp
-- For a 43.1MB file, it is taking nearly 34hours for it to import the data into the file, and then it's still working on it. Also it's still working on the file data size, also still. OMG what do i do, to import the data quickly, then so???
"Get" (in Binary mode) takes a second argument, at which byte to start reading.
So, read it in chunks.
it might even be an idea, to put the reading file stuff into an ActiveX-DLL, and use mutiple threads.
Filesize 40 MB
Thread 1 reads Byte 1 to 5M
Thread 2 reads 5M+1 to 10M
and so on....
-
Re: Open, Print and Close File I/O commands for visual basic
I can't believe that reading/writing a 43MB file can take up to 34 hours, that is 15 bytes per second
There must some other problem.
When working from home and connecting to the office network using WiFi then I thought access was slow, but that's at least 0,6MB per second.
-
Re: Open, Print and Close File I/O commands for visual basic
you just have to wait, i am sick with the flu and taking time off work, then so
-
Re: Open, Print and Close File I/O commands for visual basic
43MB, personally, I'd just read it all into memory in one chunk. That's not that big a file.
I read files that large all the time (both ASCII and binary). And, I've never timed it, but they don't take any time at all to read into a variable (I'd say less than a second).
---------------
And personally, IDK, but I'm thinking someone who doesn't know basic file I/O should either explore their VB6 F1's MSDN, and/or they should pull a BASIC programming book off their shelf. In many ways, this is one of the very first things you should learn, after figuring out what a variable is and how to write a loop.
-
Re: Open, Print and Close File I/O commands for visual basic
so then what is the source code to load a 43.1Mb plus or minus that size, into memory, then??? I really like to know about this one, thanks for the help, guys
-
Re: Open, Print and Close File I/O commands for visual basic
Quote:
Originally Posted by
passel
For a binary file, you just preset the size of the array to what you are going to read from the file, and then just use "Get" to fill the array.
Something along these lines should work.
Code:
Open "c:\c\Alarm01.wav" For Binary As #1
ReDim btData(LOF(1) - 1) As Byte
Get #1, , btData
Close #1
This is the most basic way to read a file in a single action.
-
Re: Open, Print and Close File I/O commands for visual basic
yeah but then something that i had over looked when writing the data file, which then to use the put command, instead of the get command, which works that much slower to read and write to the disk, which i am using to do this with
-
Re: Open, Print and Close File I/O commands for visual basic
here is my project source code as follows:
Code:
Public Sub Form_Load()
On Error Resume Next
a = a + 1
Item1 = (StrConv(LoadResData("SEASON1", "EP" & a), vbUnicode))
With Main.picBox
.ZOrder 0
End With
MkDir ("C:\Temp\Video1234567890")
With Main.CustomDialog1
.Action = 2
.Data = Item1
.FileName = "\Video1234567890.flv"
.Path = "C:\Temp\Video1234567890"
End With
Open ("C:\Temp\Video1234567890\Video1234567890.flv") For Binary As #1
ReDim btData(LOF(1) - 1) As Byte
Get #1, , Item1
Close #1
Open ("C:\Temp\Video1234567890\Video1234567890.flv") For Binary As #1
ReDim btData(LOF(1) - 1) As Byte
Put #1, , Item1
Close #1
With Main
.WMP.URL = ("C:\Temp\Video1234567890\Video1234567890.flv")
.picBox.ZOrder 1
End With
End Sub
-
Re: Open, Print and Close File I/O commands for visual basic
Quote:
Originally Posted by
ThEiMp
here is my project source code as follows:
Code:
Public Sub Form_Load()
On Error Resume Next
a = a + 1
Item1 = (StrConv(LoadResData("SEASON1", "EP" & a), vbUnicode))
With Main.picBox
.ZOrder 0
End With
MkDir ("C:\Temp\Video1234567890")
With Main.CustomDialog1
.Action = 2
.Data = Item1
.FileName = "\Video1234567890.flv"
.Path = "C:\Temp\Video1234567890"
End With
Open ("C:\Temp\Video1234567890\Video1234567890.flv") For Binary As #1
ReDim btData(LOF(1) - 1) As Byte
Get #1, , Item1
Close #1
Open ("C:\Temp\Video1234567890\Video1234567890.flv") For Binary As #1
ReDim btData(LOF(1) - 1) As Byte
Put #1, , Item1
Close #1
With Main
.WMP.URL = ("C:\Temp\Video1234567890\Video1234567890.flv")
.picBox.ZOrder 1
End With
End Sub
Are you trying to write to the temp file or read from it? Your code send to be opening a file, reading from it and then immediately writing back exactly what you have just read from it.
If you step through this code in a debugger what is happening?
-
Re: Open, Print and Close File I/O commands for visual basic
i thought that i had to convert it from the resource which is 2 Bytes long and then write the inflated file, which is something like 43.1Mb long
-
Re: Open, Print and Close File I/O commands for visual basic
Quote:
Originally Posted by
ThEiMp
i thought that i had to convert it from the resource which is 2 Bytes long and then write the inflated file, which is something like 43.1Mb long
You are making no sense. Think about this logically and take it step by step.
Code:
Item1 = (StrConv(LoadResData("SEASON1", "EP" & a), vbUnicode))
that line is loading what is presumably binary data into a variable called item1. This is probably incorrect anyway because if it is binary data yuo shouldn't be using StrConv on it. I am not a VB6 programmer anymore I know this because other people on this forum have already told you this
then you do
Code:
Open ("C:\Temp\Video1234567890\Video1234567890.flv") For Binary As #1
ReDim btData(LOF(1) - 1) As Byte
Get #1, , Item1
Close #1
These lines are opening a file and then reading from the file into the same item1 variable this is effectively going to overwrite the contents you incorrectly loaded in the first bit of your code.
after that the following lines
Code:
Open ("C:\Temp\Video1234567890\Video1234567890.flv") For Binary As #1
ReDim btData(LOF(1) - 1) As Byte
Put #1, , Item1
Close #1
are going to reopen the file you have just read into the variable item1, and then write the contents of item1 back to the file.
Seriously, what are you expecting to happen. This isn't a programming language problem, this is a simple matter of understanding how one thing follows on from another.
Have you tried debugging this? Have you tried to understand the logical flow of your commands, or are you just throwing code at the IDE and hoping for the best?
Finally, if the resource is 2 bytes long it is not going to inflate to a 43Mb file, no matter how many times you insist on believing you can perform compression of a video file that achieves almost infinite compression ratios this isn't happening.
-
2 Attachment(s)
Re: Open, Print and Close File I/O commands for visual basic
#1 - Sorry i am reading a visual basic resource file, which is in the project i am making, so.
#2 - I am using my zip control, i wrote for this type of 2 Byte compression, like so
-
Re: Open, Print and Close File I/O commands for visual basic
The is no 2 byte compression, maybe it’s a simplified hash code, but certainly not compression
-
Re: Open, Print and Close File I/O commands for visual basic
i have also built into it, cloaking of the ASCII data characters, in notepad/wordpad/textpad/word, etc
-
Re: Open, Print and Close File I/O commands for visual basic
Quote:
Originally Posted by
ThEiMp
#1 - Sorry i am reading a visual basic resource file, which is in the project i am making, so.
#2 - I am using my zip control, i wrote for this type of 2 Byte compression, like so
That makes no difference to what I asked / tried to explain. I tried to point out what your code was doing wrong, you replied by ignoring what I suggested.
Just try debugging your code, step through it in a debugger and see what happens.
Also, there is no such thing as 2 byte compression - you have had this explained to you many times before.
-
Re: Open, Print and Close File I/O commands for visual basic
well it's something like a hash tag encryption and cloaking, like that. i have run it through a debugger process in visual basic, step by step, even. then came out with not that much, to deal with errors. then there is something wrong with the Byte dimmed variable. shouldn't it be something like String or then something like a variant, then so. i have ReDimmed the variable, but then there wasn't anything to re dim, because i hadn't used it before, i had called it up, for execution.
-
Re: Open, Print and Close File I/O commands for visual basic
Is this like a clone of xiaoyao but on shrooms? I can't understand a word he's saying...
-
Re: Open, Print and Close File I/O commands for visual basic
very sorry, you can't understand me, but then i am trying to work it out, from here, so
-
Re: Open, Print and Close File I/O commands for visual basic
Quote:
Originally Posted by
ThEiMp
well it's something like a hash tag encryption and cloaking, like that
A "hash tag" is something you find on twitter, facebook, etc.
If you mean a "hash" then that is a type of checksum, it can be used to prove something hasn't been tampered with - it is not however encryption. You have had this explained on here many, many times - hashes are one way, you cannot decrypt a hash.
Encryption is a two way process, this does provide a way to go back to an original file from the encrypted version. This will not happen if you have "encrypted" your file to two bytes.
Quote:
Originally Posted by
ThEiMp
i have run it through a debugger process in visual basic, step by step,
So at any point in doing this did you pay attention to the contents of the item1 variable and how it changed? Did you pay attention to the logical order of the steps you are doing? Did you still not notice that you are reading from the temp file into your item1 variable before you are writing the item1 variable to the file? I honestly don't know how clearer I can make this in pointing out your mistake.
Quote:
Originally Posted by
ThEiMp
even. then came out with not that much, to deal with errors.
Debugging is a way to find logical errors
Quote:
Originally Posted by
ThEiMp
then there is something wrong with the Byte dimmed variable. shouldn't it be something like String or then something like a variant,
If your resource data is a binary file, it is a absolutely correct to declare it as a byte array, binary data is just bytes. Converting it to a string is just going to corrupt the data.
Quote:
Originally Posted by
ThEiMp
then so. i have ReDimmed the variable, but then there wasn't anything to re dim, because i hadn't used it before, i had called it up, for execution.
You had used it though, you load the contents of your resource into it at the very start of your routine. If you had actually stepped through your code in the debugger and looked at what it was doing and how the variables changed you would see what is happening. Just stepping through the debugger and not looking at what is going on is not debugging, it is just running your code very, very slowly.
-
Re: Open, Print and Close File I/O commands for visual basic
okay then now i understand you, matey
-
Re: Open, Print and Close File I/O commands for visual basic
I have been able to come up with the special source code for my de-encryption, then all i need to do now is to get the machine to use CPU Usage more aggressively and then not too much, but then something more like 8%, because it's using 1.2% of it's handler, right now as i am using the compile-time version of my product, then working it through a stress test of the sorts
-
Re: Open, Print and Close File I/O commands for visual basic
Wow, so you managed to de-encrypt your 2 bytes values to all different episodes of series and movies!
Imagine that all the data in the universe can be stored in just 65536 different 2 byte value pairs.
No more need for huge data storage devices!
-
Re: Open, Print and Close File I/O commands for visual basic
-
Re: Open, Print and Close File I/O commands for visual basic
Quote:
Originally Posted by
Arnoutdv
Wow, so you managed to de-encrypt your 2 bytes values to all different episodes of series and movies!
Imagine that all the data in the universe can be stored in just 65536 different 2 byte value pairs.
No more need for huge data storage devices!
So there is a new twist -- the 2 byte data is compressed *and* encrypted.
cheers,
</wqw>
-
Re: Open, Print and Close File I/O commands for visual basic
De-hash was maybe a better term :)
-
Re: Open, Print and Close File I/O commands for visual basic
Quote:
Originally Posted by
Arnoutdv
De-hash was maybe a better term :)
re-hash for when you hash the hash for that extra security.
-tg
-
Re: Open, Print and Close File I/O commands for visual basic
Didn't know there was any such thing as "de-hashing". (ummm, *whispers*: "By definition, a hash is irreversible.")
But, I also didn't know there was compression that could compress infinite videos with all their frames down into 2 Bytes (i.e., 65536 possibilities). (*whispers again*: "Even a single movie will have far more than 65536 frames, and that only allows one pixel per frame." *chuckles*)
But I seem to remember that we've been down this road before with ThEiMp.
-
Re: Open, Print and Close File I/O commands for visual basic
Quote:
Originally Posted by
Elroy
But I seem to remember that we've been down this road before with ThEiMp.
LOL, yeah. But I think in the past it was 20 bytes, so a 10x improvement on the compression side since last time.
I think the end goal is to distribute an exe file that contains pirated movies/tv shows embedded in the .exe file itself, which has always made me uneasy about these threads in the first place.
-
Re: Open, Print and Close File I/O commands for visual basic
Quote:
Originally Posted by
OptionBase1
I think the end goal is to distribute an exe file that contains pirated movies/tv shows embedded in the .exe file itself, which has always made me uneasy about these threads in the first place.
WOW, why would anyone want to do that? I mean, movies are already compressed close to the max, and there are plenty of excellent video players out there.
And if we're truly dealing with pirated stuff, who in the world would go anywhere near an EXE? I mean, they'd already be doing something nefarious, so they'd be on high-alert for virus/trojan/spoofing activity. Most MP? type data is fairly safe, but an EXE is pretty much the exact opposite of that.
Ohhhh, wait. I've got it. It's ThEiMp who's trying to spread some virus/etc with his EXEs. Nowwww, I see. :)
-
Re: Open, Print and Close File I/O commands for visual basic
I am NOT a virus programmer, okay then matey
-
Re: Open, Print and Close File I/O commands for visual basic
It can help if you can explain why you want to store films and series inside your application.
It's very odd and inconvenient to do this. If you already have to movies and series on your disk then just use a media player, like VNC.
If it's about building a movie database, with descriptions and ratings about films and series then you don't store the content also in the database.
-
Re: Open, Print and Close File I/O commands for visual basic
-- I might be able to store the ratings, comments in a XHTML document, using coding tags, like the <P>, etc???
-
Re: Open, Print and Close File I/O commands for visual basic
Or just use a MDB file.
Define the columns you need and use ADO to update and read the database content.
I believe this thread has some sample code:
https://www.vbforums.com/showthread....y-on-each-text
More threads about a movie database on vbForums:
https://www.google.com/search?q=site...movie+database
-
Re: Open, Print and Close File I/O commands for visual basic
Thanks for the input, dear forum member
-
Re: Open, Print and Close File I/O commands for visual basic
still my variable data is a = 0. this however is set then the form is activated. then when the form load has been called, it now equals a = a+ 1. not sure what this means by???
-
Re: Open, Print and Close File I/O commands for visual basic
Quote:
Originally Posted by
ThEiMp
still my variable data is a = 0. this however is set then the form is activated. then when the form load has been called, it now equals a = a+ 1. not sure what this means by???
When does the form_activated event run? Have you done anything to see when this is running and what order? Try printing a debug mesage in the Activate event and then another in the Load event to see what is happening. Or you could just read the documentation https://learn.microsoft.com/en-us/pr...ectedfrom=MSDN
There is nothing magic about writing code, apart from turning 43Mb file into a 2 byte compressed file, it is all about understanding a problem and then writing code to solve this problem. When things go wrong you need to debug your code, use breakpoints, print things to the output window, write to a log file, etc.
-
Re: Open, Print and Close File I/O commands for visual basic
well yes i know about debugging my source code. but then there is the problem with the variables, i am calling them and they are wrong values, when i make them a special value, even
-
Re: Open, Print and Close File I/O commands for visual basic
Quote:
Originally Posted by
ThEiMp
well yes i know about debugging my source code. but then there is the problem with the variables, i am calling them and they are wrong values, when i make them a special value, even
So how are you debugging your code? What have you actually done to see what is happening? Have you tried anything I suggested? If you simply print a message to the debug window in the load and activate events you will see the problem.
-
Re: Open, Print and Close File I/O commands for visual basic
yeah, i have been using the: Debug.Print command and Beep, also
-
Re: Open, Print and Close File I/O commands for visual basic
Quote:
Originally Posted by
ThEiMp
yeah, i have been using the: Debug.Print command and Beep, also
So where did you use Debug.Print? What did it tell you? Did you do as I suggested and put them in the activated and load events?
Why are you using the activated event? When do you think it is raised?
It is like getting blood from a stone trying to get anything useful from you.
If you have done a Debug.Print in the two events you should see what order / when they fire, that would explain one of your problems.
If you had stepped through your form load event and paid attention to the item1 variable's contents and how it changed, that would have explained another of your problems.
If you had used the debugger and inspected the item1 after you load the initial value then you would have seen using StrConv on the binary data wasn't doing what you though it was doing, that would have explained another of your problems.
-
Re: Open, Print and Close File I/O commands for visual basic
This is the source of your project, have a look at my comments.
You never ever did something with our remarks about using Strings instead of Byte arrays
Code:
Option Explicit
'
Dim a As Integer
Dim Item1 As String
Dim PauseTime, Start, Finish, TotalTime
'
Public Sub Form_Activate()
On Error Resume Next
a = 0
With App
.TaskVisible = False
If .PrevInstance = False Then Exit Sub
If .PrevInstance = True Then Unload Main
End With
End Sub
Public Sub Form_Load()
On Error Resume Next
a = a + 1
'<< Comment by Arnoutdv: DON"T use StrConv: Store the data in a byte array!
Item1 = (StrConv(LoadResData("SEASON1", "EP" & a), vbUnicode))
'>>
MkDir ("C:\Temp\Video1234567890")
'<< Comment by Arnoutdv: DON"T use StrConv: Save the byte array as binary
Open ("C:\Temp\Video1234567890\Image1234567890.jpg") For Output As #1
Print #1, (StrConv(LoadResData("IMAGE", "DATA"), vbUnicode))
'>>
Close #1
With Main
.picBox.Picture = LoadPicture("C:\Temp\Video1234567890\Image1234567890.jpg")
.rtbText.TextRTF = (StrConv(LoadResData("TEXT", "DATA"), vbUnicode))
End With
With Main.CustomDialog1
.Action = 2
'<< Comment by Arnoutdv: DON"T use StrConv: Use the byte array
.Data = (StrConv(LoadResData("EP" & Item1, "SEASON1"), vbUnicode))
'>>
.DefaultFilter = "flv"
.FileName = "Video1234567890"
.Filter = "flv"
.FilterEnabled = False
.Path = "C:\Temp\Video1234567890"
End With
With Main.CustomDialog1
'<< Comment by Arnoutdv: It's binary data, don't use For Output, use For Binary and Put
Open ("C:\Temp\Video1234567890\Video1234567890.flv") For Output As #1
Print #1, .Data
'>>
Close #1
End With
1 With Main
.Timer1.Interval = .Timer1.Interval - 1
'<< Comment by Arnoutdv: Bogus code...
PauseTime = 3
Start = Timer
Do While Timer < Start + PauseTime
DoEvents
Loop
Finish = Timer
TotalTime = Finish - Start
If TotalTime = 0 Then GoTo 2
'>>
2 .WMP.URL = ("C:\Temp\Video1234567890\Video1234567890.flv")
'<< Comment by Arnoutdv: Bogus code...
PauseTime = 3
Start = Timer
Do While Timer < Start + PauseTime
DoEvents
Loop
Finish = Timer
TotalTime = Finish - Start
If TotalTime = 0 Then GoTo 3
'>>
3 .picBox.Visible = False
End With
Item1 = ""
End Sub
Public Sub Form_Resize()
On Error Resume Next
Dim FormLeft As Long
Dim FormTop As Long
With Main
FormLeft = .Left
FormTop = .Top
.Left = FormLeft
.Top = FormTop
.Height = 7515
.Width = 15870
End With
End Sub
Public Sub Form_Unload(Cancel As Integer)
On Error Resume Next
Set Main = Nothing
RmDir ("C:\Temp\Video1234567890")
Unload Main
End Sub
-
Re: Open, Print and Close File I/O commands for visual basic
WHAT is this???????????????????
Code:
Public Sub Form_Resize()
On Error Resume Next
Dim FormLeft As Long
Dim FormTop As Long
With Main
FormLeft = .Left
FormTop = .Top
.Left = FormLeft
.Top = FormTop
.Height = 7515
.Width = 15870
End With
End Sub