No problem - I'm glad it's working now. =)
Actually, I didn't first realize how recent your post was when I replied. ><...
User Profile
Collapse
-
Use the InStr() function. It does exactly what you want - it tells you if (and at what position) a string exists within a (larger) string.
You use it like this:
InStr(StartPos, LargeString, StringToFind)
Give 1 as the StartPos for it to search from the begining of the large string. You can use larger numbers to get it to search from mid-way through the large string (to stop it finding things near the start). InStr()...Leave a comment:
-
A lot of that kind of low-level stuff will be HARDER (more effort required) to do in Visual Basic, because VB is meant for making more general programs (not so 'accurate', if you know what I mean - I can't word it properly) much more quickly.
Yes, please tell me about a RichTextBox! There isn't one in the VB6 toolbox by default, so if there is something in 'Project -> Components' which I should be ticking, please let me know what...Leave a comment:
-
Ah! You just need to surround the filename in quotes, like "this". ;)
Sorry, I didn't think to show that in my example....Leave a comment:
-
Huh? I really was trying to help.
I recommend you check the InStr(), which I mentioned in my previous post, and maybe also InStrRev() (which scans backwards through the string). Using Mid(), you can also extract a piece of text within a string.
[code=vb]
'Mid works like this: Mid(AllText, StartCharacter, NumberOfCharact ers)
Text = Mid("Something" , 4,2) 'Text becomes "et"
[/code]
...Leave a comment:
-
Hmm? Are you doing this within a sub/function?
e.g.
[code=vb]
Private Sub Form_Load()
AllTheCodeIPost ed
End Sub
[/code]Leave a comment:
-
You can use the Format() command.
StringOfYourNum ber = Format(YourNumb er, "0.0")
"0" represents a digit that will always be shown. It's like padding a number. "#" represents a digit that will be shown if it needs to be shown.
So...
Format(0.1, "#.#") gives ".1".
Format(0.1,"000 0.000") gives "0000.100".
I suggest you play...Leave a comment:
-
I think the word you want is 'variable' - something to store a value, right? ;)
You're wanting to make some kind of text (source code) editor in VB6 for another programming language?
Well, the first immediate problem I see is that I don't know about a 'rich text' control in VB6. You'd need something more than just a VB
TextBox control because you can't make specific parts of a TextBox's text be bold or of a different...Leave a comment:
-
Well, first you'll need to open the file for input, grab its contents and close the file.
[code=vb]
Dim FileID as integer 'Our handle to the open file
Dim WholeFile as string 'String which will contain entire contents of text file
FileID = FreeFile 'Pick the first available handle
Open FILENAME for input as FileID
WholeFile = Input(LOF(FileI D), #FileID)
'LOF() gives the length of the file, in bytes....Leave a comment:
-
Hi. Sorry for short reply, typing with my PSP and it's very tedious. I suggest you search this forum for "fmod sound spectrum" to find a full example I made in VB6 a few months ago. ;)
It's in thread 'Spectrum Dance'.
My example only shows lower bass freqs, but it's easy to change in commented code.Leave a comment:
-
Sorry about the delay, but the most recent part of the delay is because my I "S" P went down. Here's the finished example program. It's very basic. Make sure all files are extracted before running, especially the DLL (FMOD sound system) and the OGG (example audio file).
http://robbi-985.homeip.net:8000/hos...s/BassBars.zip
It's 1.22 MB. Sorry about the slow download speed.
EDIT: My ISP is pretty unreliable,...Leave a comment:
-
This can be done fairly easily using FMOD. I'll explain with a full example when I'm at my comp. Im the meantime, you both might want to search the forum for other tutorials I've made for FMOD on VB6.Leave a comment:
-
Heh, glad it helped. By the way, if you need to pass a single parameter with spaces, enclose that in speech-marks too. Otherwise they'll go through as separate ones, separated by the spaces. For example, if you want to make Notepad open a file in c:\the correct folder, you'd make the string for the shell to run be this:
"%SystemRoot%\s ystem32\notepad .exe" "c:\the correct folder\file.txt "
...Leave a comment:
-
Yes, curr_line on lines 49 and 50 should be curr_date (since curr_date became curr_line on line 48). Line 49 removes "DATE ", then line 50 removes any spaces, probably in case there was a space before "DATE " which he doesn't want to exist.
What sounds dodgy to me though is this removal of any and all spaces; what if there are meant to be spaces? If you want to remove only the space to the left of "DATE ",...Leave a comment:
-
This is based purely on my experience with shortcuts in Windows, but I think this is wrong...
"c:\path\file.e xe -parameters"
...and this is right:
"c:\path\file.e xe" -parameters
In other words, when you're setting that string, you need to do something like this:
chr(34)& "c:\path\file.e xe" & chr(34) & " -parameters"
(Character 34's the speech-mark)....Leave a comment:
-
Has anyone thought about using a joystick or gamepad as the input for a 'second pointer'? You can certainly access the mouse (or touchpad, etc) and joystick (or gamepad, etc) separately.Leave a comment:
-
DONE! :D
It took just about exactly 4 hours to make.
You control for each sound the volume and frequency (speed), stop and start.
For the music (not metronome) you also can make it not affect the pitch, while only changing the speed (tempo). Note that that adds a slight delay to the music though.
You can also start and stop both (metronome and music) at the same time.
http://robbi-985.homeip.net: 800...Leave a comment:
-
The FMOD music and sound effects system can do this (and much more). It's a really great combination of DLL and programming language code (including VB 6 modules) which I recommend to anyone trying to do anything with sound more than just play a single simple sound. The enourmous number of sound formats it supports is great too (the most notable probably being WAV, MP3, WMA, OGG and even tracker music files such as IT). If that hasn't convinced you...Leave a comment:
-
I know what Patr's talking about, and I'd like to know how to do this too.
Debasisdas has made an example of how to capture from a webcam and "display the live video in a picturebox". However, what Windows is actually doing is displaying the picture on top of the picture box (known as overlaying). Therefore the picturebox actually still is empty, meaning that GetPixel() will fail to give back colours of the camera's images, and SavePicture()...Leave a comment:
-
Out of the 3 computers I've tested the Timer on (different combinations of Windows XP, Vista, Intel and AMD processors), they are always accurate to exactly 15 mS.
As for actually issuing the mouse clicks, I'm sorry - I can't help. I only know how to position the mouse cursor on the screen, not simulate clicks. It would be useful for me too, to know this (and for people interested why - it's just for 'visual novel' style games which...Leave a comment:
No activity results to display
Show More
Leave a comment: