Page 13 of 18 FirstFirst ... 310111213141516 ... LastLast
Results 481 to 520 of 710

Thread: [vb6]Alpha Image Control v2 - Final Update (15 Jan 2012)

  1. #481

    Thread Starter
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: [vb6]Alpha Image Control v2 - Final Update (15 Jan 2012)

    I won't be updating this project any longer. Have plans on rewriting it to add a few major enhancements.

    But in the mean time, if you can describe exactly what isn't working, maybe I can help. If it is related to your 'enhancements' then you'll need to fix what your broke.
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  2. #482
    New Member
    Join Date
    Jul 2014
    Location
    Argentina
    Posts
    6

    Re: [vb6]Alpha Image Control v2 - Final Update (15 Jan 2012)

    I simply added some text property to show as overlay, some textaligment properties, and same textdisplay offsets. I dont think this can mess up the things i'll describe you later.

    The thing is i want to resize the control in full screen in the secondary display adapter and the control doesnt take the new width and height values. i think its related to the thing that it takes vb6 screen object max measures and the control i'm tryin to resize is bigger than this measures since the secondary display is an hd tv!

    Thanks a lot.

  3. #483

    Thread Starter
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: [vb6]Alpha Image Control v2 - Final Update (15 Jan 2012)

    i think its related to the thing that it takes vb6 screen object max measures
    Bingo. Within the usercontrol's sptGetScaledSizes routine, look for the following lines of code:
    Code:
                If ucCx > Screen.Width \ Screen.TwipsPerPixelX Then ucCx = Screen.Width \ Screen.TwipsPerPixelX
                If ucCy > Screen.Height \ Screen.TwipsPerPixelY Then ucCy = Screen.Height \ Screen.TwipsPerPixelY
    Exist in a couple places in that method. Rem those out and see what happens. May just be the trick.

    Search the entire project for Screen.Width and/or Screen.Height. These are used in a couple of other classes, other code.
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  4. #484
    New Member
    Join Date
    Jul 2014
    Location
    Argentina
    Posts
    6

    Re: [vb6]Alpha Image Control v2 - Final Update (15 Jan 2012)

    Thanks for your quick response!
    I've already done this... but with no efect!
    I'll give it a second shot, and tell how it went...

    Thanks again!

  5. #485

    Thread Starter
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: [vb6]Alpha Image Control v2 - Final Update (15 Jan 2012)

    Well, those are the only lines that are restricting size. Keep in mind that a control may be limited in size by VB itself.

    The max size vb will allow resizing appears to be 32767 x 32767 pixels. Don't know how large that HDtv screen is. Can you post the screen size reported for the tv & the maximum size reported by the Alpha Image Control (it's public ScaledWidth & ScaledHeight properties). Keep in mind that the control's size will be in pixels while the screen measurements are in twips; so divide screen measurements by TwipsPerPixelX/Y as appropriate for comparisons
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  6. #486
    New Member
    Join Date
    Jul 2014
    Location
    Argentina
    Posts
    6

    Re: [vb6]Alpha Image Control v2 - Final Update (15 Jan 2012)

    Thanks a lot for your unvaluable support.
    Commenting out those lines did the magic!
    The first time i tried it was not working because on the testing machine the ocx was not updated.
    I updated the modified one manually and voila, as expected.

    Thanks again for your support.

  7. #487

    Thread Starter
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: [vb6]Alpha Image Control v2 - Final Update (15 Jan 2012)

    Cool. Didn't think your tv would be near 33K pixels in size
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  8. #488
    New Member
    Join Date
    Jul 2014
    Location
    Argentina
    Posts
    6

    Re: [vb6]Alpha Image Control v2 - Final Update (15 Jan 2012)

    It is not! But the problem i suppouse that raises is, that the main screen is only 1024 x 768 and the secondary screen bigger than that (1920x1080).
    I guess problem is, that the control is not aware on which display its beeing shown, and since the vb6 Screen object does not know anything about the extended desktop.

    Thanks a lot again.
    Bye.

  9. #489
    Addicted Member
    Join Date
    Jun 2009
    Location
    C:\Windows\SysWOW64\
    Posts
    227

    Re: [vb6]Alpha Image Control v2 - Final Update (15 Jan 2012)

    Now, LaVolpe, that's another issue to take into account for the new control

  10. #490

    Thread Starter
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: [vb6]Alpha Image Control v2 - Final Update (15 Jan 2012)

    Quote Originally Posted by Cube8 View Post
    Now, LaVolpe, that's another issue to take into account for the new control
    Referring to a re-write? It already is addressed... accidentally. Instead of restricting a control's size to the desktop size, hardcoded the restriction <= 32767 or user-defined value
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  11. #491
    New Member
    Join Date
    Nov 2014
    Posts
    2

    Re: [vb6]Alpha Image Control v2 - Final Update (15 Jan 2012)

    Hello Sir!
    First I'm Saying very thank you for giving us this amazing activex control

    I'm working with small personal project. I need to know how do i zoom image using this control. I tried your samples but i didn't get what i need actually. I need to zoom image without scaling control size and can i move zoomed image while moving mouse on the control? I'm a beginner to VB6. And sorry for my bad English. hope u help me. Thank you sir

  12. #492

    Thread Starter
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: [vb6]Alpha Image Control v2 - Final Update (15 Jan 2012)

    I don't fully understand, zooming without scaling? In order to zoom in/out, you are changing the scale of what you are looking at?

    Maybe this is what you are talking about? A rectangle moves with the mouse. The area inside the rectangle is zoomed only, not the entire image?
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  13. #493
    New Member
    Join Date
    Nov 2014
    Posts
    2

    Re: [vb6]Alpha Image Control v2 - Final Update (15 Jan 2012)

    Quote Originally Posted by LaVolpe View Post
    I don't fully understand, zooming without scaling? In order to zoom in/out, you are changing the scale of what you are looking at?

    Maybe this is what you are talking about? A rectangle moves with the mouse. The area inside the rectangle is zoomed only, not the entire image?

    Hello,
    Thanks for replying. I meant that the entire image is being zoomed. Once it's zoomed the using the mouse pointer the image is to be scrolled (top to bottom,left or right) but without the scroll bars. If this idea is more advance the "the rectangle move with the mouse" is okay! Thank you!

  14. #494

    Thread Starter
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: [vb6]Alpha Image Control v2 - Final Update (15 Jan 2012)

    Actually, sliding it within its frame is much simpler.

    1) AlphaImageCtrl properties that should be set:
    WantMouseEvents=True

    2) Declare 2 new variables at top of your form: Private m_ImgX As Single, m_ImgY As Single

    3) AlphaImageCtrl events
    Code:
    Private Sub AlphaImgCtl1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
        If Button = vbLeftButton Then
            m_ImgX = X - AlphaImgCtl1.XOffset
            m_ImgY = Y - AlphaImgCtl1.YOffset
        End If
    End Sub
    Private Sub AlphaImgCtl1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
        If Button = vbLeftButton Then AlphaImgCtl1.SetOffsets X - m_ImgX, Y - m_ImgY
    End Sub
    Now you can slide the image within its bounds.

    If you wish to use that pan/zoom example and see how the above tweaks work, suggest adding this to that project after you've added the above tweaks:

    1) In the AlphaImgCtl1_DblClick() event, add this: AlphaImgCtl1.SetOffsets 0, 0
    2) In the AlphaImgCtl1_PrePaint() event, add the offsets:
    Code:
            AlphaImgCtl1.Picture.Render hdc, (AlphaImgCtl1.Width - (AlphaImgCtl1.Width * zoomOffset)) \ 2 + HScrollPan.Value * zoomOffset + AlphaImgCtl1.XOffset, _
                (AlphaImgCtl1.Height - (AlphaImgCtl1.Height * zoomOffset)) \ 2 + VScrollPan.Value * zoomOffset + AlphaImgCtl1.YOffset, _
                AlphaImgCtl1.Width * zoomOffset, AlphaImgCtl1.Height * zoomOffset, , , , , , _
                AlphaImgCtl1.Effects.AttributesHandle, , AlphaImgCtl1.Effects.EffectsHandle(AlphaImgCtl1.Effect)
    Edited: To see the changes, slide ^^ to the right & see the blue, bold additions

    Ensure the control's container ScaleMode is vbPixels
    Last edited by LaVolpe; Nov 28th, 2014 at 12:48 AM.
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  15. #495
    Junior Member
    Join Date
    Dec 2014
    Posts
    17

    Re: [vb6]Alpha Image Control v2 - Final Update (15 Jan 2012)

    Hi, Alpha Image Control is awesome, I've tried different examples and I'm really impressed !
    I'm looking for a way to displays png files (with some transparent areas) on the top of a VLC (videolan) control.

    To do that I think that a second transparent form above the one with the VLC control could be a good way.
    If find a good example here and here based on GDI+ to make transparents forms and just displaying a PNG but when I try to animate it I don't have good results (a lot of CPU and a lack of fluidity on old computers). UpdateLayeredWindow from "user32.dll" seems to be a good way to make a transparent forms but I'm not a good enough developer to adapt it with Alpha Image Control.

    So my questions are :
    Do you know a way to display and animate PNG with transparency above controls (like buttons, VLC...) ? My choice is a transparent form but may be it's not the right way...
    If a second and transparent form is the good way, do you think possible to adapt UpdateLayeredWindow with Alpha Image Control or is there another way to make it ?


    Thank you very much .

  16. #496

    Thread Starter
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: [vb6]Alpha Image Control v2 - Final Update (15 Jan 2012)

    Interesting idea, especially for animation. Here's some tips/steps to get you going. But you kinda hurt my feelings when you offered those examples from PlanetSourceCode and didn't include mine which could be found here. Just kidding about hurt feelings

    1) Add the alpha image control (AIC) to a test form and add an image to it, ensure it animates correctly when the form is in runtime. Once this is verified, we can play.
    2) Gonna need quite a few APIs and I'll list them below & provide some code to get you started
    3) Ensure the AIC is sized same as you want the form sized (remember just testing), doesn't matter where it is positioned. Make the form borderless
    4) The AIC props: Enabled=False, AlignCenter=False, Aspect=Scaled
    Note: if rotating image, then AlignCenter=True, but you have to offset where to paint in the PaintImageAsDrawnToHDC calls on the form
    5) Paste this code in the form & change the AIC name to what you called your AIC
    6) Load, run & play. Double click on the form to unload it. Click, hold & drag to move it.
    7) Never make the form 100% transparent. You may need task manager to kill it.

    Most of the code below is needed for applying ULW to the form. You are using the AIC for just 2 reasons: notify when new animated frame is rendered and to draw the frame to another hDC. If you are manually updating the AIC to a new image thereby animating it yourself, you would simply erase the memory bitmap (via FillMemory API) & then call the pvUpdateWindow after setting the AIC image
    Code:
    Option Explicit
    
    Private Declare Function UpdateLayeredWindow Lib "user32.dll" (ByVal hWnd As Long, ByVal hdcDst As Long, ByRef pptDst As Any, ByRef psize As Any, ByVal hdcSrc As Long, ByRef pptSrc As Any, ByVal crKey As Long, ByRef pblend As Long, ByVal dwFlags As Long) As Long
    Private Declare Function GetWindowLong Lib "user32.dll" Alias "GetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long) As Long
    Private Declare Function SetWindowLong Lib "user32.dll" Alias "SetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
    Private Declare Function SetLayeredWindowAttributes Lib "user32.dll" (ByVal hWnd As Long, ByVal crKey As Long, ByVal bAlpha As Byte, ByVal dwFlags As Long) As Long
    Private Declare Function ReleaseCapture Lib "user32.dll" () As Long
    Private Declare Function SendMessage Lib "user32.dll" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByRef lParam As Any) As Long
    Private Declare Function GetDC Lib "user32.dll" (ByVal hWnd As Long) As Long
    Private Declare Function SelectObject Lib "gdi32.dll" (ByVal hdc As Long, ByVal hObject As Long) As Long
    Private Declare Function DeleteObject Lib "gdi32.dll" (ByVal hObject As Long) As Long
    Private Declare Function ReleaseDC Lib "user32.dll" (ByVal hWnd As Long, ByVal hdc As Long) As Long
    Private Declare Sub FillMemory Lib "kernel32.dll" Alias "RtlFillMemory" (ByRef Destination As Any, ByVal Length As Long, ByVal Fill As Byte)
    Private Declare Function CreateCompatibleDC Lib "gdi32.dll" (ByVal hdc As Long) As Long
    Private Declare Function CreateDIBSection Lib "gdi32.dll" (ByVal hdc As Long, ByRef pBitmapInfo As Any, ByVal un As Long, ByRef lplpVoid As Long, ByVal Handle As Long, ByVal dw As Long) As Long
    Private Declare Function DeleteDC Lib "gdi32.dll" (ByVal hdc As Long) As Long
    Private Const WS_EX_LAYERED As Long = &H80000
    Private Const GWL_EXSTYLE As Long = -20
    Private Const ULW_ALPHA As Long = &H2
    Private Const ULW_COLORKEY As Long = &H1
    Private Const WM_NCLBUTTONDOWN As Long = &HA1
    Private Const HTCAPTION As Long = 2
    Private Const AC_SRC_ALPHA As Long = &H1
    Private Const AC_SRC_OVER As Long = &H0
    Private Const GWL_STYLE As Long = -16
    Private Const WS_BORDER As Long = &H800000
    Private Type POINTAPI
        X As Long
        Y As Long
    End Type
    
    Private Type Size
        cX As Long
        cY As Long
    End Type
    Private Type BITMAPINFOHEADER        ' GDI structure
        biSize As Long
        biWidth As Long
        biHeight As Long
        biPlanes As Integer
        biBitCount As Integer
        biCompression As Long
        biSizeImage As Long
        biXPelsPerMeter As Long
        biYPelsPerMeter As Long
        biClrUsed As Long
        biClrImportant As Long
    End Type
    
    Private m_hDC As Long, m_hBmp As Long, m_DIBptr As Long
    Private m_Opacity As Long
    Private m_MousePoints As POINTAPI
    Private m_Size As Size
    
    
    Private Sub AlphaImgCtl1_AnimationFrameChanged(Frame As Long)
        FillMemory ByVal m_DIBptr, m_Size.cX * m_Size.cY * 4&, 0
        AlphaImgCtl1.PaintImageAsDrawnToHDC m_hDC, 0, 0
        Call pvUpdateWindow
    End Sub
    
    Private Sub Form_DblClick()
        Unload Me
    End Sub
    
    Private Sub Form_Load()
       
        m_MousePoints.X = -1&
        m_Opacity = 255
        m_Size.cX = ScaleX(AlphaImgCtl1.Width, Me.ScaleMode, vbPixels)
        m_Size.cY = ScaleY(AlphaImgCtl1.Height, Me.ScaleMode, vbPixels)
        If pvCreateLWdc = False Then
            Stop
            ' error couldn't create a basic DC & bitmap
        End If
        Me.Move Me.Left, Me.Top, ScaleX(AlphaImgCtl1.Width, Me.ScaleMode, vbTwips), ScaleY(AlphaImgCtl1.Height, Me.ScaleMode, vbTwips)
        AlphaImgCtl1.PaintImageAsDrawnToHDC m_hDC, 0, 0
        SetWindowLong Me.hWnd, GWL_EXSTYLE, GetWindowLong(Me.hWnd, GWL_EXSTYLE) Or WS_EX_LAYERED
        Call pvUpdateWindow
        Show
        DoEvents
        AlphaImgCtl1.Animate2.StartAnimation
        
    End Sub
    
    Private Sub pvUpdateWindow()
        Dim srcPt As POINTAPI
        Dim lBlendFunc As Long
        lBlendFunc = AC_SRC_OVER Or (m_Opacity * &H10000) Or (AC_SRC_ALPHA * &H1000000)
        UpdateLayeredWindow Me.hWnd, 0&, ByVal 0&, m_Size, m_hDC, srcPt, 0&, lBlendFunc, ULW_ALPHA
    End Sub
    
    Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
        If Button = vbLeftButton And m_MousePoints.X > -1& Then
            If m_MousePoints.X <> X And m_MousePoints.Y <> Y Then
                ReleaseCapture
                m_MousePoints.X = -1
                SendMessage Me.hWnd, WM_NCLBUTTONDOWN, HTCAPTION, ByVal 0&
            End If
        End If
    End Sub
    
    Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
        If Button = vbLeftButton Then
            m_MousePoints.X = X
            m_MousePoints.Y = Y
        End If
    End Sub
    
    Private Function pvCreateLWdc() As Boolean
        Dim bhi As BITMAPINFOHEADER
        Dim tDC As Long
        With bhi
            .biBitCount = 32
            .biHeight = -m_Size.cY
            .biWidth = m_Size.cX
            .biPlanes = 1
            .biSize = Len(bhi)
        End With
        tDC = GetDC(0)
        m_hDC = CreateCompatibleDC(tDC)
        ReleaseDC 0, tDC
        m_hBmp = CreateDIBSection(m_hDC, bhi, 0&, m_DIBptr, 0&, 0&)
        If m_hBmp <> 0 Then
            m_hBmp = SelectObject(m_hDC, m_hBmp)
            pvCreateLWdc = True
        Else
            DeleteDC m_hDC: m_hDC = 0&
        End If
    End Function
    
    Private Sub Form_Unload(Cancel As Integer)
        If m_hBmp <> 0 Then
            DeleteObject SelectObject(m_hDC, m_hBmp)
            DeleteDC m_hDC
        End If
    End Sub
    Now the AIC wasn't designed for this. There is a waste of CPU cycles going on as the control is actually drawing on the form, but you can't see that. But the AIC does send us a message to let us know that animation frame changed & we can have the AIC paint to our memory DC. All is good, though double painting is going on. My CPU hardly noticed the animated form, larger the image, may be noticed a bit more? Have fun

    Edited: If you have any question regarding the posted code, ask.

    I think you may have given me a reason to add similar functionality in the new version of this control, if I ever get it done. A way to link the AIC to user-defined DC and do all the painting directly to that DC vs the AIC's DC (which is really its container's DC)

    The screenshot shown below is a single frame from a 20 frame animation. The form (goldfish) is 100% opaque and you can clearly see the alphablending through its fins. The source image is a PNG with various levels of translucency.

    Name:  Untitled.jpg
Views: 918
Size:  14.8 KB
    Last edited by LaVolpe; Dec 14th, 2014 at 02:49 PM. Reason: added screenshot
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  17. #497
    Junior Member
    Join Date
    Dec 2014
    Posts
    17

    Re: [vb6]Alpha Image Control v2 - Final Update (15 Jan 2012)

    Hi,

    Is there a way to use Drag & Drop on AIC without loading the file drooped ?
    I would like to check if my drooped file have the right dimensions (and some other things) before loading it in AIC (and optionally not loading it if the dimensions is not correct)

    Thank you !

  18. #498
    Addicted Member
    Join Date
    May 2011
    Posts
    230

    Re: [vb6]Alpha Image Control v2 - Final Update (15 Jan 2012)

    Quote Originally Posted by Frido View Post
    Hi at all,
    i found this control a fiew days ago, and it is a great one.
    I tested it a fiew times, and i understand the most features.
    My question is, is it possible to shape a form with this control? I have nothin found about it, and no idea to do this.

    Sorry about my bad english! :-)
    Not sure why some have replied NO instantly, but it is indeed possible because I did it on one of my program but you need to use setwindowsLong also

    just use a transparent PNG, the PNG must NOT be an ALPHA transparency but a color transparency (like gif) You can achieve the result using the same color (let's say pure red, 255,0,0) IrfanView (free) can convert the png to the proper transparency for you

    the non transparent part would be the part you want to shape your form. then you apply setwindowslong and set the "red" color to be transparent.
    I used the same principle on one of my comercial program.

    The lavolpe control is not per say required though, but using it allow you to shape your form as a "skin"
    wich is way easier then using the exemple for "oval shape form"

  19. #499
    Addicted Member
    Join Date
    May 2011
    Posts
    230

    Re: [vb6]Alpha Image Control v2 - Final Update (15 Jan 2012)

    Hi Lavolpe, not sure why I never received a post that someone replied here... but I wanted to tell you again a big thanks for your control and wish you could continue developing thoses great product. I live my life supporting old Vb6 app for big organisation and your control saved me many time. I know I proposed it in past but what about a donation page for your control ? I could design it for you if you want. You deserve it.

  20. #500

    Thread Starter
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: [vb6]Alpha Image Control v2 - Final Update (15 Jan 2012)

    Quote Originally Posted by schmurtz View Post
    Hi,

    Is there a way to use Drag & Drop on AIC without loading the file drooped ?

    Thank you !
    Yes, of course
    Read the comments in the UserControl_OLEDragDrop event. If you have more questions, just ask.
    Last edited by LaVolpe; Aug 21st, 2015 at 02:54 PM.
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  21. #501

    Thread Starter
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: [vb6]Alpha Image Control v2 - Final Update (15 Jan 2012)

    Quote Originally Posted by VbNetMatrix View Post
    ... wish you could continue developing thoses great product.
    I will put out one more version of this control which will likely lead to minor revisions down the road. Off and on this year, I've been researching and testing lots of ideas. The new version which I hope to put up in a month or two will NOT be compatible with this version now. Some stuff will be removed and no longer supported, but the new version will add some new options and capabilities. Some major differences between this version & what will be coming...

    1) DPI awareness, to include per-monitor DPI-awareness and embedded DPI within the image format
    :: an option to have icon selection dependent on DPI changes will also be included (assuming icon contains multiple sizes)

    2) ICM (Image Color Management) for both source & destination

    3) Removing most UDT/TYPE declarations in the Global class and replacing them with Classes instead. This allows me more flexibility

    4) Internally, the class will render via a GDI+ matrix. User's won't notice anything new, but it helps simplify complex hit testing for shaped controls & also simplifies determining partial painting as needed

    5) Users will have more options to be involved in the rendering process: background painting, before image renders, rendering the image, after image renders & borders

    I wanted to address processing of animated frames by using background threads. Haven't found a stable solution that allows me to use GDI+ in multiple threads. This won't be included in the next version, but something I haven't given up on yet. Animation setup is a complete re-write for the control & will dramatically speed up initial load & display of 1st frame, but additional frames will be delay loaded. This will be an option: use the newer or older process.

    One of the larger options (code-wise) that will disappear is ability to download images from the web directly to the control. I am removing the responsibility from the AIC. User's will need to download their own images & pass the downloaded file or binary data to the control for loading.
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  22. #502
    Default Member Bonnie West's Avatar
    Join Date
    Jun 2012
    Location
    InIDE
    Posts
    4,060

    Re: [vb6]Alpha Image Control v2 - Final Update (15 Jan 2012)

    Quote Originally Posted by VbNetMatrix View Post
    Not sure why some have replied NO instantly, but it is indeed possible ...
    My interpretation of Frido's somewhat unclear question was that he was asking whether the AIC has built-in methods that can give a Form an arbitrary shape or not. At that time, the AIC didn't yet have such an ability (I haven't checked yet if it does now). However, as you have pointed out, the solution is quite easy and it is independent of LaVolpe's AIC.
    On Local Error Resume Next: If Not Empty Is Nothing Then Do While Null: ReDim i(True To False) As Currency: Loop: Else Debug.Assert CCur(CLng(CInt(CBool(False Imp True Xor False Eqv True)))): Stop: On Local Error GoTo 0
    Declare Sub CrashVB Lib "msvbvm60" (Optional DontPassMe As Any)

  23. #503
    Addicted Member
    Join Date
    May 2011
    Posts
    230

    Re: [vb6]Alpha Image Control v2 - Final Update (15 Jan 2012)

    That will be awesome... Thanks Lavolpe. I'm glad to know you're back on it but as a programist myself, I know time is not something we control
    but rest assure your new control will be waited for until it come!

    thanks again!

  24. #504
    Addicted Member
    Join Date
    May 2011
    Posts
    230

    Re: [vb6]Alpha Image Control v2 - Final Update (15 Jan 2012)

    Quote Originally Posted by Bonnie West View Post
    My interpretation of Frido's somewhat unclear question was that he was asking whether the AIC has built-in methods that can give a Form an arbitrary shape or not. At that time, the AIC didn't yet have such an ability (I haven't checked yet if it does now). However, as you have pointed out, the solution is quite easy and it is independent of LaVolpe's AIC.
    yes independant to Lavolpe Control, but much more easier to use with Lavolpe. Instead of using code like "oval form" like you pointed out, wich is very hard because you have to build the matrix of each point making the outside of your form, you just have to "draw" a png containing the form you want. Then you make a bordeless form, apply Lavolpe AIC containing your PNG (same size as form you want) then the outside of form just disapear using SetWindowsLong...

    wich is kind of pretty cool to make skin. More to that you could even make a program with skin that could be changed/design by user of the program wich would not be possible without AIC control

  25. #505
    Default Member Bonnie West's Avatar
    Join Date
    Jun 2012
    Location
    InIDE
    Posts
    4,060

    Re: [vb6]Alpha Image Control v2 - Final Update (15 Jan 2012)

    Quote Originally Posted by VbNetMatrix View Post
    yes independant to Lavolpe Control, but much more easier to use with Lavolpe. Instead of using code like "oval form" like you pointed out, wich is very hard because you have to build the matrix of each point making the outside of your form, you just have to "draw" a png containing the form you want. Then you make a bordeless form, apply Lavolpe AIC containing your PNG (same size as form you want) then the outside of form just disapear using SetWindowsLong...

    wich is kind of pretty cool to make skin. More to that you could even make a program with skin that could be changed/design by user of the program wich would not be possible without AIC control
    Or, for a more lightweight option, you could just render the PNG image directly on the Form using either GDI+, WIA v2.0 or other methods.
    On Local Error Resume Next: If Not Empty Is Nothing Then Do While Null: ReDim i(True To False) As Currency: Loop: Else Debug.Assert CCur(CLng(CInt(CBool(False Imp True Xor False Eqv True)))): Stop: On Local Error GoTo 0
    Declare Sub CrashVB Lib "msvbvm60" (Optional DontPassMe As Any)

  26. #506

    Thread Starter
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: [vb6]Alpha Image Control v2 - Final Update (15 Jan 2012)

    Quote Originally Posted by Bonnie West View Post
    Or, for a more lightweight option, you could just render the PNG image directly on the Form using either GDI+, WIA v2.0 or other methods.
    Fully concur. Using a ton of code wrapped in some AcitveX control or ActiveX DLL just because it is easy, is not a substitute for understanding what the specific task needs and supplying your own couple dozen lines of code instead. Using GDI+, loading and rendering a PNG on a VB hDC is just a handful of declarations & a few lines of code
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  27. #507
    Addicted Member
    Join Date
    May 2011
    Posts
    230

    Re: [vb6]Alpha Image Control v2 - Final Update (15 Jan 2012)

    Quote Originally Posted by LaVolpe View Post
    Fully concur. Using a ton of code wrapped in some AcitveX control or ActiveX DLL just because it is easy, is not a substitute for understanding what the specific task needs and supplying your own couple dozen lines of code instead. Using GDI+, loading and rendering a PNG on a VB hDC is just a handful of declarations & a few lines of code
    No offense intended, but my speciality is database, your speciality (in this case) is Graphics. for you, playing with GDI+ is easy. for me, it's simpler using your component to apply the graphics. for other users like me who doesn't play much with GDI, your component will remain a source to save time (and money) instead of having to debug our own code in a speciality we don't have (GDI) Your component is the best

  28. #508

    Thread Starter
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: [vb6]Alpha Image Control v2 - Final Update (15 Jan 2012)

    No offense taken and no offense meant by my posting. For example, one can install this image control or Olaf's vbRichClient to render a PNG to a form. But it is overkill if that is the only purpose for using those ActiveX objects. How simple is it to draw a PNG onto a form? Very little research would be needed. GDI+ has been out and about for a long time now and exists on every O/S since XP. Here's 8 API calls needed for such a minor task:

    GdiplusStartup: starts GDI+
    GdipLoadImageFromFile: loads the PNG
    GdipCreateFromHDC: use your form's hDC
    GdipGetImageBounds: get size of PNG
    GdipDrawImageRectRectI: draw/scale PNG to your form size
    GdipDeleteGraphics: clean up
    GdipDisposeImage: clean up
    GdiplusShutdown: stop GDI+

    ... Your component is the best
    Thank you. I have been a bit disappointed that other VBers out there have not created more replacements for the VB image and picturebox controls to support alpha-blended image formats. Rendering these are simple enough, but rendering is not the same as a userccontrol that can be used in design-time and used by those with little graphics experience
    Last edited by LaVolpe; Aug 22nd, 2015 at 09:26 AM.
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  29. #509
    Addicted Member
    Join Date
    May 2011
    Posts
    230

    Re: [vb6]Alpha Image Control v2 - Final Update (15 Jan 2012)

    Quote Originally Posted by LaVolpe View Post
    No offense taken
    Glad to hear, I know in past my choose of wording might not be the most appropriated and could lead to confusion and I'm sorry for that

    Quote Originally Posted by LaVolpe View Post
    Thank you. I have been a bit disappointed that other VBers out there have not created more replacements for the VB image and picturebox controls to support alpha-blended image formats. Rendering these are simple enough, but rendering is not the same as a userccontrol that can be used in design-time and used by those with little graphics experience
    If I had time, I would follow your step and put my own work online in Database ADO replacement for Vb6. My component is so much simpler to use then the one provided by Vb6 . You really inspired me in many way.

    I wanted to ask you a question... Would it be possible to make the new component "wise" compiling to avoid including format
    that we don'T use ? for myself, I'm using JPG and PNG, I would prefer to have a component with only thoses capability...
    GIF and most other component (RLE) and compagny are subject to die in a few years. (in my opinion)

    it would probably be too much trouble to strip the component like that... but it would remove some overload on the rendering (? checking format all the time) part and could probably be much more efficient in term of speed. Could be used in "small" animation game.

    what you think ?

  30. #510
    Addicted Member
    Join Date
    May 2011
    Posts
    230

    Re: [vb6]Alpha Image Control v2 - Final Update (15 Jan 2012)

    Quote Originally Posted by LaVolpe View Post
    GdiplusStartup: starts GDI+
    GdipLoadImageFromFile: loads the PNG
    GdipCreateFromHDC: use your form's hDC
    GdipGetImageBounds: get size of PNG
    GdipDrawImageRectRectI: draw/scale PNG to your form size
    GdipDeleteGraphics: clean up
    GdipDisposeImage: clean up
    GdiplusShutdown: stop GDI+
    I'll check that out as soon I got time
    thanks alot for your help

  31. #511

    Thread Starter
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: [vb6]Alpha Image Control v2 - Final Update (15 Jan 2012)

    Quote Originally Posted by VbNetMatrix View Post
    I wanted to ask you a question... Would it be possible to make the new component "wise" compiling to avoid including format
    that we don'T use ? for myself, I'm using JPG and PNG, I would prefer to have a component with only thoses capability...

    what you think ?
    I actually considered that because I felt same as you that some may want to use the control just for image formats not supported by VB. I may offer the ability and explain to users how to activate it, but undecided which method to use. As is, the control supports images contained in these file formats: bmp, jpg, gif, wmf, emf, ico, cur, animated ico/cur, tif, png, apng, tga, pcx, pnm, pam, avi, mp3/wma and contained in binaries like DLLs, exes, ocxs. Any other format is indirectly supported by supplying the control a byte array of the image in RGB format.

    1) Format-specific properties, constants, enumerations, functions & even classes would be surrounded by conditional IF statements, i.e., #IF IncludeWMF Then ... #End If. A list of those Include### variables would exist in the project's properties window and would be required to be updated by the user before the control was compiled. Once compiled, any unsupported code would be excluded during compiling. Internally bmp format would always be supported

    2) Use outside DLLs, i.e., EncoderPNGsupport.DLL, EncoderTGAsupport.DLL, etc. This would be like using add-ins for the control. During design-time and runtime, if the DLLs existed, then the control would include those formats else it would not. Maybe the DLLs would be attached to the image control during design/runtime via a property. I would create the DLLs and they would be included with the image control source code.

    3) I also considered a LITE version of the control that only handled VB image formats + PNG + TIFF.

    This topic is still under consideration and if offered, I'd likely go with option #1 or #3. Haven't made up my mind.

    it would probably be too much trouble to strip the component like that... but it would remove some overload on the rendering (? checking format all the time) part and could probably be much more efficient in term of speed. Could be used in "small" animation game.
    Supporting formats does not produce any real additional overhead. Once an image is loaded, it exists in bmp format internally, either directly by my logic or indirectly via GDI+. The image load logic I'm using in the new version checks just 8 bytes of the image data to determine the format. Even if the format cannot be 100% decided based on just those 8 bytes, at most the logic requires just two load attempts to positively confirm the format. Rendering speed is not dependent on format, with exception of animation. The current animation routines in the control can be sped up by pre-building the frames vs. building each on demand & that is new to the future control

    The only true advantage of excluding sections of code relevant to formats that you do not need to be supported would be making the control file size smaller. Each format is a separate class within the control. If the format is not loaded into the control, then the class is not loaded.
    Last edited by LaVolpe; Aug 22nd, 2015 at 11:30 AM.
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  32. #512
    Addicted Member
    Join Date
    May 2011
    Posts
    230

    Red face Re: [vb6]Alpha Image Control v2 - Final Update (15 Jan 2012)

    Quote Originally Posted by LaVolpe View Post
    3) I also considered a LITE version of the control that only handled VB image formats + PNG + TIFF.
    This topic is still under consideration and if offered, I'd likely go with option #1 or #3. Haven't made up my mind.

    a lite version !!!! ohhhhh!
    would be nice... but would require to double the work... each time you fix a bug, you'll have to fix it in twice component... sadly.

    btw, can you enlight me on something... what the TIFF format has over png ? I know TIFF is more "raw" and doesn't compress much. but since PNG doesn't degrade... can't see the advantage of TIFF over png.

  33. #513

    Thread Starter
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: [vb6]Alpha Image Control v2 - Final Update (15 Jan 2012)

    Double the work? Nah, enough forethought & then the same control can be converted to a LITE version with conditional compilation arguments.

    TIFF allows multiple pages (maybe biggest advantage). TIFF also allows other color spaces like CMYK and far more metadata tags. TIFF can compress using more than 1 technique: LZW, JPEG, CCIT among others. TIFF doesn't degrade either unless compressing using JPEG-style compression.
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  34. #514
    Frenzied Member
    Join Date
    May 2014
    Location
    Kallithea Attikis, Greece
    Posts
    1,289

    Re: [vb6]Alpha Image Control v2 - Final Update (15 Jan 2012)

    Lavolpe have you ever check if gdiplus run without hangs in windows 64 bit; Because I had to through the jpg export after found that when more than one exe use gdi plus one of them hang on exit, some times more than one.

  35. #515

    Thread Starter
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: [vb6]Alpha Image Control v2 - Final Update (15 Jan 2012)

    Quote Originally Posted by georgekar View Post
    Lavolpe have you ever check if gdiplus run without hangs in windows 64 bit; Because I had to through the jpg export after found that when more than one exe use gdi plus one of them hang on exit, some times more than one.
    Nope, never seen an issue. VB runs in a 32 bit process. Any issues are likely the result of improper start/stopping of GDI+? I personally never load GDI+ more than once in a process.

    Note: GDI+ uses hooking. When you start up GDI+, it creates a top-level window in another thread attached to your process. If you do not close down GDI+ while in the IDE, i.e., END statement encountered, hitting the STOP button, etc, then whatever event you stop GDI+ in will not be called. This can produce a crash, not immediately, but likely to happen. So, the tip here, is just like subclassing/hooking for anything else, only close your project normally when using GDI+ in the IDE.

    Other crash-related issues could be due to improper usage: creating a graphics object and using GDI operations on the DC that the graphics object is attached to. Not deleting GDI+ objects you created, create an image from file/array and somehow delete that source before the image is destroyed, and other possible reasons.
    Last edited by LaVolpe; Aug 24th, 2015 at 08:41 AM.
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  36. #516
    Frenzied Member
    Join Date
    May 2014
    Location
    Kallithea Attikis, Greece
    Posts
    1,289

    Re: [vb6]Alpha Image Control v2 - Final Update (15 Jan 2012)

    I don't have problem in IDE. I had prepared a revision with per exe startup and shutdown, no per command in M2000, nothing change. Same problem. When I remove gdiplus and replace the routine to save jpg with a vb class...no problem.,All test run perfect.Check it with this scenario...One exe call 10 other exe end each one first run a delay and then save a picture in a jpg file with the help of gdiplus. So check if all programs ends properly. You can check task manager and temporary folder for that.

  37. #517

    Thread Starter
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: [vb6]Alpha Image Control v2 - Final Update (15 Jan 2012)

    Don't know what to tell you, other than I think you are doing something incorrectly. If you are starting 10 different applications, each application is running in its own process and each GDI+ startup is attached to that unique process. Good luck troubleshooting it.
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  38. #518
    Frenzied Member
    Join Date
    May 2014
    Location
    Kallithea Attikis, Greece
    Posts
    1,289

    Re: [vb6]Alpha Image Control v2 - Final Update (15 Jan 2012)

    So you say that in windows 8 and up, at 64 bit you never see a problem in a vb exe when exit...Do you ever check temporary folder to see if your application remove temporary files?

  39. #519

    Thread Starter
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: [vb6]Alpha Image Control v2 - Final Update (15 Jan 2012)

    Quote Originally Posted by georgekar View Post
    So you say that in windows 8 and up, at 64 bit you never see a problem in a vb exe when exit...Do you ever check temporary folder to see if your application remove temporary files?
    I don't have Win8 or higher. I have never had anyone report an issue like yours for anything I've created that uses GDI+. I do know that no matter what, if VB is terminated incorrectly (crashes for example), temp files are not removed. If they are not removed under normal use and closure, I haven't a clue.
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  40. #520
    Frenzied Member
    Join Date
    May 2014
    Location
    Kallithea Attikis, Greece
    Posts
    1,289

    Re: [vb6]Alpha Image Control v2 - Final Update (15 Jan 2012)

    The point is that vb not crash, but not closed either. This in not happen every time, that is the mystery. So with my example with 10 exe that runs all together we get some of them "not responsed". I put msgboxes to check where are problem and i found that problem was after all objects closed. I believe that is a problem in GDI+.
    You said that you never use Win8. So I never else I use windows 8 but after a look at Windows 10 64bit I found relative problem, so in my home computer I do an installation of a Win 8 os in Virtual box (I can't install Windows 10..) and start to check the temp file and task manager. If I didn't do that then a I said all is ok...because vb program indeed close the UI, but not the connetion with GDI+ . And I try with one token only. Not always happen and that is very bad...Because we have to replicate the problem to solve.
    Last edited by georgekar; Aug 24th, 2015 at 12:53 PM.

Page 13 of 18 FirstFirst ... 310111213141516 ... LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width