private sub button1_click(byval sender as system.object, byval e as system.eventargs) handles button1.click
dim g as graphics
g = picturebox1.creategraphics()
'移动坐标原点(那么原点下就变成了(20,pictruebox1.height\2))
g.translatetransform(20, picturebox1.height \ 2)
'绘制x轴与y轴
'y轴
g.drawline(pens.black, 20, -picturebox1.height \ 2, 20, picturebox1.height \ 2)
'x轴
g.drawline(pens.black, -20, 0, picturebox1.width, 0)
'正弦函数
dim x, y as double
for x = 0 to 400 step 0.002
y = 60 * math.sin(2 * 3.1415926 * x / 200)
g.drawline(pens.blue, cint(x), 0, cint(x), cint(y))
application.doevents()
next
for x = 0 to 400 step 0.002
y = 60 * math.sin(2 * 3.1415926 * x / 200)
g.drawline(pens.red, cint(x), 0, cint(x), cint(y))
application.doevents()
next
end sub
Java Asp PHP .Net XML C/C++ CGI VB Jsp J2ee J2se J2me EJB Servlet Tomcat Resin Struts Weblogic Eclipse ANT GUI JMS Web servise IDEA Webphere Hibernate Spring Jboss Applet Swing Socket Javamail Perl Ajax P2P 安全 模式 框架 测试 开源 游戏
Windows XP Windows 2000 Windows 2003 Windows Me Windows 9.x Linux UNIX 注册表 操作系统 服务器 应用服务器