Jump to content

Recommended Posts

  • Jon featured and pinned this topic
Posted

Dear Devs, please do that AutoIt support built-in *.png formats As: GuiCtrlCreatePic("Image.png", 0, 0, 100, 100);

This most problem for autoiters. Thanks

Recomended.png.6706221e0fb8a0eeee5f85479e779d7b.png All my tutorials >> Watch join.png.73002e34fb939ced80e2e5ae1b4c1d95.png

Posted
  On 5/22/2020 at 2:08 PM, Se7enstars said:

This most problem for autoiters. Thanks

Expand  

Is there any basis for this assumption?

What @Jon  (and others) are currently implementing is, in my opinion, far more important for the whole (AutoIt-)community.

Of course, native support of the PNG format would be a nice feature, but not of essential relevance. Besides, there are already several solutions using GDIPlus, e.g. :

add-png-image-in-a-gui-window

https://autoit.de/thread/45353-guictrlsetimageex/ (german)

and some of @UEZ  (as usual when it comes to GDIPlus :lol:)

Musashi-C64.png

"In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move."

  • Moderators
Posted

Se7enstars,

Look in my ExtMsgBox UDF to see how to display .png files - based on code from UEZ the GDI guru. You will see that it is not difficult.

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

  Reveal hidden contents

 

Posted

As about PNG support in GUICtrlCreatePic(), there is ResourceEx UDF for this,

so you can do it simply by 4 lines of code:

1) embed PNG to resources - #AutoIt3Wrapper_Res_File_Add=png_1.png, RT_RCDATA, PNG_1, 0

2) include UDF - #include 'ResourcesEx.au3'

3) create empty Pic control - $iPic_1 = GUICtrlCreatePic('', 0, 0, 100, 100)

4) set PNG image from resources to Pic control - _Resource_SetToCtrlID($iPic_1, 'PNG_1')

 

 

  • 3 weeks later...
  • Moderators
Posted

Jon,

Can you take a look at this thread please - an interesting anomaly in Map syntax:

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

  Reveal hidden contents

 

  • 8 months later...
Posted

Hello,

Are there any official locations where this Beta version can be downloaded as a Zip file?  I'm intending to run this version on a system where I don't have permission to run installers.

I can see that the installer itself can be opened as a Zip file, but the folder structure is somewhat unclear:

image.png.473a18d35f6d2716a927759026c176dd.png

  • 3 weeks later...
Posted (edited)
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

$Form1 = GUICreate('Form1', 300, 200, -1, -1, $WS_SIZEBOX)
$PIC = GUICtrlCreatePic(@AutoItExe & '\..\Examples\GUI\msoobe.jpg', 0, 0, 300, 300)
GUICtrlSetResizing(-1, $GUI_DOCKBORDERS)
GUISetState()

While GUIGetMsg() <> $GUI_EVENT_CLOSE
WEnd

Created image does not accept the resizing.

Also if we use GUICtrlSetPos, it will move the image relative to it's current position.

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

$Form1 = GUICreate('Form1', 300, 200, -1, -1, $WS_SIZEBOX)
$aPos1 = WinGetClientSize($Form1)
$iPic = GUICtrlCreatePic(@AutoItExe & '\..\Examples\GUI\msoobe.jpg', 0, 0, $aPos1[0], $aPos1[1])
;GUICtrlSetResizing(-1, $GUI_DOCKBORDERS)
GUISetState()

While GUIGetMsg() <> $GUI_EVENT_CLOSE
    $aPos = WinGetClientSize($Form1)
    
    If $aPos[0] <> $aPos1[0] Or $aPos[1] <> $aPos1[1] Then
        GUICtrlSetPos($iPic, 0, 0, $aPos[0], $aPos[1])
        $aPos1 = $aPos
    EndIf
WEnd

In 3.3.15.1 it was working fine.

Edited by MrCreatoR

 

  Reveal hidden contents

 

 

AutoIt is simple, subtle, elegant. © AutoIt Team

Posted

It was a regression introduce when fixing the #2962

it was fix as you suggest but it was wrong I sent a fix to Jon  for the next beta.

Thanks

Cheers

Posted
  On 3/17/2021 at 8:38 AM, jpm said:

it was fix as you suggest

Expand  

Oh i see now, so in the Beta the $SS_CENTERIMAGE style is forced.

I only pointed out that this can solve the issue for the user, but did not suggested it as a permanent solution.

Sorry for that, i hope you will find a correct solution for the problem without braking other functionality :).

 

  Reveal hidden contents

 

 

AutoIt is simple, subtle, elegant. © AutoIt Team

  • Jon unfeatured and unpinned this topic
  • 3 weeks later...

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...