Results 1 to 3 of 3

Thread: workaround to make controls in forms semi-translucent

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2013
    Posts
    894

    workaround to make controls in forms semi-translucent

    I have an idea for simulating translucency of controls containers, please tellme if it won't work.

    The idea is to add the capability of usercontrol objects placed in the forms to has translucency property.

    So, if a form has a background image/skin, and is placed on top controls, by example usercontrol1, with something drawed in it like a button, but that button to be translucent, so the background image from the form layer can be seen through the control.

    The idea in steps.

    with AUTODRAW = TRUE

    1) make the button/or usercontrol control invisible. Doing it from inside the usercontrol class CODE, maybe get the control names, and call parent.controlname.visible=false

    2) capture/screenshot the client area of the parent form (by giving th function the hWnd of the parent Window).

    3) clip and copy the rectangle are where the usercontrol is suppose to be. From the captured image, to the background of the usercontrol (render).

    5) add on top of that what is required to draw the control specifiyng that you want translucent pencils.

    6) show the control.

    slowness maybe? anyone tried? It will work include if the target form to screenshot is out of the screen boundary, partially or totally?.

  2. #2

  3. #3
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    8,598

    Re: workaround to make controls in forms semi-translucent

    You might to take a look at layered windows.
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena

    Copy/move files using Windows Shell | I'm not wanted

    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

Tags for this Thread

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