Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. cgfiend

    How do you change the .exe icon?

    It's possible to start two IDE's separate from each other and copy/paste controls. I've done it before. CGFiend [There's no chr$(27)!]
  2. cgfiend

    Sleep without locking up program

    Woops! In the IF/THEN of my code it should be StartMin = Mid$(Time$, 4, 2), not StartSec = Mid$(Time$, 4, 2). lol CGFiend [There's no chr$(27)!]
  3. cgfiend

    Sleep without locking up program

    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...
  4. cgfiend

    Sleep without locking up program

    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...
  5. cgfiend

    ListBox Selected Item

    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)!
  6. cgfiend

    Form loses modal property when made invisible

    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...
  7. cgfiend

    How do you change the .exe icon?

    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...
  8. cgfiend

    freeware or shareware

    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...
  9. cgfiend

    text1_keypress event

    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...
  10. cgfiend

    Format

    Look at the code more closely... If DriveType = DRIVE_REMOVABLE Then ret = SHFormatDrive(hWndOwner,DriveNum,SHFMT_ID_DEFAULT, SHFMT_OPT_FULL) Else MsgBox &quot;This is not a floppy drive!&quot;,vbExclamation, &quot;Format Floppy Disk&quot; End If The above IF/THEN statement simply checks...
  11. cgfiend

    How can I save the records of a game in QB?

    Oak, you're the man. :o) I didn't know you could do that! We're all here to learn.
  12. cgfiend

    Defint A-Z

    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.
  13. cgfiend

    Do I need to use CLS?

    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...
  14. cgfiend

    Files insdide a folder

    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...
  15. cgfiend

    variables

    You simply use the variable for the username like this: UserName = &quot;John Doe&quot; shell &quot;regedit /s c:\&quot; & UserName & &quot;-pc.reg&quot;
  16. cgfiend

    How can I save the records of a game in QB?

    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...
  17. cgfiend

    text editor

    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...
  18. cgfiend

    text editor

    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...
  19. cgfiend

    Save a textfile as date

    To expand on my post above: Open App.Path & &quot;\&quot; & Date$ & &quot;.txt&quot; For Append As #2 StrAlerts = FrmSecurityView.TxtAlerts.Text Write #2, StrAlerts 'Close #2 Results in 08-01-2003.txt being created or appended to.
  20. cgfiend

    Save a textfile as date

    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.

Part and Inventory Search

Back
Top