这种报表怎么绘制呢?
本帖最后由 omegabomb 于 2009-8-14 11:19 编辑类似于这种报表,怎么绘制呢?最好有个例子看看,光GUICtrlCreateGraphic不知怎么搞 本帖最后由 顽固不化 于 2009-8-14 14:35 编辑
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
Dim $Y =
Dim $M =
Dim $N =
Dim $MaxX = 600, $MaxY = 400
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", $MaxX + 100, $MaxY + 100, -1, -1)
For $i = 1 To 6
GUICtrlCreateLabel($N, 55, 63 + $MaxY / 5 * ($i - 1), 20, 17)
GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
Next
For $i = 1 To 12
GUICtrlCreateLabel($Y[$i], 78 + $MaxX / 25 * ($i * 2 - 1), 475, 30, 17)
GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
Next
$P = GUICtrlCreateGraphic(80, 70, $MaxX, $MaxY)
GUICtrlSetBkColor(-1, 0xffffff)
GUICtrlSetColor(-1, 0)
GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0x000000, 0xcccccc)
For $i = 1 To 5
GUICtrlSetGraphic(-1, $GUI_GR_RECT, 0, $MaxY / 5 * ($i - 1), $MaxX, $MaxY / 5)
Next
GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0x000000, 0x6666cc)
For $i = 1 To 12
GUICtrlSetGraphic(-1, $GUI_GR_RECT, $MaxX / 25 * ($i * 2 - 1), $MaxY * (1 - 1 / 250 * $M[$i]), $MaxX / 25, $MaxY / 250 * $M[$i])
Next
For $i = 1 To 12
GUICtrlCreateLabel($M[$i], 77 + $MaxX / 25 * ($i * 2 - 1), $MaxY * (1 - 1 / 250 * $M[$i]) + 55, 30, 17)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
Next
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd 大哥,你太强了,我得好好消化一下 呵呵,学习下
正好要帮朋友做个客户管理系统,借鉴这个显示销量的绘图非常直观 这样不是更好.
页:
[1]