mybmp = (Bitmap)pictureBox1.Image;

蓝蓝云海2022-10-04 11:39:541条回答

mybmp = (Bitmap)pictureBox1.Image;
我用了,但是不知道确切的含义
主要是想知道这种语法是什么意思
为什么括号在前面?

已提交,审核后显示!提交回复

共1条回复
ainana511 共回答了24个问题 | 采纳率95.8%
那是强制转换
将pictureBox1.Image强制转换为bitmap类型
等同于mybmp =pictureBox1.Image as Bitmap;
1年前

相关推荐

英语翻译This flag is set when the bitmap has an Alpha channel (t
英语翻译
This flag is set when the bitmap has an Alpha channel (that is,per-pixel alpha).Because this API uses premultiplied alpha,the red,green and blue channel values in the bitmap must be premultiplied with the alpha channel value.
崔雨13141年前1
ooyoo110110 共回答了12个问题 | 采纳率100%
当位图含有Alpha通道时(即逐像素alpha),此标志被设定.因为该API使用预乘的alpha通道,所以位图中的红、绿、蓝通道值必须与alpha通道值预乘.
英语翻译You do not need to account for separators in the bitmap
英语翻译
you do not need to account for separators in the bitmap because this function does not assign image indexes for separators.if your *** has buttons at positions 0,1,and 3 and a separator at position 2,the images at positions 0,1,and 2 in your bitmap are assigned to the buttons at positions 0,1,and 3,respectively.
789re1年前3
小北tuzi 共回答了14个问题 | 采纳率92.9%
你不需要将分隔符算入位图中,因为本函数不会为分隔符分配图像索引.如果你的工具栏上位置0、1、3上有按钮而位置2上有一个分隔符,你的位图中位于位置(就是索引)0、1、2的图像会分别被分配给在位置0、1、3上的按钮.