Results 1 to 4 of 4

Thread: SetParent

  1. #1

    Thread Starter
    Fanatic Member pvbangera's Avatar
    Join Date
    Sep 2001
    Location
    Mumbai, India
    Posts
    961

    SetParent

    i have got a mdi form, on which i have a status bar and a progress bar. while doing any process i want to show the progress bar in one of the panels of the status bar.

    i used the setparent method, but the prgress bar is not fitting into the panel of the status bar.

    pls guid me.

    regards,
    prakash

  2. #2

    Thread Starter
    Fanatic Member pvbangera's Avatar
    Join Date
    Sep 2001
    Location
    Mumbai, India
    Posts
    961
    there's no one to answer this question??

  3. #3
    Lively Member
    Join Date
    Aug 2001
    Posts
    109
    SetParent wont do that... setparent is for making a window a child of your MDI form...

  4. #4
    Addicted Member darrenl's Avatar
    Join Date
    Jul 2000
    Location
    Portsmouth, UK
    Posts
    148
    There is no autosize, you have to do it yourself.

    I use a common procedure like this
    Code:
    Sub SetupProgress(Parenthwnd As Long, Top As Long, height As Long, Left As Long, width As Long)
    
        On Error Resume Next
        OldProgress = SetParent(fMainForm.ProgressBar1.hwnd, Parenthwnd)
        
        fMainForm.ProgressBar1.height = height
        fMainForm.ProgressBar1.Left = Left
        fMainForm.ProgressBar1.Top = Top
        fMainForm.ProgressBar1.width = width
        fMainForm.ProgressBar1.Visible = True
    
    End Sub
    and when I want to set up my progress bar onto a panel on my MDI form, in this example panel 3.
    Code:
        SetupProgress fMainForm.StatusBar1.hwnd, 0, fMainForm.StatusBar1.height, fMainForm.StatusBar1.Panels(3).Left, fMainForm.StatusBar1.Panels(3).width
    Dazzer

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width