I figured I'd post a few lines of code for an app I have sitting on the taskbar and checking minute intervals. Maybe you'll find it useful...
Step 1: Create a timer control on your form and disable it by default. Set it for however m/s you want it to check the current time against the wakeup...
His exampe (the post above this one) is a great way to do milliseconds. If you want to do a longer time (i.e. minutes or hours), you'll want to use Time$ or Time and possibly Date$ or Date. Note: Time$/Time and Date$/Date give you different formats each and are not the same. Simply extract...
Couldn't you add a little code to the click event (or other) to see if a checkbox status changes---then set the selected property to false?
There's no chr$(27)!
vbModal is meant to stop the program from executing while the form is open. When you make it invisible it probably resets it to be non-modal, otherwise you'd never get focus back to your main form. It's probably a safeguard MS put in to keep you from having a program hang and not being able to...
Sounds like a confused VB IDE to me. You should just be able to go to Form1 (or whatever you named the main form) and change the Icon property to the file you want. It's a shame you had to go thru all that. I would've created a new project and cut/pasted the code, then remade the forms...
Shareware started back in the late 80's. Back then freeware used to be called "public domain" software. Shareware came about when people wanted to distribute programs but not sell them in stores. So, usually the programmer offered the program for a price and reaped the rewards of...
Here's how it's done with a KeyPress event...
Private Sub Text1_KeyPress(KeyAscii As Integer)
'KeyAscii stores the ASCII character code
'ASCII 97 to 122 = lowercase a thru z
'if within this range change to uppercase
'otherwise accept normal input
If KeyAscii > 96 And KeyAscii < 123 Then...
Look at the code more closely...
If DriveType = DRIVE_REMOVABLE Then
ret = SHFormatDrive(hWndOwner,DriveNum,SHFMT_ID_DEFAULT, SHFMT_OPT_FULL)
Else
MsgBox "This is not a floppy drive!",vbExclamation, "Format Floppy Disk"
End If
The above IF/THEN statement simply checks...
It makes all variables that don't have a dollar sign (i.e. not a string) into integers. Integers have no decimal point, just plain ole numbers. Anything with a decimal is rounded up to the next whole number. It's just an easy way of making QBasic treat all number variables as whole numbers.
Use page swapping. Look at the SCREEN statement in QBasic Help's INDEX section. You want to use the <apage> and <vpage>, which allow you to write your graphics to a hidden page, then switch to the page you wrote graphics to. You'll find it makes it smoother because you don't see it draw the...
As you probably have guessed, there's no built-in function to perform this task. So, you have to figure out a workaround. The examples above use the DIR command to give you a directory list with just filenames, no other info. This is the easiest way to do it. You then just parse the data...
You simply use the variable for the username like this:
UserName = "John Doe"
shell "regedit /s c:\" & UserName & "-pc.reg"
To add to QbasicKing's example...
If you do it like he specifies there's no way of organizing your data. Lets say you have some game data---weapons for instance. Each weapon has the same kind of attributes, but the attributes are different, which makes each weapon unique. Here's a basic...
Ah heck... I decided to post the code instead. Here's my text file viewer using random access files. Compile it and give it a file to read (i.e. myprogram.exe myfile.txt). Throw the largest text file you can at it. It won't even flinch.
'Readme.bas - a text viewer using a random access...
First of all, the reason your text is doing the a aa aaa thing is because you can only go to about line 20 in QBasic. Anything beyond that scrolls up because the lines below that autoscroll up. So, you have to keep this in mind.
As for the text editor... I made mine using random access files...
To expand on my post above:
Open App.Path & "\" & Date$ & ".txt" For Append As #2
StrAlerts = FrmSecurityView.TxtAlerts.Text
Write #2, StrAlerts
'Close #2
Results in 08-01-2003.txt being created or appended to.
Your fix is simple. Instead of using DATE use DATE$. VB retains the old QBasic DATE$ function which gives you the date in MM-DD-YYYY format. Simple as can be. DATE is the new VB function and uses MM/DD/YYYY format.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.