Results 1 to 4 of 4

Thread: Can you Timer.Tick, Remove a Control & a Hint

  1. #1

    Thread Starter
    Member VB6 to Vb2010's Avatar
    Join Date
    Dec 2010
    Posts
    38

    Can you Timer.Tick, Remove a Control & a Hint

    Two Questions:
    1.) I would like to cause a Timer.Tick event in code. I know you can use PerformClick to cause a Click event. Is there a way to do the same with a timer?
    2.) I have several "TextBoxes" listed as being on a "Form" but they cannot be seen. I have copied and pasted these during the design phase but have renamed the copies since. Is there a way to purge the unseen TextBoxes?

    Hint: If you have "Windows 7", at the desktop, press <CTRL><SHIFT> and Rotate the Wheel on the Mouse. This will re-size the Icons on the desktop. "THIS ALSO WORKS IN THE VB2010 IDE" and allows you to Zoom the code window.

  2. #2
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,102

    Re: Can you Timer.Tick, Remove a Control & a Hint

    If you are using XP, hold down Ctrl and rotate the wheel and you will zoom the window, too.

    There are few reasons why you would want to trigger a tick. The only really valid one would be for certain kinds of testing. For every other case, take whatever code you have in the tick event handler, copy it into a sub, then call that sub from the tick event handler and anywhere else you want it to occur.

    There are several ways to purge the textboxes, some are easier than others. The easies is probably to go to the Document Outline view (found under View|Other Windows). That will show you all the controls. Select the one(s) you want to delete and delete them.
    My usual boring signature: Nothing

  3. #3

    Thread Starter
    Member VB6 to Vb2010's Avatar
    Join Date
    Dec 2010
    Posts
    38

    Re: Can you Timer.Tick, Remove a Control & a Hint

    Thank you.
    I looked at "Document Outline view" it contains all the visible controls I expected. A bit more information: it is when I Click the pull down arrow at the top of "Property" window where I see the unwanted "TextBoxes" listed. These "TextBoxes" are not seen in the "Document Outline view ".

  4. #4

    Thread Starter
    Member VB6 to Vb2010's Avatar
    Join Date
    Dec 2010
    Posts
    38

    Re: Can you Timer.Tick, Remove a Control & a Hint

    I found an answer to the "Timer" question, this may help others. I had a Timer.Tick happen every 10 seconds. To get this event to trigger I set the Timer.Interval = 100 i.e. 1/10th sec in another "Sub". I then I added Timer.Interval =10000 in the Timer.Tick Handler.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width