Code Search for Developers
 
 
  

mXPFrameFix.bas from convert ogm, mkv to avi with subtitle at Krugle


Show mXPFrameFix.bas syntax highlighted

Attribute VB_Name = "mXPFrameFix"
'****************************************************************************************
'Module:        mXPFrameFix - BAS Module
'Filename:      mXPFrameFix.bas
'Author:        Jim Kahl
'Purpose:       simply provide calls and routine necessary to change the appearance of
'               controls contained inside frames to how they should look
'****************************************************************************************
Option Explicit

'****************************************************************************************
'API CONSTANTS
'****************************************************************************************
Private Const ICC_USEREX_CLASSES = &H200

'****************************************************************************************
'API TYPES
'****************************************************************************************
Private Type INITCOMMONCONTROLSTYPE
   dwSize As Long
   dwICC As Long
End Type

'****************************************************************************************
'API FUNCTIONS
'****************************************************************************************
Private Declare Function InitCommonControlsEx Lib "comctl32.dll" ( _
                iccex As INITCOMMONCONTROLSTYPE) _
                As Boolean
Private Declare Function SetParent Lib "user32.dll" ( _
                ByVal hWndChild As Long, _
                ByVal hWndNewParent As Long) _
                As Long
Private Declare Function LockWindowUpdate Lib "user32.dll" ( _
                ByVal hwndLock As Long) _
                As Long

'****************************************************************************************
'METHODS - PUBLIC
'****************************************************************************************

Public Sub FixFramedControls(ByRef frm As Form)
    'Purpose:       to cause command buttons and option buttons conatined inside frames
    '               to appear the way that they are supposed to under Windows XP
    'Parameters:    frm - reference to the form that contains the control
    Dim ctl As Control
    Dim ctlChild As Control
    Dim Pic As PictureBox
    Dim lIdx As Long
    Dim lXBorder As Long
    Dim lYBorder As Long
    Dim lLeft As Long
    Dim lTop As Long
    Dim lWidth As Long
    Dim lHeight As Long
    Dim lCnt As Long
    
    On Error GoTo ErrHandler
    
    LockWindowUpdate frm.hwnd
    
    For Each ctl In frm.Controls
        If TypeOf ctl Is Frame Then
            lCnt = lCnt + 1
            'add a picture box inside the frame to contain the controls
            Set Pic = frm.Controls.Add("VB.PictureBox", "picHolder" & lCnt, frm)
            
            'make sure the picture box is at top of zorder and has properties we want
            Pic.Appearance = 0
            Pic.BorderStyle = 0
            Pic.Visible = True
            
            'now check each control to see if it is a child of the frame
            For Each ctlChild In frm.Controls
                If TypeOf ctlChild Is CommandButton Or _
                        TypeOf ctlChild Is OptionButton Then
                    If ctlChild.Container Is ctl Then
                        With ctlChild
                            'set the control to be a child of the picture box
                            Call SetParent(.hwnd, Pic.hwnd)
                            
                            'find the bounding rectangle for the size of the picture box
                            If lLeft = 0 Then
                                lLeft = .Left
                            Else
                                If lLeft > .Left Then
                                    lLeft = .Left
                                End If
                            End If
                            If lTop = 0 Then
                                lTop = .Top
                            Else
                                If lTop > .Top Then
                                    lTop = .Top
                                End If
                            End If
                            If lWidth = 0 Then
                                lWidth = .width + .Left
                            Else
                                If lWidth < .width + .Left Then
                                    lWidth = .width + .Left
                                End If
                            End If
                            If lHeight = 0 Then
                                lHeight = .Top + .height
                            Else
                                If lHeight < .Top + .height Then
                                    lHeight = .Top + .height
                                End If
                            End If
                        End With
                    End If
                End If
                Pic.Move lLeft, lTop, lWidth - lLeft, lHeight - lTop
            Next ctlChild
            
            'size the picture box accordingly to encompass all controls contained in the
            'frame without accidentally drawing over the frame
            'NOTE: this is assuming that the developer has not placed control overlapping
            'the frame already
            Call SetParent(Pic.hwnd, ctl.hwnd)
            Pic.ZOrder 1
            
            'now position the control inside the picture box
            For Each ctlChild In frm.Controls
                If TypeOf ctlChild Is CommandButton Or _
                        TypeOf ctlChild Is OptionButton Then
                    If ctlChild.Container Is Pic Then
                        With ctlChild
                            .Left = .Left - lLeft
                            .Top = .Top - lTop
                        End With
                    End If
                End If
            Next ctlChild
        End If
        lLeft = 0
        lTop = 0
        lWidth = 0
        lHeight = 0
    Next ctl
    
ExitProc:
    'clean up and exit
    LockWindowUpdate 0&
    Exit Sub
    
ErrHandler:
    Debug.Print Err.Number & ": " & Err.Description
    Resume ExitProc
End Sub




See more files for this project here

convert ogm, mkv to avi with subtitle

A program that batch convert ogm, mkv to avi, with subtitle and audio track selection, video resizing, bitrate selection and codec selection. It is centered around mencoder, with a commandline tool as well as a GUI for Window

Project homepage: http://sourceforge.net/projects/alltoavi
Programming language(s): JavaScript,PHP,Visual Basic
License: other

  BACKUP_REG/
    BACK_Folder.reg
    BACK_Star.reg
    Reg_ShellExt_AllFiles_Convert.reg
    Reg_ShellExt_AllFolders_Convert.reg
  PSP/
    AllToAVI_PMP_Mod_2002.zip
  art/
    ATA Cube.png
    First_Fine_Edge_Fullbalck_.psd
    First_Fine_Edge_Fullbalck_L.png
    First_Fine_Edge_Fullbalck_Logo.bmp
    First_Fine_Edge_Fullbalck_Logo2.bmp
    First_Fine_Edge_Fullbalck_Logo_Final.png
    First_Rough_Edge.psd
    Icon.jpg
    Icon.png
    Icon.psd
    Sidev1.jpg
    Sig_Mai_Otome_Small_Border_.png
    Splashv2.jpg
    Splashv2.psd
    Splashv2_2.jpg
    Splashv2_3.jpg
    Splashv2_4.jpg
    Splashv2_6.jpg
    Splashv2_text.psd
    Splashv2_text_placement2.psd
    Splashv2_with_bat.png
    Splashv3.bmp
    Splashv3_6.jpg
    Thumbs.db
    aero_link.cur
    cube.ico
    iconv2.ico
    iconv2.jpg
    iconv2_2.bmp
    iconv2_2.jpg
    sidev2.gif
    sidev2.jpg
    sidev3.jpg
    splashv1_1_reflect.png
    v3.psd
    v3_Opt.jpg
    v3_Opt.psd
  bin/
    mplayer/
    QuickTime.qts
    QuickTimeEssentials.qtx
    asusasv2.dll
    asusasvd.dll
    atrac3.acm
    atrc3260.dll
    avizlib.dll
    cook3260.dll
    ctadp32.acm
    divx_c32.ax
    divxa32.acm
    divxc32.dll
    drv23260.dll
    drv33260.dll
    drv43260.dll
    here.txt
    huffyuv.dll
    i263_32.drv
    ir50_32.dll
    ivvideo.dll
    mencoder.exe
    mpg4c32.dll
    mpg4ds32.ax
    mplayer.exe
    msadp32.acm
    msh261.drv
    msvidc32.dll
    pmp_muxer.exe
    qdv.dll
    sipr3260.dll
    tm20dec.ax
    vsshdsd.dll
    wma9dmod.dll
    wmadmod.dll
    wmsdmod.dll
    wmv8ds32.ax
    wmv9dmod.dll
    wmvadvd.dll
    wmvdmod.dll
    wmvds32.ax
    zmbv.dll
  components/
    AdvancedProgressBar/
    CompEdit/
    Cool_XP_Progress/
  doc/
    manual/
    fdl.txt
    gpl.txt
  fonts/
    mplayer_Arial_14/
    mplayer_Arial_18/
    mplayer_Arial_24/
    mplayer_Arial_28/
    mplayer_bak/
  logs/
    debug.txt
    debug2.txt
  plugins/
    a2a_plg_merger.exe
    a2a_plg_merger.exe.manifest
    a2a_plg_splitter.exe
    a2a_plg_splitter.exe.manifest
  plugins_src/
    plg_merger/
    plg_splitter/
  serverSide/
    update/
  test files/
  update/
    001.html
    002.html
    003.html
    413204.html
    414132.html
    414133.html
    47144.html
    top.jpg
  web/
    admin/
    images/
    tutorial/
    THANKS TO HIRVINE
    download.php
    features.php
    footer.php
    header.php
    index.php
    rss.php
    style.css
  APB.oca
  APB.ocx
  AlltoaviV4.PDM
  AlltoaviV4.res
  AlltoaviV4.vbp
  AlltoaviV4.vbw
  Comp_intrn.dll
  Comp_lst.dll
  Comp_lst.txt
  Console.bas
  ConsoleInterface.bas
  Ported.ocx
  browserWnd.frm
  browserWnd.frx
  browserWnd.log
  dlg_codec.frm
  dlg_codec.frx
  dlg_fps.frm
  dlg_fps.frx
  dlg_plugins.frm
  dlg_plugins.frx
  fontsize.frm
  fontsize.frx
  frmSplash.frm
  frmSplash.frx
  frm_PMP.frm
  frm_PMP.frx
  frm_action.frm
  frm_action.frx
  frm_h264.frm
  frm_h264.frx
  frm_main.frm
  frm_main.frx
  frm_options.frm
  frm_options.frx
  frm_working.frm
  frm_working.frx
  mXPFrameFix.bas
  main.bas
  mdXpThemeSupport.bas
  modXPTheme2.bas
  plugins.dll
  split.txt
  streaminfo.bas
  test.bat
  update.frm
  update.frx