Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 07/25/2020 in all areas

  1. 1 point
  2. FileOpenDialog() changes the workdir so you either need to put the full path in the run() statement or change the workdir back to @scriptdir after the FileOpenDialog() statement. Jos
    1 point
  3. I only managed to do it the hard way, to draw with _WinAPI_DrawThemeBackground #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <WinAPITheme.au3> #include <WinAPIGdi.au3> #include <WinAPISysWin.au3> Local $GUI = GUICreate('', 200, 100) Local $but = GUICtrlCreatePic('', 50, 50, 17, 16) _GUICtrlSetTheme(-1, 'Pause', 1, 1, 17, 16) GUISetState() For $i = 1 To 8 _GUICtrlSetTheme($but, 'Pause', 1, $i, 17, 16) Sleep(1000) Next ;Do ;Until GUIGetMsg() = $GUI_EVENT_CLOSE Func _GUICtrlSetTheme($CTRL, $Class, $Part, $Stat, $width, $height) Local $hCTRL = GUICtrlGetHandle($CTRL) Local $hDev = _WinAPI_GetDC($hCTRL) Local $hDC = _WinAPI_CreateCompatibleDC($hDev) Local $hSource = _WinAPI_CreateCompatibleBitmapEx($hDev, $width, $height, _WinAPI_SwitchColor(_WinAPI_GetSysColor($COLOR_3DFACE))) Local $hSv = _WinAPI_SelectObject($hDC, $hSource) Local $tRECT = _WinAPI_CreateRectEx(0, 0, $width, $height) Local $hTheme = _WinAPI_OpenThemeData(0, $Class) _WinAPI_DrawThemeBackground($hTheme, $Part, $Stat, $hDC, $tRECT) _WinAPI_CloseThemeData($hTheme) Local $hBitmap = _WinAPI_CreateCompatibleBitmap($hDev, $width, $height) _WinAPI_SelectObject($hDC, $hBitmap) _WinAPI_DrawBitmap($hDC, 0, 0, $hSource, $MERGECOPY) _WinAPI_ReleaseDC($hCTRL, $hDev) _WinAPI_DeleteObject($hSource) _WinAPI_DeleteDC($hDC) _WinAPI_DeleteObject(_SendMessage($hCTRL, $STM_SETIMAGE, 0, $hBitmap)) Local $hWnd = _WinAPI_GetAncestor($hCTRL, $GA_ROOT) Local $Pos = ControlGetPos($hWnd, '', $hCTRL) If @error Then Return _WinAPI_InvalidateRect($hWnd, _WinAPI_CreateRectEx($pos[0], $pos[1], $width, $height), True) EndFunc
    1 point
  4. read the rules. No gaming stuff.
    1 point
  5. IE UDF might be more appropriate under your circumstances ? Provide URL so we can see what would be the best approach for you...
    1 point
  6. Ok here is the fix for my problem above: Replace this in the udf: Func _XLSAddStyle($file, $name="S21", $font="Arial", $size=11, $fstyle=0, $pcolor="000000", $icolor="", $AlignHor=$XMLXLS_CENTER, $AlignVer=$XMLXLS_BOTTOM, $Border=0) Local $f, $fontfam="Swiss" FileWriteLine($file, ' <Style ss:ID="' & $name &'">') FileWriteLine($file, ' <Alignment ss:Horizontal="' & $AlignHor & '" ss:Vertical="' & $AlignVer &'"/>') With this: Func _XLSAddStyle($file, $name="S21", $font="Arial", $size=11, $fstyle=0, $pcolor="000000", $icolor="", $AlignHor=$XMLXLS_CENTER, $AlignVer=$XMLXLS_BOTTOM, $Border=0, $WrapText=1) Local $f, $fontfam="Swiss" FileWriteLine($file, ' <Style ss:ID="' & $name &'">') FileWriteLine($file, ' <Alignment ss:Horizontal="' & $AlignHor & '" ss:Vertical="' & $AlignVer &'" ss:WrapText="' & $WrapText & '"/>')
    1 point
  7. Hi, i just joined. I am trying to learn C# the fastest way possible.Currently i am using Zet Excel platform. It helps me to create, edit, convert or print excel spreadsheet file formats without requiring Microsoft
    0 points
×
×
  • Create New...