I made a ProgressBar Control, and I want to automaticly resize it to the width the user specified, I used Karl's code:
to resize... it DOES rezise, but to the Form's Height & width, not to the controls...Code:height = UserControl.ScaleHeight width = UserControl.ScaleWidth
this is the code to paint the ProgressBar (api calls not included)
Where handle is the form's .hwndCode:Public Sub CreateProgress(Vertical As Boolean, Handle As Long) '// Create the progress bar lnghWnd = CreateWindowEX(0, PROGRESS_CLASS, "", WS_VISIBLE _ Or WS_CHILD Or lngType, 0, 0, 0, 0, Handle, _ 0&, App.hInstance, 0&) '// Set the bar's parent Call SetParent(lnghWnd, Handle) '// Create another window lnghWnd = CreateWindowEX(0, PROGRESS_CLASS, "", WS_VISIBLE _ Or WS_CHILD Or lngType, 0, 0, 0, 0, Handle, _ 0&, App.hInstance, 0&)
I use this code to create the progbar from a form:
CreatProgress False, Me.Hwnd
Anyone know's why it doesn't work???
Thanks in Advance!
Jop
[Edited by Jop on 05-23-2000 at 09:18 AM]


Reply With Quote