DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

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

wreckedcarzz

  • Still lurking. Still an anthro.
  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 1,629
    • Participated in NANY Challenge Twice
    • Coding Snacks
    • Furry Fandom Badge - Furry Fandom
    • Linux User
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).

Code
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

  • Tell me something you don't know...
  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 13,291
    • Participated in NANY Challenge Three Times
    • Furry Fandom Badge - Furry Fandom
    • Linux User
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

Original address: https://www.donationcoder.com/forum/index.php?topic=11815.0