重庆分公司,新征程启航
为企业提供网站建设、域名注册、服务器等服务
画饼图的例子,
凤泉ssl适用于网站、小程序/APP、API接口等需要进行数据传输应用场景,ssl证书未来市场广阔!成为创新互联的ssl证书销售渠道,可以享受市场价格4-6折优惠!如果有意向欢迎电话联系或者加微信:028-86922220(备注:SSL证书合作)期待与您的合作!
Me.LoadDriveInfo(DrivesOnPc.Items(DrivesOnPc.SelectedIndex)) 计算比例大小
Me.Invalidate() 触发窗体绘图
'窗体画图(饼图)
Private Sub form3_paint(ByVal sender As System.Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles MyBase.Paint
'设定RECTANGLE结构变量,确定画图的范围及大小
Dim rect As Rectangle = New Rectangle(280, 20, 200, 200)
Dim rect2 As Rectangle = New Rectangle(270, 10, 400, 320)
Dim freelegend As Rectangle = New Rectangle(280, 300, 20, 20)
Dim usedlegend As Rectangle = New Rectangle(280, 275, 20, 20)
e.Graphics.DrawRectangle(Pens.Black, rect2)
e.Graphics.DrawLine(Pens.Black, 270, 260, 670, 260)
If Me.isSpaceInfoVailable = True Then
'填充椭圆图像(角度)
e.Graphics.FillPie(Brushes.Magenta, rect, 0, Sweep)
e.Graphics.FillPie(Brushes.Blue, rect, Sweep, 360 - Sweep)
'填充方形
e.Graphics.FillRectangle(Brushes.Magenta, freelegend)
e.Graphics.FillRectangle(Brushes.Blue, usedlegend)
e.Graphics.DrawString(
新建一个文件,写入下面的代码:
!doctype html
html
head
meta name="viewport" content="initial-scale=1.0, user-scalable=no" /
meta http-equiv="Content-Type" content="text/html; charset=gbk" /
titleBaidu Map V1.2/title
script type="text/javascript" src=";services=true"
!-- add baidu map api --
/script
/head
body
div id="container" style="width: 600px; height: 400px;"
/div
/body
/html
script type="text/javascript"
var map = new BMap.Map("container"); // new Map
var point = new BMap.Point(116.397128, 39.916527); // Location, (经度, 纬度)
map.centerAndZoom(point, 15); // show Map
// 添加缩放功能
map.enableScrollWheelZoom();
map.enableKeyboard();
/script
保存到程序exe同一目录下,文件名:map.html
然后BUTTON点击事件:
WebBrowser1.Navigate(Application.StartupPath "\map.html")
这样就可以了
ps:经纬度可以到百度地图官网去获取
或者到: 去生成代码
用crystal报表,文件——新建文件——crystal报表,然后根据向导建立