Results 1 to 3 of 3

Thread: How can i paint a usercontrol(Plz read the full details inside to help me)

  1. #1

    Thread Starter
    Hyperactive Member toughcoder's Avatar
    Join Date
    Nov 2002
    Location
    Near, Very Near
    Posts
    340

    Unhappy How can i paint a usercontrol(Plz read the full details inside to help me)

    Hi,
    Now I have a procedure ApplyEffect which draws some stuff on a usercontrol. I have placed a call to this procedure inside the Usercontrol_Paint event, when i size the usercontrol to increase it, the function works gr8, but when i reduces the size, the procedure is not called coz the usercontrol has not to be painted when we reduce itz size(that i know). Now where should i place a call to the procedure so that it gets called even when i reduce the size of the usercontrol. I hope u guyz have clearly understood my porblem. (Rick Bull, i expect a reply from u)
    If Not VB Then Exit
    ------------------------------------------------
    visit me @ http://mzubair.50g.com/

  2. #2
    Frenzied Member
    Join Date
    Jul 2002
    Posts
    1,370
    Code:
    Private Declare Function SendMessage Lib "user32"  _
    Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As _
    Long, ByVal wParam As Integer, ByVal lParam As Any) As Long
    Dim retval as long
    Private Const WM_PAINT = &HF
    
    retval=SendMessage(UserControl1.hWnd, WM_PAINT, 0&,0&,0&)

  3. #3

    Thread Starter
    Hyperactive Member toughcoder's Avatar
    Join Date
    Nov 2002
    Location
    Near, Very Near
    Posts
    340
    thanx jim
    If Not VB Then Exit
    ------------------------------------------------
    visit me @ http://mzubair.50g.com/

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