-
Hi Everybody!
I want to resize controls on a form resize event.
I did this many times and it workes great. Now I tried it with a listbox on an Addin and it just resizes one time. After it the resizeevent seems to be activated, but the list1.width = frmmain.width doesn't take effect!
-
Just a Guess:
Maybe the addin doesn't allow it to be resized more then once
-
HM I can resize the form as often as I want to.
-
Hey You Guys! What's up! I don't think I need a guru to get this answered? What do I do wrong?
Can nobdy help me?
-
Misan:
What addin?
Is it a addin to be published? What's the code? No one can solve a problem if you don't give them specifics!
-
I'm doing an Addin for VB.
Hm the code really doesn't matter I think. It's one addin to load/unload another addin, what helpes me saving time programming the other one! All those Addins are just to help me programming. (kind of school project)
Actually I tried it on 3 different addins. And it never worked.
So all I need is the code to resize controls on a form of an Addin!
Thanks
-
No idea. I've used a blank addin form with a blank listbox and the following code:
Code:
Public VBInstance As VBIDE.VBE
Public Connect As Connect
Option Explicit
Private Sub CancelButton_Click()
Connect.Hide
End Sub
Private Sub Form_Resize()
List1.Height = Me.ScaleHeight
End Sub
Private Sub OKButton_Click()
MsgBox "AddIn operation on: " & VBInstance.FullName
End Sub
And it resized perfectly. I didn't change anything in the designer and only set the border property to 2-Sizable.
-
Strange strange strange. Acutaly u use the code I used (what else should we do).
I set some propertys of course, but I didn't think it will change something. I'll give it a try.
Thanks for the effort.
Cu
-
Hey, I used just this code, and it didn't work. It just resizes it once!
so I added this to the resize event:
Code:
MsgBox List1.Height
MsgBox frmAddIn.ScaleHeight
I know the code flag is stupid here, but I never tried it before!
and surprise, the frmmAddin.scaleHeight didn't change after the first resize!
Thanks!
-
Hm something is definetely wrong with the form!
I just added a timer, that does the resizing for me. Nothing!
So I tried to make a
frmaddin.caption = str(frmmaddin.scaleheight)
but nothing changed.
Than I added a beep to the timercode, to test if it ever arrives there, and it does, it beeps all the time.
Cu