Other Software > Developer's Corner
Question: Resizing on-the-fly in Visual Basic (Express Edition, 2008)
(1/1)
wreckedcarzz:
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:
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.
Navigation
[0] Message Index
Go to full version