MSG_Alert
MSG_Wait
MSG_YesNo
New :
1. A Image can be added to Headline ( optional )
2. Two different Fonts are supported : Headline and 3 Textlines
3. MSG_YesNo accepts 3 different Images
4. Different Colors for Head and Textlines
Code: Select all
// ----------------------------------------------------
// ---------- ALERT - FUNCTION --------------
FUNCTION MSG_ALERT(oBrush, oFont1, oFont2, cTitle, cTxt1, cTxt2, cTxt3, ;
nColor1, nColor2, nSpace, nTop, nLeft, cImage1, cImage2)
LOCAL oDlg, nMsgTW := 300, nMsgTH := 20, nDlgWidth := 300, nDlgHeight := 100
LOCAL nMsgTW1 := 10, nMsgTW2 := 10, nMsgTW3 := 10, nMsgTW4 := 10
DEFINE DIALOG oDlg FROM nTop, nLeft TO 590, 159 PIXEL TRANSPARENT ;
STYLE WS_POPUP BRUSH TBrush():New( "NULL" )
nMsgTW1 := oDlg:GetWidth( cTitle, oFont1 )
nMsgTW2 := oDlg:GetWidth( cTxt1, oFont2 )
nMsgTW3 := oDlg:GetWidth( cTxt2, oFont2 )
nMsgTW4 := oDlg:GetWidth( cTxt3, oFont2 )
nMsgTW := MAX( nMsgTW1, nMsgTW2 )
nMsgTW := MAX( nMsgTW, nMsgTW3 )
nMsgTW := MAX( nMsgTW, nMsgTW4 )
nMsgTH1 := oFont1:nHeight()
nMsgTH2 := oFont2:nHeight()
IF EMPTY( cImage1 )
nDlgHeight := ( 8 * nSpace ) + nMsgTH1 + ( 3 * nMsgTH2 ) + 40
ELSE
nDlgHeight := ( 8 * nSpace ) + ( 3 * nMsgTH2 ) + 80
ENDIF
nDlgWidth := nMsgTW + 40
ACTIVATE DIALOG oDlg ;
ON INIT ( SETTRANSP( oDlg ), ;
oDlg:Move( nTop, nLeft, nDlgWidth, nDlgHeight, .f. ), ;
MSG_ALERT1(oDlg, oBrush, oFont1, oFont2, cTitle, cTxt1, cTxt2, cTxt3, ;
nColor1, nColor2, nMsgTH, nSpace, nDlgWidth, nDlgHeight, cImage1, cImage2) )
RETURN( NIL )
// -------------------
FUNCTION MSG_ALERT1(oDlg, oBrush, oFont1, oFont2, cTitle, cTxt1, cTxt2, cTxt3, ;
nColor1, nColor2, nMsgTH, nSpace, nDlgWidth, nDlgHeight, cImage1, cImage2)
LOCAL oTitle, oBmp, oBtn
@ 0, 0 TITLE oTitle SIZE nDlgWidth, nDlgHeight -10 OF oDlg SHADOW ROUND
oTitle:aGrdBack := {}
SET BRUSH OF oTitle TO oBrush
oTitle:nClrLine1 := 8388608
IF EMPTY(cImage1)
@ 2 * nSpace, 30 TITLETEXT OF oTitle TEXT cTitle FONT oFont1 COLOR nColor1
@ 3 * nSpace + nMsgTH2, 30 TITLETEXT OF oTitle TEXT cTxt1 FONT oFont2 COLOR nColor2
@ ( 4 * nSpace ) + ( 2 * nMsgTH2 ), 30 TITLETEXT OF oTitle TEXT cTxt2 FONT oFont2 COLOR nColor2
@ ( 5 * nSpace ) + ( 3 * nMsgTH2 ), 30 TITLETEXT OF oTitle TEXT cTxt3 FONT oFont2 COLOR nColor2
ELSE
@ 2 * nSpace, 25 BITMAP oBmp FILENAME cImage1 OF oTitle ADJUST SIZE 48, 48 PIXEL NOBORDER
@ 2 * nSpace + nMsgTH1, 80 TITLETEXT OF oTitle TEXT cTitle FONT oFont1 COLOR nColor1
@ 3 * nSpace + nMsgTH2 + 25, 30 TITLETEXT OF oTitle TEXT cTxt1 FONT oFont2 COLOR nColor2
@ ( 4 * nSpace ) + ( 2 * nMsgTH2 ) + 25, 30 TITLETEXT OF oTitle TEXT cTxt2 FONT oFont2 COLOR nColor2
@ ( 5 * nSpace ) + ( 3 * nMsgTH2 ) + 25, 30 TITLETEXT OF oTitle TEXT cTxt3 FONT oFont2 COLOR nColor2
ENDIF
@ nDlgHeight - 65, nDlgWidth - 60 BTNBMP oBtn FILENAME cImage2 ;
SIZE 55, 55 OF oTitle PIXEL ROUND NOBORDER ;
ACTION ( oDlg:End() )
oBtn:cTooltip := "Exit Alert"
oBtn:lTransparent := .T.
oBtn:l2007 := .F.
RETURN( NIL )
Code: Select all
// ----------------------------------------------------
// ---------- YESNO - FUNCTION --------------
FUNCTION MSG_YESNO(oBrush, oFont1, oFont2, cTitle, cTxt1, cTxt2, cTxt3, ;
nColor1, nColor2, nSpace, nTop, nLeft, cImage1, cImage2, cImage3)
LOCAL oDlg, nMsgTW := 300, nMsgTH := 20, nDlgWidth := 300, nDlgHeight := 100
LOCAL nMsgTW1 := 10, nMsgTW2 := 10, nMsgTW3 := 10, nMsgTW4 := 10
PRIVATE lYESNO := .F.
DEFINE DIALOG oDlg FROM nTop, nLeft TO 590, 159 PIXEL TRANSPARENT ;
STYLE WS_POPUP BRUSH TBrush():New( "NULL" )
nMsgTW1 := oDlg:GetWidth( cTitle, oFont1 )
nMsgTW2 := oDlg:GetWidth( cTxt1, oFont2 )
nMsgTW3 := oDlg:GetWidth( cTxt2, oFont2 )
nMsgTW4 := oDlg:GetWidth( cTxt3, oFont2 )
nMsgTW := MAX( nMsgTW1, nMsgTW2 )
nMsgTW := MAX( nMsgTW, nMsgTW3 )
nMsgTW := MAX( nMsgTW, nMsgTW4 )
nMsgTH1 := oFont1:nHeight()
nMsgTH2 := oFont2:nHeight()
IF EMPTY( cImage1 )
nDlgHeight := ( 8 * nSpace ) + nMsgTH1 + 3 * nMsgTH2 + 40
ELSE
nDlgHeight := ( 8 * nSpace ) + ( 3 * nMsgTH2 ) + 80
ENDIF
nDlgWidth := nMsgTW + 40
ACTIVATE DIALOG oDlg ;
ON INIT ( SETTRANSP( oDlg ), ;
oDlg:Move( nTop, nLeft, nDlgWidth, nDlgHeight, .f. ), ;
lYESNO := MSG_YESNO1(oDlg, oBrush, oFont1, oFont2, cTitle, cTxt1, cTxt2, cTxt3, ;
nColor1, nColor2, nMsgTH, nSpace, nDlgWidth, nDlgHeight, cImage1, cImage2, cImage3) )
RETURN lYESNO
// -------------------
FUNCTION MSG_YESNO1(oDlg, oBrush, oFont1, oFont2, cTitle, cTxt1, cTxt2, cTxt3, ;
nColor1, nColor2, nMsgTH, nSpace, nDlgWidth, nDlgHeight, cImage1, cImage2, cImage3)
LOCAL oTitle, oBmp, oBtn1, oBtn2
@ 0, 0 TITLE oTitle SIZE nDlgWidth, nDlgHeight -10 OF oDlg SHADOW ROUND
oTitle:aGrdBack := {}
SET BRUSH OF oTitle TO oBrush
oTitle:nClrLine1 := 8388608
IF EMPTY(cImage1)
@ 2 * nSpace, 30 TITLETEXT OF oTitle TEXT cTitle FONT oFont1 COLOR nColor1
@ 3 * nSpace + nMsgTH2, 30 TITLETEXT OF oTitle TEXT cTxt1 FONT oFont2 COLOR nColor2
@ ( 4 * nSpace ) + ( 2 * nMsgTH2 ), 30 TITLETEXT OF oTitle TEXT cTxt2 FONT oFont2 COLOR nColor2
@ ( 5 * nSpace ) + ( 3 * nMsgTH2 ), 30 TITLETEXT OF oTitle TEXT cTxt3 FONT oFont2 COLOR nColor2
ELSE
@ 2 * nSpace, 25 BITMAP oBmp FILENAME cImage1 OF oTitle ADJUST SIZE 48, 48 PIXEL NOBORDER
@ 2 * nSpace + nMsgTH1, 80 TITLETEXT OF oTitle TEXT cTitle FONT oFont1 COLOR nColor1
@ 3 * nSpace + nMsgTH2 + 25, 30 TITLETEXT OF oTitle TEXT cTxt1 FONT oFont2 COLOR nColor2
@ ( 4 * nSpace ) + ( 2 * nMsgTH2 ) + 25, 30 TITLETEXT OF oTitle TEXT cTxt2 FONT oFont2 COLOR nColor2
@ ( 5 * nSpace ) + ( 3 * nMsgTH2 ) + 25, 30 TITLETEXT OF oTitle TEXT cTxt3 FONT oFont2 COLOR nColor2
ENDIF
@ nDlgHeight - 65, (nDlgWidth / 2) - 65 BTNBMP oBtn1 FILENAME cImage2 ;
SIZE 55, 55 OF oTitle PIXEL ROUND NOBORDER ;
ACTION ( lYESNO := .T., oDlg:End() )
oBtn1:cTooltip := "YES"
oBtn1:lTransparent := .T.
oBtn1:l2007 := .F.
@ nDlgHeight - 65, (nDlgWidth / 2) + 25 BTNBMP oBtn2 FILENAME cImage3 ;
SIZE 55, 55 OF oTitle PIXEL ROUND NOBORDER ;
ACTION ( lYESNO := .F., oDlg:End() )
oBtn2:cTooltip := "NO"
oBtn2:lTransparent := .T.
oBtn2:l2007 := .F.
RETURN lYESNO
Code: Select all
// ----------------------------------------------------
// ---------- WAIT - FUNCTION ----------------
FUNCTION MSG_WAIT(oBrush, oFont1, oFont2, cTitle, cTxt1, cTxt2, cTxt3, ;
nIntervall, nColor1, nColor2, nSpace, nTop, nLeft, cImage)
LOCAL oDlg, nMsgTW := 300, nMsgTH1 := 20, nMsgTH2 := 20, nDlgWidth := 300, nDlgHeight := 100
LOCAL nMsgTW1 := 10, nMsgTW2 := 10, nMsgTW3 := 10, nMsgTW4 := 10
LOCAL oTmr
DEFINE DIALOG oDlg FROM nTop, nLeft TO 590, 159 PIXEL TRANSPARENT ;
STYLE WS_POPUP BRUSH TBrush():New( "NULL" )
nMsgTW1 := oDlg:GetWidth( cTitle, oFont1 )
nMsgTW2 := oDlg:GetWidth( cTxt1, oFont2 )
nMsgTW3 := oDlg:GetWidth( cTxt2, oFont2 )
nMsgTW4 := oDlg:GetWidth( cTxt3, oFont2 )
nMsgTW := MAX( nMsgTW1, nMsgTW2 )
nMsgTW := MAX( nMsgTW, nMsgTW3 )
nMsgTW := MAX( nMsgTW, nMsgTW4 )
nMsgTH1 := oFont1:nHeight()
nMsgTH2 := oFont2:nHeight()
IF EMPTY( cImage )
nDlgHeight := ( 7 * nSpace ) + nMsgTH1 + ( 3 * nMsgTH2 )
ELSE
nDlgHeight := ( 7 * nSpace ) + ( 3 * nMsgTH2 ) + 40
ENDIF
nDlgWidth := nMsgTW + 40
ACTIVATE DIALOG oDlg ;
ON INIT ( SETTRANSP( oDlg ), ;
oDlg:Move( nTop, nLeft, nDlgWidth, nDlgHeight, .f. ), ;
MSG_WAIT1(oDlg, oBrush, oFont1, oFont2, cTitle, cTxt1, cTxt2, cTxt3, ;
nColor1, nColor2, nMsgTH1, nMsgTH2, nSpace, nDlgWidth, nDlgHeight, cImage), ;
START_TMR(oDlg,oTmr,nIntervall) )
RETURN( NIL )
// -----------------
FUNCTION START_TMR(oDlg,oTmr,nIntervall)
IF oTmr == nil
DEFINE TIMER oTmr INTERVAL nIntervall ACTION oDlg:End() OF oDlg
ACTIVATE TIMER oTmr
ELSE
Alert( "There is already a working timer..." )
ENDIF
RETURN NIL
// -------------------
FUNCTION MSG_WAIT1(oDlg, oBrush, oFont1, oFont2, cTitle, cTxt1, cTxt2, cTxt3, ;
nColor1, nColor2, nMsgTH1, nMsgTH2, nSpace, nDlgWidth, nDlgHeight, cImage)
LOCAL oTitle, oBmp
@ 0, 0 TITLE oTitle SIZE nDlgWidth, nDlgHeight - 10 OF oDlg SHADOW ROUND
oTitle:aGrdBack := {}
SET BRUSH OF oTitle TO oBrush
oTitle:nClrLine1 := 8388608
IF EMPTY(cImage)
@ 2 * nSpace, 30 TITLETEXT OF oTitle TEXT cTitle FONT oFont1 COLOR nColor1
@ 3 * nSpace + nMsgTH2 , 30 TITLETEXT OF oTitle TEXT cTxt1 FONT oFont2 COLOR nColor2
@ ( 4 * nSpace ) + ( 2 * nMsgTH2 ), 30 TITLETEXT OF oTitle TEXT cTxt2 FONT oFont2 COLOR nColor2
@ ( 5 * nSpace ) + ( 3 * nMsgTH2 ), 30 TITLETEXT OF oTitle TEXT cTxt3 FONT oFont2 COLOR nColor2
ELSE
@ 1 * nSpace, 25 BITMAP oBmp FILENAME cImage OF oTitle ADJUST SIZE 40, 40 PIXEL NOBORDER
@ 2 * nSpace + 10, 80 TITLETEXT OF oTitle TEXT cTitle FONT oFont1 COLOR nColor1
@ 3 * nSpace + nMsgTH2 + 25, 30 TITLETEXT OF oTitle TEXT cTxt1 FONT oFont2 COLOR nColor2
@ ( 4 * nSpace ) + ( 2 * nMsgTH2 ) + 25, 30 TITLETEXT OF oTitle TEXT cTxt2 FONT oFont2 COLOR nColor2
@ ( 5 * nSpace ) + ( 3 * nMsgTH2 ) + 25, 30 TITLETEXT OF oTitle TEXT cTxt3 FONT oFont2 COLOR nColor2
ENDIF
RETURN( NIL )
Samples using the new Functions :
Code: Select all
// ---------------------------------------------
// ------------ IMAGE - COPY ------------
FUNCTION IMG_COPY()
LOCAL cDestination
IF lSwapDir = .F.
cDestination := cSaveImg + "\" + cFileNoPath( cImgname )
ELSE
cDestination := cReadImg + "\" + cFileNoPath( cImgname )
ENDIF
// Test-alerts
// --------------
// MsgAlert( cImgname, "Image from Read-directory" )
// MsgAlert( cDestination, "Image copy to Destination-directory" )
COPYFILE( cImgname, cDestination, .F. )
IF !File(cDestination)
MSG_ALERT(oBrush3, oBigFont, oTxtfont, ; // Brush, Headfont, Textfont
"Attention", ; // Headline
"Image : ", ; // 1. Text
cImgname, ; // 2. Text
"not copied !", ; // 3. Text
128, 8388608, 12, 78, 165, ; // HeadColor, TextColor, Space, Top, Left
c_path + "\Bitmaps\Alert.bmp", ; // Title-image or NIL => NIL for no Bitmap !!!
c_path + "\Bitmaps\Close.bmp" ) // Exit-image
ELSE
MSG_WAIT(oBrush3, oBigFont, oTxtfont, ;
"Image-copy", ; // Headline
"File " + cImgname, ; // 1. Textline
"copied to ===> ", ; // 2. Textline
cDestination, ; // 3. Textline
3000, 128, 8388608, 12, 78, 165, ; // Intervall, Head-color, Text-color, Space, Top, Left
c_path + "\Bitmaps\Wait.bmp" ) // Title-Image
ENDIF
RETURN( NIL )
// ---------------------------------------------
// ------------ IMAGE - DELETE---------
FUNCTION IMG_DELETE()
LOCAL cRead, cReadpath
IF lSwapDir = .F.
cRead := cReadImg + "\" + cFileNoPath( cImgname )
cReadpath := cReadImg + "\"
ELSE
cRead := cSaveImg + "\" + cFileNoPath( cImgname )
cReadpath := cSaveImg + "\"
ENDIF
// Test-alerts
// --------------
// MsgAlert( cRead, "Image from Read-directory" )
IF MSG_YESNO( oBrush3, oBigFont, oTxtfont, ; // Brush, Headfont, Textfont
"Image delete", ; // Headline
"Do You want to delete Image", ; // 1. Text
cFilePath( cImgname ), ; // 2. Text
cFileNoPath( cImgname ) + " ???", ; // 3. Text
128, 8388608, 12, 78, 165, ; // HeadColor, TextColor, Space, Top, Left
c_path + "\Bitmaps\Help1.bmp", ; // Title-image or NIL
c_path + "\Bitmaps\Yes.bmp", ; // Yes-image
c_path + "\Bitmaps\Close.bmp" ) // No-image
oBrw2:End()
FErase(cRead)
aImg := ReadImages( cReadpath )
SHOW_BROW()
IF !FILE( "&cDestination" )
MSG_WAIT(oBrush3, oBigFont, oTxtfont, ;
"Image delete", ;
"Image : " + cImgname, ;
"successfull deleted !", ;
"", 3000, 128, 8388608, 12, 78, 165, ;
c_path + "\Bitmaps\Wait.bmp" )
ELSE
MSG_ALERT(oBrush3, oBigFont, oTxtfont, ;
"Attention", ;
"Could not delete Image : ", ;
cRead, ;
"", ;
128, 8388608, 12, 78, 165, ;
c_path + "\Bitmaps\Alert.bmp", ;
c_path + "\Bitmaps\Close.bmp" )
ENDIF
ENDIF
RETURN NIL
// ---------------------------------------------
// ------------ IMAGE - RENAME---------
FUNCTION IMG_RENAME()
LOCAL oDlg5, oBtn1, oBtn2, oSay1, oSay2, oSay3, oGet1, cOldImg
IF lSwapDir = .F.
cOldImg := cReadImg + "\" + cFileNoPath( cImgname )
ELSE
cOldImg := cSaveImg + "\" + cFileNoPath( cImgname )
ENDIF
cNewImg := SPACE(50)
DEFINE DIALOG oDlg5 FROM 0, 0 TO 200, 400 TITLE "Image-Rename" PIXEL BRUSH oBrush2
@ 5, 20 SAY oSay1 VAR cOldImg of oDlg5 PIXEL SIZE 100, 15 COLOR 0 ;
FONT oTxtFont TRANSPARENT ADJUST
@ 20, 20 SAY oSay2 PROMPT "Rename to ( NO File-extension ! ) :" of oDlg5 PIXEL SIZE 100, 15 COLOR 128 ;
FONT oTxtFont TRANSPARENT ADJUST
@ 35, 20 GET oGet VAR cNewImg OF oDlg5 PIXEL SIZE 100, 15 COLOR "+W/B" FONT oTxtFont
@ 38, 120 SAY oSay3 PROMPT "." + cFileExt(cOldImg) of oDlg5 PIXEL SIZE 100, 15 COLOR 0 ;
FONT oTxtFont TRANSPARENT ADJUST
@ 50, 100 BTNBMP oBtn1 FILENAME c_path + "\Bitmaps\Rename.bmp" ;
SIZE 55, 55 OF oDlg5 PIXEL NOBORDER ;
TOP ;
PROMPT "" ;
FONT oTxtfont ;
ACTION ( oGet:Refresh(), IMG_REN(cOldImg), oDlg5:End() )
oBtn1:cTooltip := "Rename Image"
oBtn1:lTransparent := .T.
oBtn1:l2007 := .F.
oBtn1:SetColor( 16312263 )
// MSG_WAIT(oBrush, oFont, cTitle, cTxt1, cTxt2, cTxt3, ;
// nIntervall, nColor, nSpace, nTop, nLeft, cImage)
@ 50, 145 BTNBMP oBtn2 FILENAME c_path + "\Bitmaps\Exit.bmp" ;
SIZE 55, 55 OF oDlg5 PIXEL NOBORDER ;
TOP ;
PROMPT "" ;
FONT oTxtfont ;
ACTION ( MSG_WAIT(oBrush3, oBigFont, oTxtfont, ;
"Rename-info :", ;
"File " + cOldImg, ;
"not renamed !!!", ;
"", 3000, 128, 8388608, 12, 78, 165, ;
c_path + "\Bitmaps\Wait.bmp" ), ;
oDlg5:End() )
oBtn2:cTooltip := "Exit rename"
oBtn2:lTransparent := .T.
oBtn2:l2007 := .F.
oBtn2:SetColor( 16312263 )
ACTIVATE DIALOG oDlg5 CENTERED
RETURN( NIL )
// ------------------
FUNCTION IMG_REN(cOldImg)
cNewImg := Alltrim(cNewImg)
cRen := cFilePath(cOldImg) + ALLTRIM( cNewImg) + "." + cFileExt(cOldImg)
// Test-alerts
// --------------
// MsgAlert( cOldImg, "Image from Read-directory" )
// MsgAlert( cRen, "Image-rename" )
IF MSG_YESNO( oBrush3, oBigFont, oTxtfont, ;
"Image rename", ;
"Do You want to rename Image", ;
cOldImg + " to =>", ;
cRen + " ???", ;
128, 8388608, 12, 78, 165, ;
c_path + "\Bitmaps\Help1.bmp", ;
c_path + "\Bitmaps\Yes.bmp", ;
c_path + "\Bitmaps\Close.bmp" )
COPYFILE( cOldImg, cRen, .F. )
IF !File(cRen)
MSG_ALERT(oBrush3, oBigFont, oTxtfont, ;
"Attention", ;
"File", ;
cRen, ;
"not created !", ;
128, 8388608, 12, 78, 165, ;
c_path + "\Bitmaps\Alert.bmp", ;
c_path + "\Bitmaps\Close.bmp" )
ELSE
FErase(cOldImg)
IF File(cOldImg)
MSG_ALERT(oBrush3, oBigFont, oTxtfont, ;
"Attention", ;
"Old Image", ;
cOldImg, ;
"not deleted !", ;
128, 8388608, 12, 78, 165, ;
c_path + "\Bitmaps\Alert.bmp", ;
c_path + "\Bitmaps\Close.bmp" )
ELSE
IF File(cRen)
oBrw2:End()
// FRENAME(Chr(34) + cDestination + Chr(34), Chr(34) + cRen + Chr(34))
aImg := ReadImages( cFilePath(cOldImg) )
SHOW_BROW()
cImgname := cRen
SHOW_ROW()
IF FILE( "&cRen" )
MSG_WAIT(oBrush3, oBigFont, oTxtfont, ;
"Rename-info :", ;
"File " + cOldImg, ;
"renamed to ", ;
"File " + cRen, 100000, 128, 8388608, 12, 78, 165, ;
c_path + "\Bitmaps\Wait.bmp" )
ELSE
MSG_ALERT(oBrush3, oBigFont, oTxtfont, ;
"Attention", ;
"Coudn't rename Image : ", ;
cOld, ;
"to => " + cRen, ;
128, 8388608, 12, 78, 165, ;
c_path + "\Bitmaps\Alert.bmp", ;
c_path + "\Bitmaps\Close.bmp" )
ENDIF
ENDIF
ENDIF
ENDIF
ENDIF
RETURN( NIL )
// -----------------------
FUNCTION IMG_MOVE(oReadFrom, oSaveTo)
LOCAL cGetImg, cWriteImg
IF lSwapDir = .F.
cGetImg := cReadImg + "\" + cFileNoPath( cImgname )
cWriteImg := cSaveImg + "\" + cFileNoPath( cImgname )
ELSE
cGetImg := cSaveImg + "\" + cFileNoPath( cImgname )
cWriteImg := cReadImg + "\" + cFileNoPath( cImgname )
ENDIF
// Test-alerts
// --------------
// MsgAlert( cGetImg, "Image from Read-directory" )
// MsgAlert( cWriteImg, "Image to Save-directory" )
IF MSG_YESNO( oBrush3, oBigFont, oTxtfont, ;
"Image move", ;
"Do You want to move Image", ;
cGetImg + " to =>", ;
cWriteImg + " ???", ;
128, 8388608, 12, 78, 165, ;
c_path + "\Bitmaps\Help1.bmp", ;
c_path + "\Bitmaps\Yes.bmp", ;
c_path + "\Bitmaps\Close.bmp" )
COPYFILE( cGetImg, cWriteImg, .F. )
IF !File(cWriteImg)
MSG_ALERT(oBrush3, oBigFont, oTxtfont, ;
"Attention", ;
"Image : ", ;
cWriteImg, ;
"not moved !", ;
128, 8388608, 12, 78, 165, ;
c_path + "\Bitmaps\Alert.bmp", ;
c_path + "\Bitmaps\Close.bmp" )
ELSE
FErase(cGetImg)
IF FILE(cGetImg)
MSG_ALERT(oBrush3, oBigFont, oTxtfont, ;
"Attention", ;
"Coudn't move Image : ", ;
cGetImg, ;
"to => " + cWriteImg, ;
128, 8388608, 12, 78, 165, ;
c_path + "\Bitmaps\Alert.bmp", ;
c_path + "\Bitmaps\Close.bmp" )
ELSE
ReadImages( cFilePath(cGetImg) )
nCount := oBrw2:nRowSel // remember Row
oBrw2:End()
SHOW_BROW()
oBrw2:nArrayAt := nCount // move to Row
oBrw2:nRowSel := nCount
oBrw2:Refresh()
ENDIF
ENDIF
ENDIF
RETURN NIL
// Needed for older FWH-versions !!!!
//-------------------------------------------
#define LWA_COLORKEY 1
#define GWL_EXSTYLE -20
#define WS_EX_LAYERED 524288
STATIC FUNCTION SETTRANSP( oDlg )
SETWINDOWLONG( oDlg:hWnd, GWL_EXSTYLE, NOR( GETWINDOWLONG( oDlg:hWnd, GWL_EXSTYLE ), WS_EX_LAYERED ) )
SETLAYEREDWINDOWATTRIBUTES( oDlg:hWnd, , , LWA_COLORKEY )
RETURN NIL
Best Regards
Uwe