topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Thursday December 12, 2024, 8:53 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Question: Resizing on-the-fly in Visual Basic (Express Edition, 2008)  (Read 3901 times)

wreckedcarzz

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 1,626
    • View Profile
    • Donate to Member
Hey fellow DCers...

Here with a strange, possibly not completable, probably confusing-and-complex-to-answer question. Here goes...

I have a VB application with various tabs, items on the tabs, and everything working as planned. However, on some tabs I have lots of content, and on others I have next to nothing. What I want to do is when the user clicks a tab, ANIMATE the GUI to resize to the needed size (like Apple Software Update).

Private Sub MyTab_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyTab.Click
        On Error Resume Next
        'I don't know what to put here
    End Sub

Anyone know how to do this? Or have anywhere to point me to? :tellme:

-Brandon

Renegade

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 13,291
  • Tell me something you don't know...
    • View Profile
    • Renegade Minds
    • Donate to Member
That... sounds... like a really bad idea... Can you imagine how annoying that would be? Unless you have a very good reason, I'd abandon that thought.

However, it's simple. Just set anchors for the controls, then resize from there in some loop with a timer. Here's some really crappy description of 1 thing you can do:

On timer tick:

someloopmechanism...

tab.Width += 1
tab.Height += 1
OscilateFormTransparency() ' a function to fade in/out

' Sleep for .1 seconds...
Application.DoEvents()
etc.

endsomeloop

etc.



But check at codeproject.com --- lots of stuff there to help out.
Slow Down Music - Where I commit thought crimes...

Freedom is the right to be wrong, not the right to do wrong. - John Diefenbaker