Link to home
Start Free TrialLog in
Avatar of SilentBob
SilentBobFlag for Hong Kong

asked on

Clearing immediate window with code (VB6)

I still haven't worked out how to do this.  Anyone know?


Thanks.
Avatar of josephfluckiger
josephfluckiger

I've never found a with a clearscreen command, but hey if you can't beat em, join em, fight fire with fire yada yada yada...

    Dim f As Integer
    For f = 1 To 50
        Debug.Print vbCrLf & vbCrLf & vbCrLf & vbCrLf & vbCrLf
    Next f

This loops through and prints a 5 blank lines to the debug window 100 times, until all the contents are scrolled off the screen. It works as long as the cursor is at the bottom of the screen.

Avatar of SilentBob

ASKER

yeah, I've seen that trick before, but don't really like it.  My cursor is generally not at the bottom of the screen, and if I'm gonna move it manually, I may as well clear the screen by hand too.  Plus, the cursor ends up at the bottom of the screen instead of at the start.  Thanks anyway.

ASKER CERTIFIED SOLUTION
Avatar of Dang123
Dang123

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Dang123,

The VBcode helper app that I found at the bottom of your article was a big help. http://www.vbcodehelper.com

It lets you count the lines of code in your app, clear the immediate window, auto-set tab order of your controls etc. It's a super tool. It costs $59, but I think I might bite the bullet and buy it.

thx,

Joe
Thanks for the help guys.
Glad I could help, thanks for the A!