如何将form的四个直角变成有弧度的角??还有一个不规则窗体的问题,能不能将窗体变成某个图像的形状,其余部分透明。例如,做个猫形窗体,屏幕上只看到一只猫。@_@ 

解决方案 »

  1.   

    第一个问题,两个API函数CreateRoundRectRgnSetWindowRgn其他问题改变Region参照第一个问题做就可以了
      

  2.   

    HRGN CreateRoundRectRgn(
      int nLeftRect,      // x-coordinate of the region's upper-left corner
      int nTopRect,       // y-coordinate of the region's upper-left corner
      int nRightRect,     // x-coordinate of the region's lower-right corner
      int nBottomRect,    // y-coordinate of the region's lower-right corner
      int nWidthEllipse,  // height of ellipse for rounded corners
      int nHeightEllipse  // width of ellipse for rounded corners
    );前四个就是你的长方形的的坐标,后面两个就是圆角的宽和高了
    CreateRoundRectRgn(0,0,100,100,20,20)后面一个问题,以前看到网上有说的,忘了
      

  3.   

    谢谢 无处不在 的帮忙。但是我发现一个问题。就是用窗体的width,和height替换函数的参数后,四个角只有一个,或两个有弧度,其余的角还是直角,这是怎么回事阿。
      

  4.   

    这个问题解决了~~先用scalex,转换下form的vbtwips为vbpixels就行了。但是,问题又来了... 比如窗体是有边框的,当改变窗体为有弧度角窗体时,弧度部分的边框就消失了,窗体整体看上去,很不协调.. 如何在整形窗体后,使得窗体被边框如同被修改前的那样?