
VB line函数用法
picturebox控件里有个line函数object.Line[Step](x1,y1)[Step]-(x2,y2),[color],[B][F]我想问的是最后的[B]...
picturebox控件里有个line函数
object.Line [Step] (x1, y1) [Step] - (x2, y2), [color], [B][F]
我想问的是最后的[B][F]什么意思,怎么用
最好举个例子说明,谢谢 展开
object.Line [Step] (x1, y1) [Step] - (x2, y2), [color], [B][F]
我想问的是最后的[B][F]什么意思,怎么用
最好举个例子说明,谢谢 展开
3个回答
展开全部
你试下
Form1.Line (1, 1)-(2000, 2000)
Form1.Line (1, 1)-(2000, 2000), , B
Form1.Line (1, 1)-(2000, 2000), , BF
然后就知道了
第一个是画线
第二个是画空心矩形
第三个是画实心矩形
Form1.Line (1, 1)-(2000, 2000)
Form1.Line (1, 1)-(2000, 2000), , B
Form1.Line (1, 1)-(2000, 2000), , BF
然后就知道了
第一个是画线
第二个是画空心矩形
第三个是画实心矩形
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
注释:
原 形void far line(int x0, int y0, int x1, int y1)
程序例:
#include "graphics.h"
#include "stdlib.h"
int main(void)
{
/* request auto detection */
int gdriver = DETECT, gmode, errorcode;
int xmax, ymax;
/* initialize graphics and local variables */
initgraph(&gdriver, &gmode, "");
/* read result of initialization */
errorcode = graphresult();
/* an error occurred */
if (errorcode != grOk)
{
printf("Graphics error: %s\n",
grapherrormsg(errorcode));
printf("Press any key to halt:");
getch();
exit(1);
}
setcolor(getmaxcolor());
xmax = getmaxx();
ymax = getmaxy();
/* draw a diagonal line */
line(0, 0, xmax, ymax);
/* clean up */
getch();
closegraph(); /*关闭图形模式*/
return 0;
}
#line
命令# line改变__LINE__ 与__FILE__的内容,它们是在编译程序中预先定义的标识符。
命令的基本形式如下:
# line number["filename"]
其中的数字为任何正整数,可选的文件名为任意有效文件标识符。行号为源程序中当前行号,文件名为源文件的名字。命令# line主要用于调试及其它特殊应用。
举例:
例如,下面说明行计数从1 0 0开始;printf( ) 语句显示数1 0 2,因为它是语句#line 100后的第3行。
#line 100 /* 初始化行计数器* /
main ( ) /* 行号100 */
{ /* 行号101 */
p r i n t f ( " % d \ n " ,__LINE__ ) ; /* 行号102 */
}遗传学 长分散核因子
在matlab命令窗口输入doc line,将获得一下帮助信息:(也可在命令窗口下输入help line获得帮助)
line(X,Y)
line(X,Y,Z)
line(X,Y,Z,'PropertyName',PropertyValue,...)
line('PropertyName',PropertyValue,...) low-level-PN/PV pairs only
h = line(...)
较常见的使用方法:
line([起点横坐标,终点横坐标],[起点纵坐标,终点纵坐标]),
例line([1,2],[3,4])将画出(1,3)到(2,4)的一条直线,而不是(1,2)到(3,4)。
当line(a,b)中,a b是相同大小的矩阵时,将会在对应的每一列做一条直线。
当line(a,b,c)时,相应地会在三维图中画一条线。
a b c 均为2XN矩阵。
原 形void far line(int x0, int y0, int x1, int y1)
程序例:
#include "graphics.h"
#include "stdlib.h"
int main(void)
{
/* request auto detection */
int gdriver = DETECT, gmode, errorcode;
int xmax, ymax;
/* initialize graphics and local variables */
initgraph(&gdriver, &gmode, "");
/* read result of initialization */
errorcode = graphresult();
/* an error occurred */
if (errorcode != grOk)
{
printf("Graphics error: %s\n",
grapherrormsg(errorcode));
printf("Press any key to halt:");
getch();
exit(1);
}
setcolor(getmaxcolor());
xmax = getmaxx();
ymax = getmaxy();
/* draw a diagonal line */
line(0, 0, xmax, ymax);
/* clean up */
getch();
closegraph(); /*关闭图形模式*/
return 0;
}
#line
命令# line改变__LINE__ 与__FILE__的内容,它们是在编译程序中预先定义的标识符。
命令的基本形式如下:
# line number["filename"]
其中的数字为任何正整数,可选的文件名为任意有效文件标识符。行号为源程序中当前行号,文件名为源文件的名字。命令# line主要用于调试及其它特殊应用。
举例:
例如,下面说明行计数从1 0 0开始;printf( ) 语句显示数1 0 2,因为它是语句#line 100后的第3行。
#line 100 /* 初始化行计数器* /
main ( ) /* 行号100 */
{ /* 行号101 */
p r i n t f ( " % d \ n " ,__LINE__ ) ; /* 行号102 */
}遗传学 长分散核因子
在matlab命令窗口输入doc line,将获得一下帮助信息:(也可在命令窗口下输入help line获得帮助)
line(X,Y)
line(X,Y,Z)
line(X,Y,Z,'PropertyName',PropertyValue,...)
line('PropertyName',PropertyValue,...) low-level-PN/PV pairs only
h = line(...)
较常见的使用方法:
line([起点横坐标,终点横坐标],[起点纵坐标,终点纵坐标]),
例line([1,2],[3,4])将画出(1,3)到(2,4)的一条直线,而不是(1,2)到(3,4)。
当line(a,b)中,a b是相同大小的矩阵时,将会在对应的每一列做一条直线。
当line(a,b,c)时,相应地会在三维图中画一条线。
a b c 均为2XN矩阵。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询