mutleey

Form printing with good quality

16 posts in this topic

Hello everybody, I have a problem here ... I need to generate a form of sale and print quality using the form I could do is not getting good, I created a window without borders with the fields I need, then use the function _ScreenCapture_CaptureWnd () to generate a print of this window and send the image to the printer using the UDF printMGv2.au3, the problem is that to get a good quality I would have to create a huge window to get the print, any suggestions to print this form with a good quality?
thank you...

example of the form it takes:

 

ImgTemp.jpg

Share this post


Link to post
Share on other sites



Hi,

I can imagine when printing a form via PrtScr you are not going to get the best quality..

Is there a possibility to go a different route, like creating a PDF or using excel to create a form?

I personally use excel to build forms as it allows for simpler form filling automation ...

Bill

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Thank you, to start the window was what I thought best, most had not considered the possibility of a PDF or Excel.

Still not getting good results with these methods mentioned, I think the best way would be to create the image (bmp or jpg) with GDI + however I'm picking up a lot ... maybe an experienced member in GDI + as the UEZ can shed some light.

Edited by mutleey

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Your uploaded image has a dim. of 624 x 796 pixels (96 dpi) -> 16.5 x 21.0 cm; 6.48 x 8.28 inches. On a DIN A4 paper and portrait format it takes approx. 66% of the paper.

When you print that image from an ext. program such as IrfanView for example, how is the print out quality?

 

From https://www.prepressure.com/library/paper-size/din-a4:

Quote

At 300 ppi (pixels per inch) the image needs to be 2480 x 3508 pixels. This is the required resolution for quality offset printing that will be viewed from a short distance (such as books, brochures, magazines, calenders,…). For photo books it is also the optimum resolution but a somewhat lower pixel count (250 dpi) is acceptable for great looking photographs.

At 150 ppi the image needs to be 1240 x 1754 pixels. This is the minimum resolution for newspapers or posters viewed from a fairly short distance.

 

 

Edited by UEZ
1 person likes this

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Even using IrfanView printing is too bad, as I mentioned above I created a GUI with the fields needed and used the _ScreenCapture_CaptureWnd() function to generate the bmp image and then sent to the printer, to be good like you even mentioned I would have create a huge window more thought into creating bmp using GDI + for then would have set a large image 2480 x 3508 pixels perhaps ... the problem is that I could not add the rectangles in the image created.

thanks for the answer.

Edited by mutleey

Share this post


Link to post
Share on other sites

mutleey,

Are you sure it is the document and not printer settings?

kylomas


Forum Rules         Procedure for posting code

Share this post


Link to post
Share on other sites

kylomas,

Yes, as the UEZ comments the way I did the image is low resolution, and the way that I would have to create a huge GUI to get good results.

Share this post


Link to post
Share on other sites

Did you print the image with modifying the print size (e.g. best fit, stretch, ...) in the printer settings? 


Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯

Share this post


Link to post
Share on other sites

...it is not depending on printer settings...

THIS

example printer.jpg

is the "original" picture-quality sended to the printer. Which printer in the world makes gold from shi* ???

If you want a more "clearer" (printable) Screenshot, try to change your windows settings of the font/cleartype. What looks "good" onto screen (cleartype) is not implicitly a good printout.

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

UEZ yes I used the stretch to fill the entire sheet so the image lost the quality, the window that generated the printscreen has 624x796 pixels.

AndyG yes is not the printer to determine the quality and the image already has a low resolution.

 

I do not have much experience with GDI+ one more push already help, for example create this GUI with these rectangles and labels.

 

ex.jpg

Edited by mutleey

Share this post


Link to post
Share on other sites

#11 ·  Posted (edited)

Can you post the test GUI code from post #1?

 

Edited by UEZ

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯

Share this post


Link to post
Share on other sites

#12 ·  Posted

@ mutleey, did you read what i wrote? CLEARTYPE is the problem! It makes the font which you see onto your monitor/screen "smoother" and generates those "subpixels" where are responsible of the bad printout! Try to disable cleartype and show us the result.

http://www.thewindowsclub.com/disable-font-smoothing-windows

http://superuser.com/questions/297455/toggle-cleartype-windows-7

Share this post


Link to post
Share on other sites

#13 ·  Posted (edited)

@Mutley, não é exatamente o que você queria, mas é disso que estou falando...

Criar uma imagem de fundo, e adicionar os controles necessários, esse exemplo é básico, mas pode ser o início de uma solução.

Após a composição da imagem, você pode imprimir normalmente.

A melhor ideia seria criar uma imagem pronta, com o formulário vazio, e imprimir na imagem apenas as informações, assim fica mais rápido também.

 

This example it is a toy, to create, move, resize, delete and set color to many Contols.

In this example, it work with GuiCtrlCreateLabel, but can be adapted to any control.

The Mod()'s function it's a attempt to move a Control to 8 to 8 pixels only, for example, not 1 to 1.

If you not want this way/recurse, only comment delete the lines have Mod() function.

If you want to improve this function, it's is welcome.

Use Secondary mouse button, to Add, Delete, Set Color and export to PNG.

Use Primary over the control to Move or Resize.

 

 

;~ #AutoIt3Wrapper_AU3Check_Parameters= -q -d -w 1 -w 2 -w 3 -w- 4 -w 5 -w 6 -w- 7
;~ #Tidy_Parameters=/sf
; #FUNCTION# ====================================================================================================================
; Name ..........: No name
; Description ...: Allow create, move, resize, delete and set color a GuiCtrlCreateLabel and export to PNG image
; Syntax ........: 
; Parameters ....: 
; Return values .: 
; Author ........: Luigi
; Example .......: 
; ===============================================================================================================================
#include-once
#include <Array.au3>
#include <GUIConstantsEx.au3>
#include <File.au3>
#include <WindowsConstants.au3>
#include <StaticConstants.au3>
#include <WinAPI.au3>
#include <GuiMenu.au3>
#include <WinAPIGdi.au3>
#include <Misc.au3>
#include <GDIPlus.au3>

OnAutoItExitRegister("OnExit")

Opt("GUIOnEventMode", 1)
Opt("GUIEventOptions", 1)
Opt("MustDeclareVars", 1)


Global $aGuiSize[2] = [800, 600]
Global $sGuiTitle = "GuiTitle"
Global $hGui
Global $hUm, $hDois
Global $aCursor, $aMouse[5], $aMove[6], $arr, $size
Global $iLimit = 6
Global $aCursor2, $aMouse2[5]
Global $SUM, $DX, $DY
Global $hDummy, $hDummyContext, $hDummyContextMenu
Global $focus

_GDIPlus_Startup()
Global $hBitmap
Global $hContext
Global $hBrush = _GDIPlus_BrushCreateSolid()
Global $hFormat, $hFamily, $hFont, $tLayout, $aInfo


Global $hPen
$hPen = _GDIPlus_PenCreate()



Global Const $UP = 1, $RIGHT = 2, $DOWN = 4, $LEFT = 8
Global Const $UP_RIGHT = $UP + $RIGHT, $UP_LEFT = $UP + $LEFT, $DOWN_RIGHT = $DOWN + $RIGHT, $DOWN_LEFT = $DOWN + $LEFT

$hGui = GUICreate($sGuiTitle, $aGuiSize[0], $aGuiSize[1], -1, -1)
GUISetOnEvent($GUI_EVENT_CLOSE, "Quit")
GUISetBkColor(0xFFFFFF, $hGui)

_CreateDummy($hDummy, $hDummyContext, $hDummyContextMenu, "Add=Context_Add;Del=Context_Del;Color=Context_Color;Image=Context_CreateImage")

Global $aNode[1] = [0]
Global $SID = IniRead("label.ini", "config", "id", 1)

Global $NODES = IniReadSection("label.ini", "objetos")
If IsArray($NODES) Then
    ReDim $NODES[UBound($NODES, 1)][3]
Else
    Global $NODES[1][3] = [[0]]
EndIf

If IsArray($NODES) Then
    For $ii = 1 To $NODES[0][0]
        NewObj($NODES[$ii][0], $NODES[$ii][1], $ii)
    Next
EndIf

Func NewObj($ID = 0, $input = 0, $ii = 0)
    If $ID Then
        $input = StringSplit($input, ",", 2)
        $NODES[$ii][2] = GUICtrlCreateLabel($ID, $input[0], $input[1], $input[2], $input[3], $SS_SUNKEN)
        GUICtrlSetBkColor($NODES[$ii][2], Number($input[4]))
    Else
        Local $color = NewColor()
        $aCursor = GUIGetCursorInfo($hGui)

        $aCursor[0] -= Mod($aCursor[0], 20) + 10
        $aCursor[1] -= Mod($aCursor[1], 20) + 10


        Local $new = GUICtrlCreateLabel($SID, $aCursor[0], $aCursor[1], 40, 40, $SS_SUNKEN)
        GUICtrlSetBkColor($new, $color)
        $SID += 1
        IniWrite("label.ini", "config", "id", $SID)
        IniWrite("label.ini", "objetos", $SID, ",,,," & $color)
        _ArrayAdd2d($NODES, $SID, "", $new)
    EndIf
EndFunc   ;==>NewObj

Func NewColor()
    Return "0x" & Hex(Random(0, 255, 1), 2) & Hex(Random(0, 255, 1), 2) & Hex(Random(0, 255, 1), 2)
EndFunc   ;==>NewColor

Func _ArrayAdd2d(ByRef $arr, $mOpt0 = Default, $mOpt1 = Default, $mOpt2 = Default, $mOpt3 = Default, $mOpt4 = Default, $mOpt5 = Default, $mOpt6 = Default, $mOpt7 = Default)
    $arr[0][0] = UBound($arr, 1)
    Local $iCol = UBound($arr, 2)
    ReDim $arr[$arr[0][0] + 1][$iCol]
    If @NumParams - 1 < $iCol Then $iCol = @NumParams - 1
    For $ii = 0 To $iCol - 1
        $arr[$arr[0][0]][$ii] = Eval("mOpt" & $ii)
    Next
EndFunc   ;==>_ArrayAdd2d

GUICtrlSetState($hUm, $GUI_ONTOP)
;~ _WinAPI_BringWindowToTop(GUICtrlGetHandle($hUm))

GUICtrlSetBkColor($hUm, 0x336633)
GUICtrlSetBkColor($hDois, 0x996633)

GUISetState(@SW_SHOW, $hGui)


While Sleep(25)
    $aCursor = GUIGetCursorInfo($hGui)
    If IsArray($aCursor) Then
        If $aCursor[3] Then
            _GUICtrlMenu_TrackPopupMenu($hDummyContextMenu, $hGui)
        EndIf
        $focus = $aCursor[4] ? $aCursor[4] : 0
        If $aCursor[2] Then
            If $aCursor[4] Then
                $aMouse[4] = $aCursor[4]
                $arr = ControlGetPos($hGui, "", $aCursor[4])
                $aMove[0] = $arr[0] - $aCursor[0]
                ConsoleWrite("[" & $aMove[0] & "] [" & $arr[0] & "] [" & $aCursor[0] & "]" & @LF)
                $aMove[1] = $arr[1] - $aCursor[1]

                $aCursor2 = GUIGetCursorInfo($hGui)

                Switch $SUM
                    Case $DOWN
                        GUISetCursor(11, 1, $hGui)
                        $DX = $aCursor2[1] - $arr[3]
                        While IsArray($aCursor2) And $aCursor2[2]
                            $aCursor2 = GUIGetCursorInfo($hGui)
                            If ($aCursor2[1] <> $aMouse2[1]) Then
                                ControlMove($hGui, "", $aCursor[4], $arr[0], $arr[1], $arr[2], $aCursor2[1] - $DX)
                                $aMouse2[1] = $aCursor2[1]
                                _WinAPI_RedrawWindow($hGui, 0, 0, $RDW_INVALIDATE)
                            EndIf
                        WEnd
                    Case $UP
                        GUISetCursor(11, 1, $hGui)
                        $aMouse2[1] = $aCursor2[1]
                        While IsArray($aCursor2) And $aCursor2[2]
                            $aCursor2 = GUIGetCursorInfo($hGui)
                            If ($aCursor2[1] <> $aMouse2[1]) Then
                                $size = $aMouse2[1] - $aCursor2[1]
                                $arr[1] -= $size
                                $arr[3] += $size
                                ControlMove($hGui, "", $aCursor[4], $arr[0], $arr[1], $arr[2], $arr[3])
                                $aMouse2[1] = $aCursor2[1]
                                _WinAPI_RedrawWindow($hGui, 0, 0, $RDW_INVALIDATE)
                            EndIf
                        WEnd
                    Case $RIGHT
                        GUISetCursor(13, 1, $hGui)
                        $DY = $aCursor2[0] - $arr[2]
                        While IsArray($aCursor2) And $aCursor2[2]
                            $aCursor2 = GUIGetCursorInfo($hGui)
                            If ($aCursor2[0] <> $aMouse2[0]) Then
                                ControlMove($hGui, "", $aCursor[4], $arr[0], $arr[1], $aCursor2[0] - $DY, $arr[3])
                                $aMouse2[0] = $aCursor2[0]
                                _WinAPI_RedrawWindow($hGui, 0, 0, $RDW_INVALIDATE)
                            EndIf
                        WEnd
                    Case $LEFT
                        GUISetCursor(13, 1, $hGui)
                        $aMouse2[0] = $aCursor2[0]
                        While IsArray($aCursor2) And $aCursor2[2]
                            $aCursor2 = GUIGetCursorInfo($hGui)
                            If ($aCursor2[0] <> $aMouse2[0]) Then
                                $size = $aMouse2[0] - $aCursor2[0]
                                $arr[0] -= $size
                                $arr[2] += $size
                                ControlMove($hGui, "", $aCursor[4], $arr[0], $arr[1], $arr[2], $arr[3])
                                $aMouse2[0] = $aCursor2[0]
                                _WinAPI_RedrawWindow($hGui, 0, 0, $RDW_INVALIDATE)
                            EndIf
                        WEnd
                    Case $UP_RIGHT
                        GUISetCursor(10, 1, $hGui)
                        $aMouse2[1] = $aCursor2[1]
                        $DY = $aCursor2[0] - $arr[2]
                        While IsArray($aCursor2) And $aCursor2[2]
                            $aCursor2 = GUIGetCursorInfo($hGui)
                            If ($aCursor2[1] <> $aMouse2[1]) Or ($aCursor2[0] <> $aMouse2[0]) Then
                                $size = $aMouse2[1] - $aCursor2[1]
                                $arr[1] -= $size
                                $arr[3] += $size
                                $arr[2] = $aCursor2[0] - $DY
                                ControlMove($hGui, "", $aCursor[4], $arr[0], $arr[1], $arr[2], $arr[3])
                                $aMouse2[0] = $aCursor2[0]
                                $aMouse2[1] = $aCursor2[1]
                                _WinAPI_RedrawWindow($hGui, 0, 0, $RDW_INVALIDATE)
                            EndIf
                        WEnd
                    Case $DOWN_RIGHT
                        GUISetCursor(12, 1, $hGui)
                        $DY = $aCursor2[0] - $arr[2]
                        $DX = $aCursor2[1] - $arr[3]
                        While IsArray($aCursor2) And $aCursor2[2]
                            $aCursor2 = GUIGetCursorInfo($hGui)
                            If ($aCursor2[0] <> $aMouse2[0]) Or ($aCursor2[1] <> $aMouse2[1]) Then
                                $arr[2] = $aCursor2[0] - $DY
                                ControlMove($hGui, "", $aCursor[4], $arr[0], $arr[1], $arr[2], $aCursor2[1] - $DX)
                                $aMouse2[0] = $aCursor2[0]
                                $aMouse2[1] = $aCursor2[1]
                                _WinAPI_RedrawWindow($hGui, 0, 0, $RDW_INVALIDATE)
                            EndIf
                        WEnd
                    Case $UP_LEFT
                        GUISetCursor(12, 1, $hGui)
                        $aMouse2[0] = $aCursor2[0]
                        $aMouse2[1] = $aCursor2[1]
                        While IsArray($aCursor2) And $aCursor2[2]
                            $aCursor2 = GUIGetCursorInfo($hGui)
                            If ($aCursor2[0] <> $aMouse2[0]) Or ($aCursor2[1] <> $aMouse2[1]) Then
                                $size = $aMouse2[1] - $aCursor2[1]
                                $arr[1] -= $size
                                $arr[3] += $size
                                $size = $aMouse2[0] - $aCursor2[0]
                                $arr[0] -= $size
                                $arr[2] += $size
                                ControlMove($hGui, "", $aCursor[4], $arr[0], $arr[1], $arr[2], $arr[3])
                                $aMouse2[0] = $aCursor2[0]
                                $aMouse2[1] = $aCursor2[1]
                                _WinAPI_RedrawWindow($hGui, 0, 0, $RDW_INVALIDATE)
                            EndIf
                        WEnd
                    Case $DOWN_LEFT
                        GUISetCursor(10, 1, $hGui)
                        $aMouse2[0] = $aCursor2[0]
                        $DX = $aCursor2[1] - $arr[3]
                        While IsArray($aCursor2) And $aCursor2[2]
                            $aCursor2 = GUIGetCursorInfo($hGui)
                            If ($aCursor2[0] <> $aMouse2[0]) Or ($aCursor2[1] <> $aMouse2[1]) Then
                                $size = $aMouse2[0] - $aCursor2[0]
                                $arr[0] -= $size
                                $arr[2] += $size
                                ControlMove($hGui, "", $aCursor[4], $arr[0], $arr[1], $arr[2], $aCursor2[1] - $DX)
                                $aMouse2[0] = $aCursor2[0]
                                $aMouse2[1] = $aCursor2[1]
                                _WinAPI_RedrawWindow($hGui, 0, 0, $RDW_INVALIDATE)
                            EndIf
                        WEnd
                    Case Else
                        GUISetCursor(9, 1, $hGui)
                        While IsArray($aCursor2) And $aCursor2[2]
                            $aCursor2 = GUIGetCursorInfo($hGui)
                            If ($aCursor2[0] <> $aMouse2[0]) Or ($aCursor2[1] <> $aMouse2[1]) Then
                                $aCursor2[0] = $aCursor2[0] - Mod($aCursor2[0], 20) ;+ $aMove[0]
                                ConsoleWrite("[" & $aCursor2[0] & "] [" & $aMove[0] & "] [" & $aCursor2[0] - Mod($aCursor2[0], 20) & "]" & @LF)
                                $aCursor2[1] = $aCursor2[1] - Mod($aCursor2[1], 20); + $aMove[1]
                                $aMouse2[0] = $aCursor2[0]
                                $aMouse2[1] = $aCursor2[1]

                                ControlMove($hGui, "", $aCursor[4], $aCursor2[0], $aCursor2[1], $arr[2], $arr[3])
                                _WinAPI_RedrawWindow($hGui, 0, 0, $RDW_INVALIDATE)
                            EndIf
                        WEnd
                EndSwitch

                GUISetCursor(6, 1, $hGui)
            Else

            EndIf
        Else
            If $aCursor[4] Then
                $arr = ControlGetPos($hGui, "", $aCursor[4])
                $aMove[0] = $arr[0] - $aCursor[0]
                $aMove[1] = $arr[1] - $aCursor[1]
                $SUM = 0

                If $aMove[0] <= 0 And $aMove[0] > -$iLimit Then $SUM += $LEFT
                If $aMove[0] <= -($arr[2] - $iLimit) And $aMove[0] >= -$arr[2] Then $SUM += $RIGHT
                If $aMove[1] <= 0 And $aMove[1] > -$iLimit Then $SUM += $UP
                If $aMove[1] <= -($arr[3] - $iLimit) And $aMove[1] >= -$arr[3] Then $SUM += $DOWN

                Switch $SUM
                    Case $UP
                        GUISetCursor(11, 1, $hGui)
                    Case $DOWN
                        GUISetCursor(11, 1, $hGui)
                    Case $RIGHT
                        GUISetCursor(13, 1, $hGui)
                    Case $UP_RIGHT
                        GUISetCursor(10, 1, $hGui)
                    Case $DOWN_RIGHT
                        GUISetCursor(12, 1, $hGui)
                    Case $LEFT
                        GUISetCursor(13, 1, $hGui)
                    Case $UP_LEFT
                        GUISetCursor(12, 1, $hGui)
                    Case $DOWN_LEFT
                        GUISetCursor(10, 1, $hGui)
                    Case Else
                        GUISetCursor(6, 1, $hGui)
                EndSwitch
            Else
                GUISetCursor(6, 1, $hGui)
            EndIf
        EndIf


    EndIf
WEnd

Func OnExit()
    For $ii = 1 To $NODES[0][0]
        IniWrite("label.ini", "objetos", $NODES[$ii][0], _ArrayToString(ControlGetPos($hGui, "", $NODES[$ii][2]), ",") & "," & GUICtrlGetBkColor($NODES[$ii][2]))
    Next
    _GDIPlus_GraphicsDispose($hContext)
    _GDIPlus_BitmapDispose($hBitmap)

    _GDIPlus_FontDispose($hFont)
    _GDIPlus_FontFamilyDispose($hFamily)
    _GDIPlus_StringFormatDispose($hFormat)
    _GDIPlus_BrushDispose($hBrush)



    _GDIPlus_Shutdown()
    GUISetState($hGui, @SW_HIDE)
    GUIDelete($hGui)
EndFunc   ;==>OnExit

Func Quit()
    Exit
EndFunc   ;==>Quit


Func _CreateDummy(ByRef $dummy, ByRef $context, ByRef $menu, $cmd)
    Local $aDummy[1][3]
    _ArrayAdd($aDummy, $cmd, Default, "=", ";")
    $dummy = GUICtrlCreateDummy()
    $context = GUICtrlCreateContextMenu($dummy)
    $menu = GUICtrlGetHandle($context)
    For $ii = 1 To UBound($aDummy, 1) - 1
        $aDummy[$ii][2] = GUICtrlCreateMenuItem($aDummy[$ii][0], $context)
        If $aDummy[$ii][1] Then GUICtrlSetOnEvent($aDummy[$ii][2], $aDummy[$ii][1])
    Next
EndFunc   ;==>_CreateDummy

Func Context_Add()
    NewObj()
EndFunc   ;==>Context_Add

Func _box($hToGraphic, $iXX, $iYY, $iWW, $iHH, $iColor = 0, $bFill = False)
    ; _box3
    _GDIPlus_BrushSetSolidColor($hBrush, $iColor)
    If $iWW = 1 And $iHH = 1 Then
        If $iColor Then
            _GDIPlus_GraphicsFillRect($hToGraphic, $iXX, $iYY, $iWW, $iHH, $hBrush)
        Else
            _GDIPlus_GraphicsFillRect($hToGraphic, $iXX, $iYY, $iWW, $iHH)
        EndIf
    Else
        Local $aBox[5][2]
        $aBox[0][0] = 4
        $aBox[1][0] = $iXX
        $aBox[1][1] = $iYY
        $aBox[2][0] = $iXX + $iWW - 1
        $aBox[2][1] = $iYY
        $aBox[3][0] = $iXX + $iWW - 1
        $aBox[3][1] = $iYY + $iHH - 1
        $aBox[4][0] = $iXX
        $aBox[4][1] = $iYY + $iHH - 1
        If $iColor Then
            _GDIPlus_PenSetColor($hPen, $iColor)
            _GDIPlus_GraphicsFillPolygon($hToGraphic, $aBox, $hBrush)
            _GDIPlus_GraphicsDrawPolygon($hToGraphic, $aBox, $hPen)
        Else
            _GDIPlus_GraphicsDrawPolygon($hToGraphic, $aBox)
        EndIf
    EndIf
EndFunc   ;==>_box

Func _Text($hToGraphic, $sFont, $sText, $iSize, $iXX, $iYY, $iWW, $iHH, $iColor)
    _GDIPlus_BrushSetSolidColor($hBrush, $iColor)
    $hFormat = _GDIPlus_StringFormatCreate()
    $hFamily = _GDIPlus_FontFamilyCreate($sFont)
    $hFont = _GDIPlus_FontCreate($hFamily, $iSize, 0)
    $tLayout = _GDIPlus_RectFCreate($iXX, $iYY, $iWW, $iHH)
    $aInfo = _GDIPlus_GraphicsMeasureString($hToGraphic, $sText, $hFont, $tLayout, $hFormat)
    _GDIPlus_GraphicsDrawStringEx($hToGraphic, $sText, $hFont, $aInfo[0], $hFormat, $hBrush)

EndFunc   ;==>_Text

Func Context_CreateImage()
    ConsoleWrite("Context_CreateImage()" & @LF)
    Local $aControlGetPos, $iColor, $sText
    Local $iR, $iG, $iB
    $hBitmap = _GDIPlus_BitmapCreateFromScan0($aGuiSize[0], $aGuiSize[1])
    $hContext = _GDIPlus_ImageGetGraphicsContext($hBitmap)

    _GDIPlus_GraphicsSetSmoothingMode($hContext, 0)
    _GDIPlus_GraphicsClear($hContext, 0xFFFFFFFF)

    For $ii = 1 To $NODES[0][0]
        $aControlGetPos = ControlGetPos($hGui, "", $NODES[$ii][2])
        $iColor = GUICtrlGetBkColor($NODES[$ii][2])
        $iR = _WinAPI_GetRValue($iColor)
        $iG = _WinAPI_GetGValue($iColor)
        $iB = _WinAPI_GetBValue($iColor)
        $iColor = "0x99" & Hex(_WinAPI_RGB($iR, $iG, $iB), 6)
        _box($hContext, $aControlGetPos[0], $aControlGetPos[1], $aControlGetPos[2], $aControlGetPos[3], $iColor, True)
        $sText = GUICtrlRead($NODES[$ii][2])
        _Text($hContext, "Courier New", $sText, 10, $aControlGetPos[0], $aControlGetPos[1], $aControlGetPos[2], $aControlGetPos[3], 0xFF000000)
    Next

    Local $sFile = @TempDir & "\Test.png"
    FileDelete($sFile)
    _GDIPlus_ImageSaveToFile($hBitmap, $sFile) ;save bitmap to disk
    ShellExecute($sFile)
EndFunc   ;==>Context_CreateImage

Func Context_Del()
    Local $find = _ArraySearch($NODES, $focus, 1, Default, 0, 0, 0, 2)
    ConsoleWrite("$focus[" & $focus & "] $find[" & $find & "]" & @LF)
    If $find >= 0 Then
        GUICtrlDelete($focus)
        IniDelete("label.ini", "objetos", $NODES[$find][0])
        _ArrayDelete($NODES, $find)
        $aCursor = GUIGetCursorInfo($hGui)
    EndIf
    $NODES[0][0] = UBound($NODES, 1) - 1
EndFunc   ;==>Context_Del

Func Context_Color()
    If Not $focus Then Return
    Local $color = GUICtrlGetBkColor($focus)
    Local $NewColor = _ChooseColor(2, $color, 2, $hGui)
    If $NewColor = -1 Then Return
    GUICtrlSetBkColor($focus, $NewColor)
EndFunc   ;==>Context_Color

; #FUNCTION# ====================================================================================================================
; Name ..........: GUICtrlGetBkColor
; Description ...: Retrieves the RGB value of the control background.
; Syntax ........: GUICtrlGetBkColor($hWnd)
; Parameters ....: $hWnd                - Control ID/Handle to the control
; Return values .: Success - RGB value
;                  Failure - 0
; Author ........: guinness
; Example .......: Yes
; ===============================================================================================================================
Func GUICtrlGetBkColor($hWnd)
    If Not IsHWnd($hWnd) Then $hWnd = GUICtrlGetHandle($hWnd)
    Local $hDC = _WinAPI_GetDC($hWnd)
    Local $iColor = _WinAPI_GetPixel($hDC, 0, 0)
    _WinAPI_ReleaseDC($hWnd, $hDC)
    Return $iColor
EndFunc   ;==>GUICtrlGetBkColor

 

Edited by Luigi
1 person likes this

m(o.O)m

Share this post


Link to post
Share on other sites

#14 ·  Posted

4 hours ago, UEZ said:

Can you post the test GUI code from post #1?

 

#include <ScreenCapture.au3>
#include <GUIConstantsEx.au3>
#include 'printMGv2.au3'

ImprimePedido("Steve Jobs", "2350.20")

Func ImprimePedido($Str1, $Str2)
    Local $WS_POPUP = 0x80000000 ; Creates a pop-up window. This style cannot be used with the WS_CHILD style.
    Local $SS_CENTER = 0x01 ; Specifies a simple rectangle and centers the error value text in the rectangle. The control automatically wraps words that extend past the end of a line to the beginning of the next centered line.
    Local $Branco = 0xFFFFFF, $Cinza2 = 0xCCCCCC
    Local $rCli = FileReadToArray(@AppDataDir & "\GJA\Cli\" & $Str1)
    If @error Then Return

    Global $GuiPedido = GUICreate("Descrição de Pedidos", 624, 796, -1, -1, $WS_POPUP)
    GUISetBkColor($Branco)

    GUICtrlCreateLabel("Sales Description", 24, 34, 380, 34)
    GUICtrlSetFont(-1, 16, 400, 0, "Arial Black")

    GUICtrlCreateGroup(" Date ", 512, 42, 89, 33)
    GUICtrlCreateLabel(@MDAY & "/" & @MON & "/" & @YEAR, 518, 56, 80, 16, $SS_CENTER)
    GUICtrlSetFont(-1, 10, 400, 2, "", 5)

    GUICtrlCreateGroup(" Name ", 24, 82, 385, 33)
    GUICtrlCreateLabel($Str1, 30, 96, 372, 16)
    GUICtrlSetFont(-1, 10, 400, 2, "", 5)

    GUICtrlCreateGroup(" CPF/CNPJ ", 416, 82, 185, 33)
    If $rCli[29] = "none" Then $rCli[29] = ""
    GUICtrlCreateLabel($rCli[29], 422, 96, 172, 16, $SS_CENTER)
    GUICtrlSetFont(-1, 10, 400, 2, "", 5)

    GUICtrlCreateGroup(" Adddress ", 24, 122, 297, 33)

    Local $EndNum
    Select
        Case $rCli[0] <> "none" And $rCli[1] <> "none"
            $EndNum = $rCli[0] & ", " & $rCli[1]
        Case $rCli[0] <> "none" And $rCli[1] = "none"
            $EndNum = $rCli[0] & ", SN"
        Case Else
            $EndNum = ""
    EndSelect
    GUICtrlCreateLabel($EndNum, 30, 136, 284, 16)
    GUICtrlSetFont(-1, 10, 400, 2, "", 5)

    GUICtrlCreateGroup(" District ", 328, 122, 169, 33)
    If $rCli[2] = "none" Then $rCli[2] = ""
    GUICtrlCreateLabel($rCli[2], 332, 136, 160, 16, $SS_CENTER)
    GUICtrlSetFont(-1, 10, 400, 2, "", 5)

    GUICtrlCreateGroup(" Zip ", 504, 122, 97, 33)
    If $rCli[5] = "none" Then $rCli[5] = ""
    GUICtrlCreateLabel($rCli[5], 508, 136, 88, 16, $SS_CENTER)
    GUICtrlSetFont(-1, 10, 400, 2, "", 5)

    GUICtrlCreateGroup(" County ", 24, 162, 185, 33)
    If $rCli[3] = "none" Then $rCli[3] = ""
    GUICtrlCreateLabel($rCli[3], 30, 176, 174, 16, $SS_CENTER)
    GUICtrlSetFont(-1, 10, 400, 2, "", 5)

    GUICtrlCreateGroup(" UF ", 216, 162, 49, 33)
    If $rCli[4] = "none" Then $rCli[4] = ""
    GUICtrlCreateLabel($rCli[4], 220, 176, 40, 16, $SS_CENTER)
    GUICtrlSetFont(-1, 10, 400, 2, "", 5)

    GUICtrlCreateGroup(" Phone ", 272, 162, 129, 33)
    If $rCli[18] = "none" Then $rCli[18] = "    "
    If $rCli[19] = "none" Then $rCli[19] = "                  "
    GUICtrlCreateLabel("(" & $rCli[18] & ")" & "  " & $rCli[19], 276, 176, 120, 16, $SS_CENTER)
    GUICtrlSetFont(-1, 10, 400, 2, "", 5)

    GUICtrlCreateGroup(" State Registration ", 408, 162, 193, 33)
    GUICtrlSetFont(-1, 10, 400, 2, "", 5)

    GUICtrlCreateLabel("Quantity", 24, 234, 72, 16, $SS_CENTER)
    GUICtrlSetFont(-1, 9, 400, 0, "Calibri", 5)
    GUICtrlSetbkColor(-1, $Cinza2)

    GUICtrlCreateLabel("Weight", 102, 234, 55, 16, $SS_CENTER)
    GUICtrlSetFont(-1, 9, 400, 0, "Calibri", 5)
    GUICtrlSetbkColor(-1, $Cinza2)

    GUICtrlCreateLabel("Unit", 163, 234, 55, 16, $SS_CENTER)
    GUICtrlSetFont(-1, 9, 400, 0, "Calibri", 5)
    GUICtrlSetbkColor(-1, $Cinza2)

    GUICtrlCreateLabel("Description", 224, 234, 206, 16, $SS_CENTER)
    GUICtrlSetFont(-1, 9, 400, 0, "Calibri", 5)
    GUICtrlSetbkColor(-1, $Cinza2)

    GUICtrlCreateLabel("Unitary Value", 436, 234, 81, 16, $SS_CENTER)
    GUICtrlSetFont(-1, 9, 400, 0, "Calibri", 5)
    GUICtrlSetbkColor(-1, $Cinza2)

    GUICtrlCreateLabel("Total", 522, 234, 78, 16, $SS_CENTER)
    GUICtrlSetFont(-1, 9, 400, 0, "Calibri", 5)
    GUICtrlSetbkColor(-1, $Cinza2)

    GUICtrlCreateGroup("", 24, 248, 73, 444)
    GUICtrlCreateGroup("", 102, 248, 56, 444)
    GUICtrlCreateGroup("", 163, 248, 56, 444)
    GUICtrlCreateGroup("", 224, 248, 207, 444)
    GUICtrlCreateGroup("", 436, 248, 81, 444)
    GUICtrlCreateGroup("", 522, 248, 79, 444)
    GUICtrlCreateGroup("", 456, 704, 125, 33)

    GUICtrlCreateLabel("Value", 370, 715, 80, 17)
    GUICtrlSetFont(-1, 10, 600, 0, "Calibri", 5)
    GUICtrlCreateLabel("R$ " & StringFormat("%.2f", $Str2), 460, 714, 116, 17, $SS_CENTER)
    GUICtrlSetFont(-1, 10, 600, 0, "Calibri", 5)

    GUISetState(@SW_SHOW)
    Imprimir_Pedido()

    While 1
        Switch GUIGetMsg()
            Case $GUI_EVENT_CLOSE
                GUIDelete()
                ExitLoop
        EndSwitch
    WEnd
EndFunc

; Captura o print da janela
Func Imprimir_Pedido()
    ; Variáveis usadas na impressão
    Local $hPrinter
    Local $Jpg = @ScriptDir & "\NotaIMG.jpg"
    Global $hDll = @ScriptDir & "\PrintMG.dll"; abre a DLL
    Local $pgwd = 2020; ; Largura da imagem
    Local $pght = 2880; Altura da imagem

    ; Capture window
    _ScreenCapture_CaptureWnd($Jpg, $GuiPedido, 0, 0, -1, -1, False)

    $hPrinter = _PrintDllStart($hDll); abre as funções da DLL em $hPrinter

    _PrintPageOrientation($hPrinter, 1) ; Define 0 horizontal ou 1 vertical
    _PrintStartPrint($hPrinter) ; Inicia a impressão
    _PrintImage($hPrinter, $Jpg, 0, 0, $pgwd, $pght) ; Imprime a imagem
    _PrintEndPrint($hPrinter) ; Finaliza a impressão
EndFunc

@Luigi Very good your example, it is basically what I do the same ... I will take a study in code. thank you.

 

@AndyG yes cleartype used in labels, did not know it was generating subpixels in the sources :(

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Similar Content

    • Robdog1955
      Enter data into IE form that has a javascript editbox
      By Robdog1955
      I am trying to use IE.au3 UDF to auto fill a webpage. All goes well until I get to an editbox that appears to be a javascript. I am attaching a pic of the editbox. (I would be glad to add any other information needed to help me past this last hurdle in my script. I'm just not sure what questions you have to help me with this.)

    • cookiemonster
      Form freezes while trying to resolve IP
      By cookiemonster
      Hi,
      I have a form which calls this function:
      Func HostToIP($Host, $Label) TCPStartup() Local $sIPAddress = TCPNameToIP($Host) If @error Then GUICtrlSetData ($Label, "Error code: " & @error) Else GUICtrlSetData ($Label, $sIPAddress) EndIf TCPShutdown() EndFunc But if it cannot resolve the host to an IP, the whole form freezes for a few seconds until the TCPNameToIP times out, how can I stop the form from freezing whilst it waits for the host to ip times out?
      TCPNameToIP is part of #include <_sql.au3>
    • Jefrey
      Extended Input Box (multiple inputs)
      By Jefrey
      Taking the idea from @Melba23's (btw, thanks  ) ExtMsgBox and also making use of his StringSize UDF, I made a extended version of the InputBox function.
      From the README file:
      This UDF creates input boxes (just like native InputBox), but with multiple inputs.
      You can also set some inputs to be password-style, set the default texts for some of the edits and even set the label of the OK/cancel buttons.
      How to use
      _ExtInputBox($sTitle, $sTexts [ , $sDefaults = Null [ , $sPasswords = Null [ , $sBtnLabels = "OK|Cancel" [ , $iWidth = -1 [ , $iLeft = -1 [ , $iTop = -1 [ , $iTimeout = 0 [ , $hParent = 0 ] ] ] ] ] ] ] ] ) Arguments are:
      $sTitle (mandatory): The window title (e.g.: "Hello World") $sTexts (mandatory): The edit labels, separated by | (e.g.: "Your email|Your password") $sDefaults: The default input texts, separated by | (e.g.: "|you@us.com||" will tell that the first input will have nothing as default text, the second will have you@us.com as default text and the third and forth will also have nothing). Note that if you set the default value of 1 input, you must set the value of them all (even if it's nothing), otherwise all inputs will have no default value. Default is none. $sPasswords: One or more 1-based index of inputs, separated by anything that is not a number (pipeline - | - recommended), of the inputs that will receive password style (e.g.: "2|3" wíll tell that the second and third inputs are password-style, default is none) $sBtnLabels: The TWO label of the default OK/Cancel buttons (e.g.: "Submit|Close") $iWidth: Window width (default is the size of the longest string with the limit of 25% of the screen width). Obviously it's not possible to set the height as it's calculated automatically. $iLeft: Distance of the window from the left side of the screen (default is centered) $iTop: Distance of the window to the top of the screen (default is centered) $iTimeout: Time limit for filling the form data (default is none) $hParent: Parent form (default is none)  
      Return value
      Sucess: an 1-based array with the input values entered ($aArray[1] = 1st input value, $aArray[2] = 2nd input value, $aArray[n] = nth input value, whereas $aArray[0] = input count)
      Failure: False, and set @extended to 1 if the user clicked cancel, 2 if the user closed the window, or 3 if timeout ended.
       
      Examples (two of them)
       
       
       
      #include 'ExtInputBox.au3' $sData = _ExtInputBox("Login", "Username|Password", Null, "2") If $sData = False Then MsgBox(0, "", "You pressed cancel, exit or timeout ended.") Else MsgBox(0, "You entered:", "Username: " & $sData[1] & @CRLF & "Password: " & $sData[2]) EndIf #include 'ExtInputBox.au3' $sData = _ExtInputBox("Login", "Your full name|Your email|Your telephone|Choose an username|Choose a password|Repeat password", "Mr./Ms. ||+1 |admin||", "5,6", "Register|Cancel") If $sData = False Then Switch @extended Case 1 MsgBox(0, "", "You clicked Cancel") Case 2 MsgBox(0, "", "You closed the window.") Case 3 MsgBox(0, "", "Timeout ended (but we have no timeout on this example, so this will never happen)") EndSwitch Else MsgBox(0, "You entered:", "Full name: " & $sData[1] & @CRLF & _ "Email: " & $sData[2] & @CRLF & _ "Telephone:" & $sData[3] & @CRLF & _ "Username: " & $sData[4] & @CRLF & _ "Password: " & $sData[5] & @CRLF & _ "Password repeat: " & $sData[6]) EndIf  
      Download
       
      Download ZIP from GitHub
       
      Btw, fork me on Github
       
    • pranaynanda
      Msgbox not Showing when GUI Runs
      By pranaynanda
      I'm trying to run this code:
      #include <GuiListView.au3> #include <GUIConstants.au3> Dim $Services Dim $ServicesList #cs While 1 CheckService() Sleep(30000) ; sleep 30 seconds WEnd #ce ;#cs #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <ListViewConstants.au3> #include <TabConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 615, 438, 192, 124) $Tab1 = GUICtrlCreateTab(0, 48, 609, 385) $TabSheet1 = GUICtrlCreateTabItem("Running Services") $ListView1 = GUICtrlCreateListView("Service Name|Status", 8, 72, 593, 281, -1, BitOR($LVS_EX_GRIDLINES,$LVS_EX_CHECKBOXES,$LVS_EX_FULLROWSELECT)) GUICtrlSendMsg($ListView1, $LVM_SETCOLUMNWIDTH, 0, 300) GUICtrlSendMsg($ListView1, $LVM_SETCOLUMNWIDTH, 1, 288) $Button1 = GUICtrlCreateButton("Stop Services", 464, 376, 129, 33) $TabSheet2 = GUICtrlCreateTabItem("Stopped Services") GUICtrlSetState(-1,$GUI_SHOW) $ListView2 = GUICtrlCreateListView("Service Name|Status", 8, 72, 593, 281, -1, BitOR($LVS_EX_GRIDLINES,$LVS_EX_CHECKBOXES,$LVS_EX_FULLROWSELECT)) GUICtrlSendMsg($ListView2, $LVM_SETCOLUMNWIDTH, 0, 300) GUICtrlSendMsg($ListView2, $LVM_SETCOLUMNWIDTH, 1, 288) $Button2 = GUICtrlCreateButton("Start Services", 464, 376, 129, 33) GUICtrlCreateTabItem("") GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd ;#ce ;$Tab1 = GUICtrlCreateTab(16, 8, 601, 377) ;$TabSheet1 = GUICtrlCreateTabItem("Running Services") ;$ListView1 = GUICtrlCreateListView("Service Name", 24, 40, 582, 334) ;_GUICtrlListView_SetExtendedListViewStyle($ListView1, BitOR($LVS_EX_FULLROWSELECT, $LVS_EX_CHECKBOXES, $LVS_EX_GRIDLINES)) ;$ServiceName = "wuauserv" Local $Services = ObjGet("winmgmts:\\" & @ComputerName & "\root\cimv2") Local $ServicesList = $Services.ExecQuery("SELECT * FROM Win32_Service") If IsObj($ServicesList) then For $Services in $ServicesList ;If $Services.Name = $ServiceName Then ; if $Services.State = "Running" Then MsgBox(8192,"Hello", $Services.Name & $Services.State,0,$Form1) ;GUICtrlCreateListViewItem( $Services.Name & "|" & $Services.State , $ListView1) ;Run (@ComSpec & " /c " & 'net stop wuauserv') ; EndIf ;EndIf Next EndIf ;EndFunc But the msgbox does turn up when GUI runs. However, if I comment the GUI section, it works perfectly fine. Please help.
    • BuckMaster
      Form Builder beta
      By BuckMaster
      Update v1.0.6

      Major script overhaul, I literally started over from scratch only adding parts of code from the old script that were solid.
      I don’t have a help file made as of now so I am going to explain all of the functionality in this post
      - Form Builder is no longer bi-directional, you now toggle between script mode and GUI mode using a button in the top right or F4
      - The script no longer recompiles on every change but instead inserts changes into the script
      - Form Builder no longer cares about Event mode or GuiGetMsg mode
      - No more .gui files, you now edit .au3 scripts directly
      - Script edit is now a SciLexer control, includes syntax highlighting, folding, call tips, keywords, and inline error annotations.
      - Script output console is now at the bottom in script mode
      - Main GUI menu redone, most functions from SciTe have been added along with their hotkeys
      - All restrictions to editing the script have been removed
      - GDI+ and Graphic editors removed
      - Cleanup of script, stability greatly increased
      - Hotkeys no longer use _IsPressed they now use GUIAccelerator keys (with exception to a few)
      - Multiple scripts can be open
      - Form Builder buffers the open scripts and adds an asterisk * to scripts that have been modified
      - Rich Edit, GUIScrollbars, Dummy, and Updown are disabled for now until I can add them
      - GUI Menu controls cannot be created as of now but will be rendered in the editor
      - Undo and Redo actions in script mode and GUI mode added, the GUI undo and redo buffer is cleared switching between modes
      - The Undo and Redo buffers do not have a limit but are cleared when switching between modes or scripts
      - Undo and Redo actions do not work for controls that have no control handle
      - The Treeview now works as a Go to function for controls and functions in script mode
      - Form Builder now tries to preserve as much of the original content as possible, it will save whitespace in-between parameters and comments on controls
      - Treeview context menu reworked, much more responsive
      - Unicode support added File -> Encoding -> UTF-8
      - Language support added, I added a couple of language files and used Google translate just so I could size my GUI's for different languages, I do not support what those language files say
      - Selecting a GUI in the Treeview in GUI mode will allow you to change the GUI's Handle, Position, Background Color, State, Cursor, Font, Font Size and Font Attributes
      - Auto Declare is no longer hiding in the settings, it is now on the top right and is a toggle between Off, Global and Local
      - Help File Lookup added (Ctrl + H), allows you to search selected text in the help file,
        Any variable will be searched and the first result will be displayed, any string will be searched as a keyword in the index
      - Added current script line, column, and selection length in the bottom left
      - Standard undeclared style constants are checked before script execution and the script will prompt if an undefined style constant is found
      - You can now toggle script whitespace, EOL characters, line numbers, margins and output in the View menu
      - View -> Toggle All Folds works as it does in SciTe, only base level folds are changed and the first fold found determines whether to expand or contract
      - Form Builder Settings redone
      - Bugs with submitting data and control selection have been fixed
      - Fixed problems with frequently called repetitive functions causing issues with large scripts
      - Fixed bugs with B, I, U and S font attribute buttons getting stuck and called when enter was pressed
      Update v1.0.7
      - Help File Look-up hotkey changed to Ctrl+B
      - Replace hotkey changed to Ctrl+H
      - Changes to $SCN_MODIFIED so only text events are notified
      - Bookmarks added, Ctrl+M to add or delete a Bookmark from the current line
      - Edit -> Bookmarks -> Set Bookmark changes the currently selected Bookmark
      - Edit -> Clear Current Bookmarks deletes only the currently selected Bookmark
      - Allows you to change foreground and background colors of Bookmarks
      - Added F2 hotkey for Next Bookmark
      - Added Shift+F2 hotkey for Previous Bookmark
      - Fixed a bug that made it so script annotation did not show up for some people
      - Script errors and warnings now add a Bookmark on each line
      - Ctrl+E hotkey added to clear all Bookmarks and Annotations
      - Minor GUI tweaks
      - Fixed a bug with the GUI Style undo action
      - Undo and Redo actions for GUI windows will now update the window properties if the GUI is selected
      - F4 Hotkey no longer switches modes, switching modes is now F10
      - F4 is to toggle next error or warning message, works like it does in SciTe, bookmarks the line and highlights the error in the console
      - Shift+F4 Hotkey added to toggle previous error or warning message
      - Shift+F5 Hotkey added to clear script output
      - Ctrl+F5 Hotkey added as SyntaxCheck Prod
      - Form Builder now performs a SyntaxCheck before entering GUI Mode and prompts on Error or Warning
      - Language Select Menu Added Settings -> Lanugage
      - Icons added to main menu
      - Languages added to all new menu items and msgbox's
      - Language Files updated for new data
      - Language Support added for Arabic, Chinese, Dutch, French, German, Hebrew, Japanese, Swedish, Thai, and Vietnamese [ Google Translate ]
      - Fixed bug with updating a language that made it look like ANSI and UTF-8 were both selected
      - Added redo button next to undo button
      - Font attribute buttons Bold, Italic, Underline and Strike-Out changed to labels
      Update v1.0.8
      - Somehow a main function got deleted causing the script to crash on some changes
      - Fixed some issues with updating Languages
       


      Hotkeys
      Ctrl + N              - New Blank Script
      Ctrl + G              - New GUI Script
      Ctrl + O              - Open Script
      Ctrl + Shift + S   - Save As
      Ctrl + S              - Save
      Esc                    - Close Open Script
      Alt + F4              - Exit
      Ctrl + Z              - Undo
      Ctrl + Y              - Redo
      Ctrl + X              - Cut
      Ctrl + C              - Copy
      Ctrl + V              - Paste
      Ctrl + A              - Select All
      Ctrl + W             - Clear inline script annotation
      Ctrl + E              - Clear inline script annotation and bookmarks
      Ctrl + F              - Find
      Ctrl + F3            - Find Next
      Shift + F3           - Find Previous (doesn’t work yet)
      Ctrl + B              - Help File Lookup
      F5                      - Go
      Alt + F5             - Beta Run
      F7                     - Build
      Ctrl + F7            - Compile
      F11                    - Full screen
      F8                     - Toggle Show/Hide Script Output
      Ctrl + I               - Open Include
      Ctrl + H             - Replace
      F1                     - AutoIt Help File
      Ctrl + D             - Duplicate Control
      Delete               - Delete Control
      Ctrl + Shift + 8   - Toggle Show/Hide Script Whitespace
      Ctrl + Shift + 9   - Toggle Show/Hide Script EOL characters
      Ctrl                    - GUI Mode multicontrol selection
      F10                     - Switch Modes
      F4                     - Next Message
      Shift+F4            - Previous Message
      Shift+F5            - Clear Output
      Ctrl+M               - Add Bookmark
      F2                     - Next Bookmark
      Shift+F2            - Previous Bookmark
      Basic GUI Mode How To

      Create a Control
          - click a control on the left
          - click in the GUI you wish to add the control
            Left Click: Click and drag to auto resize the control
            Right Click: Creates the control at a standard size
      Select a Control
          - click inside the control or select it in the treeview
      Change a controls Data
          - First select the control
          - modify the controls data on the right, press enter to submit changes
            state, cursor, font and resizing update when you change the data
          - when modifying the data parameter the script recognizes if there is a variable in the data and will add quotes accordingly
            ex. data parameter = $data, End result in script: GUICtrlCreateButton($data, 50, 50, 100, 20)
            ex. data parameter = data, End result in script: GUICtrlCreateButton("data", 50, 50, 100, 20)
            ex. data parameter = "data"&$data, End result in script: GUICtrlCreateButton("data"&$data, 50, 50, 100, 20)
      Applying an Image to a control
          - select a control
          - control styles must be applied to some controls before adding an image
          - click the ... button next to the Image input in the Control Properties area in the bottom right
          - select the image you want to display, allows jpg, bmp, gif, ico and dll files
          - selecting a dll will open another prompt to choose which resource to display
      Control Grouping
          - multiple controls must be selected
          - press the group controls button
          - control grouping allows you to resize and move multiple controls at the same time, as of now groups are deleted when leaving GUI mode
      I only have a couple odds and ends to finish up before everything should be complete,
      I need to add Undo and Redo actions for copying and duplicating controls and a couple other minor things,
      eventually I want to try to add all of the UDF controls as well.
      If people are willing to translate the language file I would be very grateful, the ones I have right now are from Google translate, I only used them for testing and have no idea what they say.
      I want to thank Kip, Prog@ndy, Isi360 and all of the other contributors on this forum, without you guys i don't think i could have written this script.

      Please post any comments, problems or suggestions,
          BuckMaster


      * I only used one "magic number" on my main close case statement, only for faster locating, and i don't care.
      Form Builder Source.zip
      Form Builder.zip