kk_lee69
发表于 2016-6-2 15:58:27
回复 15# userlong
.DrawPicture(.LoadPicture("C:\名5.jpg"),3000,10000, "10cm", "10cm", "500%", "500%")
userlong
发表于 2016-6-2 16:07:52
{:face (316):} 果然厉害。我看了你的资料 就是没有loadpicture.....汗颜
userlong
发表于 2016-6-2 16:09:42
所以还是给这种有用点{:face (303):}
kk_lee69
发表于 2016-6-2 16:11:15
回复 17# userlong
老實說這個不好用
太繁瑣無法設計 複雜報表
目前 我覺得銳浪的 最好用 也適合AU3 用
userlong
发表于 2016-6-2 16:32:44
銳浪?什么东西
userlong
发表于 2016-6-2 16:33:48
回复 19# kk_lee69
锐浪我没有详细的使用 和例子啊你能给些吗?
userlong
发表于 2016-6-2 16:36:05
回复 19# kk_lee69
.DrawPicture(.LoadPicture("123.bmp"),3000,10000, "4cm", "4cm", "100%", "100%")
这个一样要给详细路径吗?不能在同目录下直接认到吗?
kk_lee69
发表于 2016-6-2 16:37:51
回复 22# userlong
http://www.autoitx.com/forum.php?mod=viewthread&tid=26619&highlight=macgyver
userlong
发表于 2016-6-2 16:39:03
你给的这个没没有权限进入查看
kk_lee69
发表于 2016-6-2 16:43:50
回复 22# userlong
同目錄 不就是 @ScriptDir+"\檔案"
userlong
发表于 2016-6-3 10:53:59
回复 25# kk_lee69
高手帮我看看这个为什么。我按钮点提交打印预览界面出现了。但是只要在打印预览双击 拖动。然后主窗体就死掉了?
主窗体:
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <GUIScrollBars.au3>
#include <ScrollBarConstants.au3>
#include <ComboConstants.au3>
#include <GUIConstantsEx.au3>
#include <GUIListBox.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include "_pp.au3"
$cgspb_1 = GUICreate("单据", 1267, 713, 279, 130)
$cgyj_Button1 = GUICtrlCreateButton("提交", 112, 288, 75, 25)
GUICtrlSetOnEvent($cgyj_Button1, "kc")
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $cgyj_Button1
kc()
EndSwitch
WEnd
--------------------------------------------------------------------------------------------------------
打印窗体
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
Func kc()
#region ### START Koda GUI section ### Form=
$Form1 = GUICreate("打印预览", 601, 701)
$op = ObjCreate("VSPrinter8.VSPrinter.1")
$oh = GUICtrlCreateObj($op, 0, 0, 600, 700)
GUISetState(@SW_SHOW,$Form1)
With $op
; .preview = True;打印预览
.DocName = "打印"
.MarginLeft = 1000;左边距
.MarginRight = 1000;右边距
.MarginTop = 1000;上边距
.MarginBottom = 1000;下边距
.PaperSize = 9;页面大小 A4
.Orientation = 0;页面方向。横向,纵向
.StartDoc;页面开始
.SpaceAfter = 400;段落间距
.TextAlign = 0;文字对齐 0:靠左;1:居中;2:靠右
.FontName = "黑体";字体
.FontBold = True;字体加粗
.FontSize = 30;字号
.Paragraph = "标题";文字
.FontSize = 16
.Paragraph = "是好似好似好似hi实施时候死时候好似hi时尚" & _
"减肥的理解的是离开房间时看到附件里看的是解放路口的时间弗兰克"
.Paragraph = "Right now the margins are set as follows:"
.SpaceAfter = 0;段落间距
.AddTable("3000|1000", "项目|值", _
"左边距|" & Int(.MarginLeft) & ";" & _
"上边距|" & Int(.MarginTop) & ";" & _
"右边距|" & Int(.MarginRight) & ";" & _
"下边距|" & Int(.MarginBottom) & ";", 0xffffff)
.AddTable("3000|1000|1000", "项目|值", _
"左边距|" & Int(.MarginLeft) & ";" & _
"上边距|" & Int(.MarginTop) & ";" & _
"右边距|" & Int(.MarginRight) & ";" & _
"下边距|" & Int(.MarginBottom) & ";", 0xffffff)
.PenColor = 0x000000;画笔颜色,黑色
.BrushColor = 0xffffff;刷子颜色,白色
.PenStyle = 6
.PenWidth = 10;画笔宽度
.DrawLine(4000, 0, 4000, 17000);划线
.DrawLine(8000, 0, 8000, 18000);划线
.DrawLine(0, 4250, 12000, 4250);划线
.DrawLine(0, 8500, 12000, 8500);划线
.DrawLine(0, 12750, 12000, 12750);划线
.DrawCircle(3000,3000,200);画圆
.FontSize = 12
.Paragraph = "单位: 元"
.EndDoc;页面结束
EndWith
EndFunc
kk_lee69
发表于 2016-6-3 11:54:23
回复 26# userlong
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <GUIScrollBars.au3>
#include <ScrollBarConstants.au3>
#include <ComboConstants.au3>
#include <GUIConstantsEx.au3>
#include <GUIListBox.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
DIM $Form1
$cgspb_1 = GUICreate("单据", 1267, 713, 279, 130)
$cgyj_Button1 = GUICtrlCreateButton("提交", 112, 288, 75, 25)
GUICtrlSetOnEvent($cgyj_Button1, "kc")
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg(1)
Switch $nMsg
Case $GUI_EVENT_CLOSE
IF $nMsg=$Form1 THEN
GUIDelete($Form1)
Else
EXIT
EndIf
Case $cgyj_Button1
kc()
EndSwitch
WEnd
Func kc()
#region ### START Koda GUI section ### Form=
$Form1 = GUICreate("打印预览", 601, 701)
$op = ObjCreate("VSPrinter8.VSPrinter.1")
$oh = GUICtrlCreateObj($op, 0, 0, 600, 700)
GUISetState(@SW_SHOW,$Form1)
With $op
; .preview = True;打印预览
.DocName = "打印"
.MarginLeft = 1000;左边距
.MarginRight = 1000;右边距
.MarginTop = 1000;上边距
.MarginBottom = 1000;下边距
.PaperSize = 9;页面大小 A4
.Orientation = 0;页面方向。横向,纵向
.StartDoc;页面开始
.SpaceAfter = 400;段落间距
.TextAlign = 0;文字对齐 0:靠左;1:居中;2:靠右
.FontName = "黑体";字体
.FontBold = True;字体加粗
.FontSize = 30;字号
.Paragraph = "标题";文字
.FontSize = 16
.Paragraph = "是好似好似好似hi实施时候死时候好似hi时尚" & _
"减肥的理解的是离开房间时看到附件里看的是解放路口的时间弗兰克"
.Paragraph = "Right now the margins are set as follows:"
.SpaceAfter = 0;段落间距
.AddTable("3000|1000", "项目|值", _
"左边距|" & Int(.MarginLeft) & ";" & _
"上边距|" & Int(.MarginTop) & ";" & _
"右边距|" & Int(.MarginRight) & ";" & _
"下边距|" & Int(.MarginBottom) & ";", 0xffffff)
.AddTable("3000|1000|1000", "项目|值", _
"左边距|" & Int(.MarginLeft) & ";" & _
"上边距|" & Int(.MarginTop) & ";" & _
"右边距|" & Int(.MarginRight) & ";" & _
"下边距|" & Int(.MarginBottom) & ";", 0xffffff)
.PenColor = 0x000000;画笔颜色,黑色
.BrushColor = 0xffffff;刷子颜色,白色
.PenStyle = 6
.PenWidth = 10;画笔宽度
.DrawLine(4000, 0, 4000, 17000);划线
.DrawLine(8000, 0, 8000, 18000);划线
.DrawLine(0, 4250, 12000, 4250);划线
.DrawLine(0, 8500, 12000, 8500);划线
.DrawLine(0, 12750, 12000, 12750);划线
.DrawCircle(3000,3000,200);画圆
.FontSize = 12
.Paragraph = "单位: 元"
.EndDoc;页面结束
EndWith
EndFunc
userlong
发表于 2016-6-3 12:29:37
本帖最后由 userlong 于 2016-6-3 12:30 编辑
回复 27# kk_lee69
按照你这个 $cgspb_1 = GUICreate("单据", 1267, 713, 279, 130)
这个窗体还是会死掉。。。而且我发现 还是关闭打印那个窗口之后主窗体才死掉
kk_lee69
发表于 2016-6-3 13:01:18
回复 28# userlong
哪裡死掉每個按鈕都有作用
chzj589
发表于 2016-6-3 15:20:44
回复 29# kk_lee69
请问这个打印浏览控件能有什么作用???