VERSION 5.00
Begin VB.UserControl png 
   Appearance      =   0  'Flat
   BackColor       =   &H00FFFFFF&
   BackStyle       =   0  'Transparent
   ClientHeight    =   3600
   ClientLeft      =   0
   ClientTop       =   0
   ClientWidth     =   4800
   ClipBehavior    =   0  'None
   ClipControls    =   0   'False
   ScaleHeight     =   3600
   ScaleWidth      =   4800
   Windowless      =   -1  'True
End
Attribute VB_Name = "png"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Public WithEvents png As cPNG
Attribute png.VB_VarHelpID = -1
Dim fileNam As String
Dim ax As Integer

Private Sub UserControl_Initialize()
    Set png = New cPNG
End Sub

Private Sub UserControl_Paint()
    If fileNam <> "" Then
        png.DrawToDC UserControl.hDC, 0, 0
    End If
    
    'PNG.DrawToDC UserControl.Parent.hDC, UserControl.CurrentX, UserControl.Current
    'frmMain.Pic.Cls
    'PNG.DrawToDC frmMain.Pic.hDC, UserControl.CurrentX, UserControl.Current
End Sub

Private Sub UserControl_Resize()
    'PNG.LoadPNGFile "C:\test.png"
    'PNG.DrawToDC UserControl.hDC, 0, 0
    'PNG.DrawToDC UserControl.Parent.hDC, UserControl.CurrentX, UserControl.CurrentY
    'frmMain.Pic.Cls
    'PNG.DrawToDC frmMain.Pic.hDC, UserControl.CurrentX, UserControl.CurrentY
End Sub

Public Sub setFile(fil As String)
    If fileNam <> fil Then
        fileNam = fil
        png.LoadPNGFile fil
        png.DrawToDC UserControl.hDC, 0, 0
    End If
End Sub

Public Function getfile() As String
    getfile = fileNam
End Function
