legend Posted January 14, 2015 Share Posted January 14, 2015 Hello, There's a few skin solutions for AutoIt, 2 of them are: msstyles, and skincrafter skins. Skincrafter works on one of my machines, but on my other machine it doesen't apply the skin for some reason, I'm running windows 8 on both systems. With msstyle skins, It doesen't automaticly change the size of the gui, so if you run the script on another machine with a different resolutions, it looks weird, I wish there were a solution for the msstyle, since it's far better than skincrafter in my opinion. Does anyone got a suggestion ? Link to comment Share on other sites More sharing options...
legend Posted January 14, 2015 Author Share Posted January 14, 2015 (edited) Here you can see what a msstyle skin looks like on my small Microsoft surface: On my Imac, 27k, 5k display, it looks even more weird. Only on my 22' screen it looks normal: If I remove the msstyle skin, it looks normal on all of my computers Edited January 14, 2015 by legend Link to comment Share on other sites More sharing options...
guinness Posted January 14, 2015 Share Posted January 14, 2015 If you're developing for public usage, then "skinning" your application adds unfamiliarity for your users who are use to their system's theme. UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
mLipok Posted January 14, 2015 Share Posted January 14, 2015 look in my sign for DPI Awareness Signature beginning:* Please remember: "AutoIt"..... * Wondering who uses AutoIt and what it can be used for ? * Forum Rules ** ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Code * for other useful stuff click the following button: Spoiler Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST API * ErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 * My contribution to others projects or UDF based on others projects: * _sql.au3 UDF * POP3.au3 UDF * RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF * SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane * Useful links: * Forum Rules * Forum etiquette * Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * Wiki: * Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX IE Related: * How to use IE.au3 UDF with AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskScheduler * IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related: * How to get reference to PDF object embeded in IE * IE on Windows 11 * I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions * EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *I also encourage you to check awesome @trancexx code: * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuff * OnHungApp handler * Avoid "AutoIt Error" message box in unknown errors * HTML editor * winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/ "Homo sum; humani nil a me alienum puto" - Publius Terentius Afer"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming" , be and \\//_. Anticipating Errors : "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty." Signature last update: 2023-04-24 Link to comment Share on other sites More sharing options...
legend Posted January 14, 2015 Author Share Posted January 14, 2015 What I'm looking for, is a solution to msstyle skins, I have no idea why they aren't resizing themself to whatever screen it's being runned from Link to comment Share on other sites More sharing options...
mLipok Posted January 14, 2015 Share Posted January 14, 2015 (edited) This is not ScreenResolution related Issue. This is FontDPI related issue. Did you check my second example ? Edited January 14, 2015 by mLipok Signature beginning:* Please remember: "AutoIt"..... * Wondering who uses AutoIt and what it can be used for ? * Forum Rules ** ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Code * for other useful stuff click the following button: Spoiler Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST API * ErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 * My contribution to others projects or UDF based on others projects: * _sql.au3 UDF * POP3.au3 UDF * RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF * SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane * Useful links: * Forum Rules * Forum etiquette * Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * Wiki: * Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX IE Related: * How to use IE.au3 UDF with AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskScheduler * IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related: * How to get reference to PDF object embeded in IE * IE on Windows 11 * I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions * EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *I also encourage you to check awesome @trancexx code: * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuff * OnHungApp handler * Avoid "AutoIt Error" message box in unknown errors * HTML editor * winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/ "Homo sum; humani nil a me alienum puto" - Publius Terentius Afer"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming" , be and \\//_. Anticipating Errors : "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty." Signature last update: 2023-04-24 Link to comment Share on other sites More sharing options...
mLipok Posted January 14, 2015 Share Posted January 14, 2015 (edited) When you use msstyle skins , do you change entire Windows theme ? Here you can see what a msstyle skin looks like on my small Microsoft surface: What DPI is set "on your small Microsoft surface" ? EDIT: remove duplicated content Edited January 14, 2015 by mLipok Signature beginning:* Please remember: "AutoIt"..... * Wondering who uses AutoIt and what it can be used for ? * Forum Rules ** ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Code * for other useful stuff click the following button: Spoiler Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST API * ErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 * My contribution to others projects or UDF based on others projects: * _sql.au3 UDF * POP3.au3 UDF * RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF * SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane * Useful links: * Forum Rules * Forum etiquette * Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * Wiki: * Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX IE Related: * How to use IE.au3 UDF with AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskScheduler * IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related: * How to get reference to PDF object embeded in IE * IE on Windows 11 * I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions * EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *I also encourage you to check awesome @trancexx code: * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuff * OnHungApp handler * Avoid "AutoIt Error" message box in unknown errors * HTML editor * winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/ "Homo sum; humani nil a me alienum puto" - Publius Terentius Afer"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming" , be and \\//_. Anticipating Errors : "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty." Signature last update: 2023-04-24 Link to comment Share on other sites More sharing options...
legend Posted January 14, 2015 Author Share Posted January 14, 2015 (edited) I tried your example, but when I apply the msstyle skin, it still looks weird. The msstyle skin only changes the GUI skin, not the whole windows skin. my DPI is 208. Here you can see the big difference with and without a msstyle skin (picture taken from my surface): Edited January 14, 2015 by legend Link to comment Share on other sites More sharing options...
mLipok Posted January 14, 2015 Share Posted January 14, 2015 in second post (in this topic) you show us this following Sample GUI My second example use the almost the same sample GUI script. First question: Can you show here how look the gui from this following example (of course "on your small Microsoft surface" ) expandcollapse popup#Region INCLUDE #include <AVIConstants.au3> #include <GuiConstantsEx.au3> #include <TreeViewConstants.au3> #include <GDIPlus.au3> #include <MsgBoxConstants.au3> #EndRegion INCLUDE ; Global $bDPI_Awareness = MsgBox($MB_YESNO, 'Question:', 'Do you want to set DPI Awareness ?') = $IDYES Global $bDPI_Awareness = True #Region GUI GUICreate("Sample GUI", 400, 500) If $bDPI_Awareness Then GUISetFont(8.5 * _GDIPlus_GraphicsGetDPIRatio()[0]) EndIf GUISetIcon(@SystemDir & "\mspaint.exe", 0) #EndRegion GUI #Region MENU Local $idMenu1 = GUICtrlCreateMenu("Menu &One") Local $idMenu2 = GUICtrlCreateMenu("Menu &Two") GUICtrlCreateMenu("Menu Th&ree") GUICtrlCreateMenu("Menu &Four") GUICtrlCreateMenuItem('SubMenu One &A', $idMenu1) GUICtrlCreateMenuItem('SubMenu One &B', $idMenu1) #EndRegion MENU #Region CONTEXT MENU Local $idContextMenu = GUICtrlCreateContextMenu() GUICtrlCreateMenuItem("Context Menu", $idContextMenu) GUICtrlCreateMenuItem("", $idContextMenu) ; Separator GUICtrlCreateMenuItem("&Properties", $idContextMenu) #EndRegion CONTEXT MENU #Region PIC GUICtrlCreatePic("logo4.gif", 0, 0, 169, 68) GUICtrlSetTip(-1, '#Region PIC') GUICtrlCreateLabel("Sample Pic", 75, 1, 53, 15) GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) GUICtrlSetColor(-1, 0xFFFFFF) #EndRegion PIC #Region AVI GUICtrlCreateAvi("SampleAVI.avi", 0, 180, 10, 32, 32, $ACS_AUTOPLAY) GUICtrlSetTip(-1, '#Region AVI') ; TODO GUICtrlCreateLabel("Sample avi", 175, 50) GUICtrlSetTip(-1, '#Region AVI - Label') #EndRegion AVI #Region TAB GUICtrlCreateTab(240, 0, 150, 70) GUICtrlCreateTabItem("One") GUICtrlSetTip(-1, '#Region TAB1') GUICtrlCreateLabel("Sample Tab with TabItems", 250, 40) GUICtrlCreateTabItem("Two") GUICtrlSetTip(-1, '#Region TAB2') GUICtrlCreateTabItem("Three") GUICtrlSetTip(-1, '#Region TAB3') GUICtrlCreateTabItem("") #EndRegion TAB #Region COMBO GUICtrlCreateCombo("Sample Combo", 250, 80, 120, 100) GUICtrlSetTip(-1, '#Region COMBO') #EndRegion COMBO #Region PROGRESS GUICtrlCreateProgress(60, 80, 150, 20) GUICtrlSetTip(-1, '#Region PROGRES') GUICtrlSetData(-1, 60) GUICtrlCreateLabel("Progress:", 5, 82) GUICtrlSetTip(-1, '#Region PROGRES - Label') #EndRegion PROGRESS #Region EDIT GUICtrlCreateEdit(@CRLF & " Sample Edit Control", 10, 110, 150, 70) GUICtrlSetTip(-1, '#Region EDIT') #EndRegion EDIT #Region LIST GUICtrlCreateList("", 5, 190, 100, 90) GUICtrlSetTip(-1, '#Region LIST') GUICtrlSetData(-1, "A.Sample|B.List|C.Control|D.Here", "B.List") #EndRegion LIST #Region ICON GUICtrlCreateIcon("explorer.exe", 0, 175, 120) GUICtrlSetTip(-1, '#Region ICON') GUICtrlCreateLabel("Icon", 180, 160, 50, 20) GUICtrlSetTip(-1, '#Region ICON - Label') #EndRegion ICON #Region LIST VIEW Local $idListView = GUICtrlCreateListView("Sample|ListView|", 110, 190, 110, 80) GUICtrlSetTip(-1, '#Region LIST VIEW') GUICtrlCreateListViewItem("A|One", $idListView) GUICtrlCreateListViewItem("B|Two", $idListView) GUICtrlCreateListViewItem("C|Three", $idListView) #EndRegion LIST VIEW #Region GROUP WITH RADIO BUTTONS GUICtrlCreateGroup("Sample Group", 230, 120) GUICtrlCreateRadio("Radio One", 250, 140, 80) GUICtrlSetTip(-1, '#Region GROUP WITH RADIO BUTTONS- RADIO1') GUICtrlSetState(-1, $GUI_CHECKED) GUICtrlCreateRadio("Radio Two", 250, 165, 80) GUICtrlSetTip(-1, '#Region GROUP WITH RADIO BUTTONS- RADIO2') GUICtrlCreateGroup("", -99, -99, 1, 1) ;close group #EndRegion GROUP WITH RADIO BUTTONS #Region UPDOWN GUICtrlCreateLabel("UpDown", 350, 115) GUICtrlSetTip(-1, '#Region UPDOWN - Label') GUICtrlCreateInput("42", 350, 130, 40, 20) GUICtrlSetTip(-1, '#Region UPDOWN - Input') GUICtrlCreateUpdown(-1) GUICtrlSetTip(-1, '#Region UPDOWN - Updown') #EndRegion UPDOWN #Region LABEL GUICtrlCreateLabel("Green" & @CRLF & "Label", 350, 165, 40, 40) GUICtrlSetTip(-1, '#Region LABEL') GUICtrlSetBkColor(-1, 0x00FF00) #EndRegion LABEL #Region SLIDER GUICtrlCreateLabel("Slider:", 235, 215) GUICtrlSetTip(-1, '#Region SLIDER - Label') GUICtrlCreateSlider(270, 210, 120, 30) GUICtrlSetTip(-1, '#Region SLIDER') GUICtrlSetData(-1, 30) #EndRegion SLIDER #Region INPUT GUICtrlCreateInput("Sample Input Box", 235, 255, 130, 20) GUICtrlSetTip(-1, '#Region INPUT') #EndRegion INPUT #Region DATE GUICtrlCreateDate("", 5, 280, 200, 20) GUICtrlSetTip(-1, '#Region DATE') GUICtrlCreateLabel("(Date control expands into a calendar)", 10, 305, 200, 20) GUICtrlSetTip(-1, '#Region DATE - Label') #EndRegion DATE #Region BUTTON GUICtrlCreateButton("Sample Button", 10, 330, 100, 30) GUICtrlSetTip(-1, '#Region BUTTON') #EndRegion BUTTON #Region CHECKBOX GUICtrlCreateCheckbox("Checkbox", 130, 335, 80, 20) GUICtrlSetTip(-1, '#Region CHECKBOX') GUICtrlSetState(-1, $GUI_CHECKED) #EndRegion CHECKBOX #Region TREEVIEW ONE Local $idTreeView_1 = GUICtrlCreateTreeView(210, 290, 80, 80) GUICtrlSetTip(-1, '#Region TREEVIEW ONE') Local $idTreeItem = GUICtrlCreateTreeViewItem("TreeView", $idTreeView_1) GUICtrlCreateTreeViewItem("Item1", $idTreeItem) GUICtrlCreateTreeViewItem("Item2", $idTreeItem) GUICtrlCreateTreeViewItem("Foo", -1) GUICtrlSetState($idTreeItem, $GUI_EXPAND) #EndRegion TREEVIEW ONE #Region TREEVIEW TWO Local $idTreeView_2 = GUICtrlCreateTreeView(295, 290, 103, 80, $TVS_CHECKBOXES) GUICtrlSetTip(-1, '#Region TREEVIEW TWO') GUICtrlCreateTreeViewItem("TreeView", $idTreeView_2) GUICtrlCreateTreeViewItem("With", $idTreeView_2) GUICtrlCreateTreeViewItem("$TVS_CHECKBOXES", $idTreeView_2) GUICtrlSetState(-1, $GUI_CHECKED) GUICtrlCreateTreeViewItem("Style", $idTreeView_2) #EndRegion TREEVIEW TWO #Region DPI Awareness - example GUICtrlCreateLabel("DPI Awareness TEST", 10, 410, 380, 25) If $bDPI_Awareness Then GUICtrlSetFont(-1, 20 * _GDIPlus_GraphicsGetDPIRatio()[0]) Else GUICtrlSetFont(-1, 20) EndIf #EndRegion DPI Awareness - the best example #Region GUI MESSAGE LOOP GUISetState(@SW_SHOW) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd GUIDelete() #EndRegion GUI MESSAGE LOOP ;###################################################################################################################################### ; #FUNCTION# ==================================================================================================================== ; Name ..........: _GDIPlus_GraphicsGetDPIRatio ; Description ...: ; Syntax ........: _GDIPlus_GraphicsGetDPIRatio([$iDPIDef = 96]) ; Parameters ....: $iDPIDef - [optional] An integer value. Default is 96. ; Return values .: None ; Author ........: UEZ ; Modified ......: ; Remarks .......: ; Related .......: ; Link ..........: http://www.autoitscript.com/forum/topic/159612-dpi-resolution-problem/?hl=%2Bdpi#entry1158317 ; Example .......: No ; =============================================================================================================================== Func _GDIPlus_GraphicsGetDPIRatio($iDPIDef = 96) _GDIPlus_Startup() Local $hGfx = _GDIPlus_GraphicsCreateFromHWND(0) If @error Then Return SetError(1, @extended, 0) Local $aResult #forcedef $__g_hGDIPDll, $ghGDIPDll $aResult = DllCall($__g_hGDIPDll, "int", "GdipGetDpiX", "handle", $hGfx, "float*", 0) If @error Then Return SetError(2, @extended, 0) Local $iDPI = $aResult[2] Local $aresults[2] = [$iDPIDef / $iDPI, $iDPI / $iDPIDef] _GDIPlus_GraphicsDispose($hGfx) _GDIPlus_Shutdown() Return $aresults EndFunc ;==>_GDIPlus_GraphicsGetDPIRatio and second question: How you use "msstyle skins"? Is it a Windows Theme or you are "specially" modify your script to use this skin only for your app (not for entire Windows system) ? Signature beginning:* Please remember: "AutoIt"..... * Wondering who uses AutoIt and what it can be used for ? * Forum Rules ** ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Code * for other useful stuff click the following button: Spoiler Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST API * ErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 * My contribution to others projects or UDF based on others projects: * _sql.au3 UDF * POP3.au3 UDF * RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF * SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane * Useful links: * Forum Rules * Forum etiquette * Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * Wiki: * Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX IE Related: * How to use IE.au3 UDF with AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskScheduler * IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related: * How to get reference to PDF object embeded in IE * IE on Windows 11 * I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions * EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *I also encourage you to check awesome @trancexx code: * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuff * OnHungApp handler * Avoid "AutoIt Error" message box in unknown errors * HTML editor * winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/ "Homo sum; humani nil a me alienum puto" - Publius Terentius Afer"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming" , be and \\//_. Anticipating Errors : "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty." Signature last update: 2023-04-24 Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted January 14, 2015 Moderators Share Posted January 14, 2015 and second question: How you use "msstyle skins"? Is it a Windows Theme or you are "specially" modify your script to use this skin only for your app (not for entire Windows system) ? Probably with >_USkinLibrary Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
mLipok Posted January 14, 2015 Share Posted January 14, 2015 Today, I can not continue to check. I have an urgent new demands, from my client. I'll try to get back to the topic tomorrow night. Signature beginning:* Please remember: "AutoIt"..... * Wondering who uses AutoIt and what it can be used for ? * Forum Rules ** ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Code * for other useful stuff click the following button: Spoiler Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST API * ErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 * My contribution to others projects or UDF based on others projects: * _sql.au3 UDF * POP3.au3 UDF * RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF * SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane * Useful links: * Forum Rules * Forum etiquette * Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * Wiki: * Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX IE Related: * How to use IE.au3 UDF with AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskScheduler * IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related: * How to get reference to PDF object embeded in IE * IE on Windows 11 * I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions * EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *I also encourage you to check awesome @trancexx code: * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuff * OnHungApp handler * Avoid "AutoIt Error" message box in unknown errors * HTML editor * winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/ "Homo sum; humani nil a me alienum puto" - Publius Terentius Afer"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming" , be and \\//_. Anticipating Errors : "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty." Signature last update: 2023-04-24 Link to comment Share on other sites More sharing options...
mLipok Posted January 14, 2015 Share Posted January 14, 2015 I check a litle and It is this UDF. SampleControls.au3 is exaclty the same gui @legend Next time please post a link to any UDF you are using when you want to get quick help. I will try to check it. Signature beginning:* Please remember: "AutoIt"..... * Wondering who uses AutoIt and what it can be used for ? * Forum Rules ** ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Code * for other useful stuff click the following button: Spoiler Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST API * ErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 * My contribution to others projects or UDF based on others projects: * _sql.au3 UDF * POP3.au3 UDF * RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF * SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane * Useful links: * Forum Rules * Forum etiquette * Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * Wiki: * Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX IE Related: * How to use IE.au3 UDF with AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskScheduler * IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related: * How to get reference to PDF object embeded in IE * IE on Windows 11 * I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions * EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *I also encourage you to check awesome @trancexx code: * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuff * OnHungApp handler * Avoid "AutoIt Error" message box in unknown errors * HTML editor * winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/ "Homo sum; humani nil a me alienum puto" - Publius Terentius Afer"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming" , be and \\//_. Anticipating Errors : "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty." Signature last update: 2023-04-24 Link to comment Share on other sites More sharing options...
mLipok Posted January 14, 2015 Share Posted January 14, 2015 (edited) Wow man I guess we do not understand. this is original SampleControls.au3 from _USkinLibrary UDF expandcollapse popup#AutoIt3Wrapper_Compression=0 ;Compression parameter 0-4 0=Low 2=normal 4=High. Default=2 #AutoIt3Wrapper_UseUpx=n ;(Y/N) Compress output program. Default=Y ; AutoIt 3.0.103 example ; 17 Jan 2005 - CyberSlug ; This script shows manual positioning of all controls; ; there are much better methods of positioning... #include <GuiConstantsEx.au3> #include <AVIConstants.au3> #include <TreeViewConstants.au3> ;----> Only the lines to skin your program... #include "_UskinLibrary.au3" ;-- _Uskin_LoadDLL() _USkin_Init(@ScriptDir & "\Skins\OldSkool.msstyles"); <-- Put here your skin... ;-- ; If you use skin embedded... ;_Uskin_LoadDLL() ;#include ".\Skins\OldSkool.au3" ;_USkin_Init(_OldSkool(True)) ;<---- ; GUI GuiCreate("Sample GUI", 400, 400) GuiSetIcon(@SystemDir & "\mspaint.exe", 0) ; MENU GuiCtrlCreateMenu("Menu&One") GuiCtrlCreateMenu("Menu&Two") GuiCtrlCreateMenu("MenuTh&ree") GuiCtrlCreateMenu("Menu&Four") ; CONTEXT MENU $contextMenu = GuiCtrlCreateContextMenu() GuiCtrlCreateMenuItem("Context Menu", $contextMenu) GuiCtrlCreateMenuItem("", $contextMenu) ;separator GuiCtrlCreateMenuItem("&Properties", $contextMenu) ; PIC GuiCtrlCreatePic("logo4.gif",0,0, 169,68) GuiCtrlCreateLabel("Sample pic", 75, 1, 53, 15) GuiCtrlSetColor(-1,0xffffff) ; AVI GuiCtrlCreateAvi("sampleAVI.avi",0, 180, 10, 32, 32, $ACS_AUTOPLAY) GuiCtrlCreateLabel("Sample avi", 170, 50) ; TAB GuiCtrlCreateTab(240, 0, 150, 70) GuiCtrlCreateTabItem("One") GuiCtrlCreateLabel("Sample Tab with tabItems", 250, 40) GuiCtrlCreateTabItem("Two") GuiCtrlCreateTabItem("Three") GuiCtrlCreateTabItem("") ; COMBO GuiCtrlCreatecombo("Sample Combo", 250, 80, 120, 100) ; PROGRESS GuiCtrlCreateProgress(60, 80, 150, 20) GuiCtrlSetData(-1, 60) GuiCtrlCreateLabel("Progress:", 5, 82) ; EDIT GuiCtrlCreateEdit(@CRLF & " Sample Edit Control", 10, 110, 150, 70) ; LIST GuiCtrlCreateList("", 5, 190, 100, 90) GuiCtrlSetData(-1, "a.Sample|b.List|c.Control|d.Here", "b.List") ; ICON GuiCtrlCreateIcon("shell32.dll", 1, 175, 120) GuiCtrlCreateLabel("Icon", 180, 160, 50, 20) ; LIST VIEW $listView = GuiCtrlCreateListView("Sample|ListView|", 110, 190, 110, 80) GuiCtrlCreateListViewItem("A|One", $listView) GuiCtrlCreateListViewItem("B|Two", $listView) GuiCtrlCreateListViewItem("C|Three", $listView) ; GROUP WITH RADIO BUTTONS GuiCtrlCreateGroup("Sample Group", 230, 120) GuiCtrlCreateRadio("Radio One", 250, 140, 80) GuiCtrlSetState(-1, $GUI_CHECKED) GuiCtrlCreateRadio("Radio Two", 250, 165, 80) GUICtrlCreateGroup ("",-99,-99,1,1) ;close group ; UPDOWN GuiCtrlCreateLabel("UpDown", 350, 115) GuiCtrlCreateInput("42", 350, 130, 40, 20) GuiCtrlCreateUpDown(-1) ; LABEL GuiCtrlCreateLabel("Green" & @CRLF & "Label", 350, 165, 40, 40) GuiCtrlSetBkColor(-1, 0x00FF00) ; SLIDER GuiCtrlCreateLabel("Slider:", 235, 215) GuiCtrlCreateSlider(270, 210, 120, 30) GuiCtrlSetData(-1, 30) ; INPUT GuiCtrlCreateInput("Sample Input Box", 235, 255, 130, 20) ; DATE GuiCtrlCreateDate("", 5, 280, 200, 20) GuiCtrlCreateLabel("(Date control expands into a calendar)", 10, 305, 200, 20) ; BUTTON GuiCtrlCreateButton("Sample Button", 10, 330, 100, 30) ; CHECKBOX GuiCtrlCreateCheckbox("Checkbox", 130, 335, 80, 20) GuiCtrlSetState(-1, $GUI_CHECKED) ; TREEVIEW ONE $treeOne = GuiCtrlCreateTreeView(210, 290, 80, 80) $treeItem = GuiCtrlCreateTreeViewItem("TreeView", $treeOne) GuiCtrlCreateTreeViewItem("Item1", $treeItem) GuiCtrlCreateTreeViewItem("Item2", $treeItem) GuiCtrlCreateTreeViewItem("Foo", -1) GuiCtrlSetState($treeItem, $GUI_EXPAND) ; TREEVIEW TWO $treeTwo = GuiCtrlCreateTreeView(295, 290, 103, 80, $TVS_CHECKBOXES) GuiCtrlCreateTreeViewItem("TreeView", $treeTwo) GuiCtrlCreateTreeViewItem("With", $treeTwo) GuiCtrlCreateTreeViewItem("tvs_checkboxes", $treeTwo) GuiCtrlSetState(-1, $GUI_CHECKED) GuiCtrlCreateTreeViewItem("Style", $treeTwo) ; GUI MESSAGE LOOP GuiSetState() While GuiGetMsg() <> $GUI_EVENT_CLOSE WEnd Here is the same code but modified by me, using my Writing DPI Awareness App - workaround (look in my signature) expandcollapse popup#AutoIt3Wrapper_Compression=0 ;Compression parameter 0-4 0=Low 2=normal 4=High. Default=2 #AutoIt3Wrapper_UseUpx=n ;(Y/N) Compress output program. Default=Y ; AutoIt 3.0.103 example ; 17 Jan 2005 - CyberSlug ; This script shows manual positioning of all controls; ; there are much better methods of positioning... #include <GuiConstantsEx.au3> #include <AVIConstants.au3> #include <TreeViewConstants.au3> #include <GDIPlus.au3> #include <MsgBoxConstants.au3> Global $bDPI_Awareness = MsgBox($MB_YESNO, 'Question:', 'Do you want to set DPI Awareness ?') = $IDYES ;----> Only the lines to skin your program... #include "_UskinLibrary.au3" ;-- _Uskin_LoadDLL() _USkin_Init(@ScriptDir & "\Skins\OldSkool.msstyles"); <-- Put here your skin... ;-- ; If you use skin embedded... ;_Uskin_LoadDLL() ;#include ".\Skins\OldSkool.au3" ;_USkin_Init(_OldSkool(True)) ;<---- ; GUI GuiCreate("Sample GUI", 400, 400) If $bDPI_Awareness Then GUISetFont(8.5 * _GDIPlus_GraphicsGetDPIRatio()[0]) EndIf GuiSetIcon(@SystemDir & "\mspaint.exe", 0) ; MENU GuiCtrlCreateMenu("Menu&One") GuiCtrlCreateMenu("Menu&Two") GuiCtrlCreateMenu("MenuTh&ree") GuiCtrlCreateMenu("Menu&Four") ; CONTEXT MENU $contextMenu = GuiCtrlCreateContextMenu() GuiCtrlCreateMenuItem("Context Menu", $contextMenu) GuiCtrlCreateMenuItem("", $contextMenu) ;separator GuiCtrlCreateMenuItem("&Properties", $contextMenu) ; PIC GuiCtrlCreatePic("logo4.gif",0,0, 169,68) GuiCtrlCreateLabel("Sample pic", 75, 1, 53, 15) GuiCtrlSetColor(-1,0xffffff) ; AVI GuiCtrlCreateAvi("sampleAVI.avi",0, 180, 10, 32, 32, $ACS_AUTOPLAY) GuiCtrlCreateLabel("Sample avi", 170, 50) ; TAB GuiCtrlCreateTab(240, 0, 150, 70) GuiCtrlCreateTabItem("One") GuiCtrlCreateLabel("Sample Tab with tabItems", 250, 40) GuiCtrlCreateTabItem("Two") GuiCtrlCreateTabItem("Three") GuiCtrlCreateTabItem("") ; COMBO GuiCtrlCreatecombo("Sample Combo", 250, 80, 120, 100) ; PROGRESS GuiCtrlCreateProgress(60, 80, 150, 20) GuiCtrlSetData(-1, 60) GuiCtrlCreateLabel("Progress:", 5, 82) ; EDIT GuiCtrlCreateEdit(@CRLF & " Sample Edit Control", 10, 110, 150, 70) ; LIST GuiCtrlCreateList("", 5, 190, 100, 90) GuiCtrlSetData(-1, "a.Sample|b.List|c.Control|d.Here", "b.List") ; ICON GuiCtrlCreateIcon("shell32.dll", 1, 175, 120) GuiCtrlCreateLabel("Icon", 180, 160, 50, 20) ; LIST VIEW $listView = GuiCtrlCreateListView("Sample|ListView|", 110, 190, 110, 80) GuiCtrlCreateListViewItem("A|One", $listView) GuiCtrlCreateListViewItem("B|Two", $listView) GuiCtrlCreateListViewItem("C|Three", $listView) ; GROUP WITH RADIO BUTTONS GuiCtrlCreateGroup("Sample Group", 230, 120) GuiCtrlCreateRadio("Radio One", 250, 140, 80) GuiCtrlSetState(-1, $GUI_CHECKED) GuiCtrlCreateRadio("Radio Two", 250, 165, 80) GUICtrlCreateGroup ("",-99,-99,1,1) ;close group ; UPDOWN GuiCtrlCreateLabel("UpDown", 350, 115) GuiCtrlCreateInput("42", 350, 130, 40, 20) GuiCtrlCreateUpDown(-1) ; LABEL GuiCtrlCreateLabel("Green" & @CRLF & "Label", 350, 165, 40, 40) GuiCtrlSetBkColor(-1, 0x00FF00) ; SLIDER GuiCtrlCreateLabel("Slider:", 235, 215) GuiCtrlCreateSlider(270, 210, 120, 30) GuiCtrlSetData(-1, 30) ; INPUT GuiCtrlCreateInput("Sample Input Box", 235, 255, 130, 20) ; DATE GuiCtrlCreateDate("", 5, 280, 200, 20) GuiCtrlCreateLabel("(Date control expands into a calendar)", 10, 305, 200, 20) ; BUTTON GuiCtrlCreateButton("Sample Button", 10, 330, 100, 30) ; CHECKBOX GuiCtrlCreateCheckbox("Checkbox", 130, 335, 80, 20) GuiCtrlSetState(-1, $GUI_CHECKED) ; TREEVIEW ONE $treeOne = GuiCtrlCreateTreeView(210, 290, 80, 80) $treeItem = GuiCtrlCreateTreeViewItem("TreeView", $treeOne) GuiCtrlCreateTreeViewItem("Item1", $treeItem) GuiCtrlCreateTreeViewItem("Item2", $treeItem) GuiCtrlCreateTreeViewItem("Foo", -1) GuiCtrlSetState($treeItem, $GUI_EXPAND) ; TREEVIEW TWO $treeTwo = GuiCtrlCreateTreeView(295, 290, 103, 80, $TVS_CHECKBOXES) GuiCtrlCreateTreeViewItem("TreeView", $treeTwo) GuiCtrlCreateTreeViewItem("With", $treeTwo) GuiCtrlCreateTreeViewItem("tvs_checkboxes", $treeTwo) GuiCtrlSetState(-1, $GUI_CHECKED) GuiCtrlCreateTreeViewItem("Style", $treeTwo) ; GUI MESSAGE LOOP GuiSetState() While GuiGetMsg() <> $GUI_EVENT_CLOSE WEnd ;###################################################################################################################################### ; #FUNCTION# ==================================================================================================================== ; Name ..........: _GDIPlus_GraphicsGetDPIRatio ; Description ...: ; Syntax ........: _GDIPlus_GraphicsGetDPIRatio([$iDPIDef = 96]) ; Parameters ....: $iDPIDef - [optional] An integer value. Default is 96. ; Return values .: None ; Author ........: UEZ ; Modified ......: ; Remarks .......: ; Related .......: ; Link ..........: http://www.autoitscript.com/forum/topic/159612-dpi-resolution-problem/?hl=%2Bdpi#entry1158317 ; Example .......: No ; =============================================================================================================================== Func _GDIPlus_GraphicsGetDPIRatio($iDPIDef = 96) _GDIPlus_Startup() Local $hGfx = _GDIPlus_GraphicsCreateFromHWND(0) If @error Then Return SetError(1, @extended, 0) Local $aResult #forcedef $__g_hGDIPDll, $ghGDIPDll $aResult = DllCall($__g_hGDIPDll, "int", "GdipGetDpiX", "handle", $hGfx, "float*", 0) If @error Then Return SetError(2, @extended, 0) Local $iDPI = $aResult[2] Local $aresults[2] = [$iDPIDef / $iDPI, $iDPI / $iDPIDef] _GDIPlus_GraphicsDispose($hGfx) _GDIPlus_Shutdown() Return $aresults EndFunc ;==>_GDIPlus_GraphicsGetDPIRatio and I attach results The following screenshots was made in Windows 7 Pro x64 - With Classic theme, and 150% * STANDARD DPI Edited January 14, 2015 by mLipok Signature beginning:* Please remember: "AutoIt"..... * Wondering who uses AutoIt and what it can be used for ? * Forum Rules ** ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Code * for other useful stuff click the following button: Spoiler Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST API * ErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 * My contribution to others projects or UDF based on others projects: * _sql.au3 UDF * POP3.au3 UDF * RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF * SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane * Useful links: * Forum Rules * Forum etiquette * Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * Wiki: * Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX IE Related: * How to use IE.au3 UDF with AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskScheduler * IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related: * How to get reference to PDF object embeded in IE * IE on Windows 11 * I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions * EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *I also encourage you to check awesome @trancexx code: * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuff * OnHungApp handler * Avoid "AutoIt Error" message box in unknown errors * HTML editor * winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/ "Homo sum; humani nil a me alienum puto" - Publius Terentius Afer"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming" , be and \\//_. Anticipating Errors : "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty." Signature last update: 2023-04-24 Link to comment Share on other sites More sharing options...
willichan Posted January 15, 2015 Share Posted January 15, 2015 The msstyle skin only changes the GUI skin, not the whole windows skin.The skinning UDFs are for skinning the AutoIt Script's GUI.Are you trying to apply a skin to Windows? That is something completely different. My UDFs: Barcode Libraries, Automate creation of any type of project folder, File Locking with Cooperative Semaphores, Inline binary files, Continue script after reboot, WinWaitMulti, Name Aggregator, Enigma, CornedBeef Hash Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now