Hab die Virenmeldung bereits Heute an Avira gesendet...
Ich denke eher das es an PNG Erstellung liegt.
Code: Alles auswählen
UsePNGImageDecoder()
UsePNGImageEncoder()
Procedure MakeDesktopScreenshot(ImageNr, x, y, Width, Height)
hImage = CreateImage(ImageNr, Width, Height)
hDC = StartDrawing(ImageOutput(ImageNr))
DeskDC = GetDC_(GetDesktopWindow_())
BitBlt_(hDC, 0, 0, Width, Height, DeskDC, x, y, #SRCCOPY)
StopDrawing()
ReleaseDC_(GetDesktopWindow_(), DeskDC)
ProcedureReturn hImage
EndProcedure
W = 800
H = 600
ExamineDesktops()
DW = DesktopWidth(0)
DH = DesktopHeight(0)
red = 255
CreateImage(1, 200, 200)
CreateImage(2, 200, 200)
If OpenWindow(0, 100, 150, 291, 155, "X360´s Snipping Tool FNL Version", #PB_Window_SystemMenu | #PB_Window_Invisible)
start = 1
SetActiveWindow(0)
Repeat
WindowEvent = WaitWindowEvent(50)
Select EventWindow()
Case 0
If start = 1
start = 0
SetSystemCursor_(LoadCursor_(0, #IDC_CROSS), #OCR_NORMAL)
MakeDesktopScreenshot(1, 0, 0, DesktopWidth(0), DesktopHeight(0))
OpenWindow(1, 0, 0, DW, DH, "Capturing", #WS_POPUP)
StartDrawing(WindowOutput(1))
DrawImage(ImageID(1), 0, 0)
StopDrawing()
Layer1_desktop = CreateImage(2, DW, DH)
SetActiveWindow(1)
EndIf
Case 1
Select WindowEvent
Case #WM_MOUSEMOVE
If drawbox And SettingCursor = 0
If back = 1 : red + 1 : Else : red-1 : EndIf
If red = 255 : back = 0 : EndIf
If red = 100 : back = 1 : EndIf
StartDrawing(WindowOutput(1))
DrawImage(ImageID(1), 0, 0)
DrawingMode(#PB_2DDrawing_Outlined)
y2 = DesktopMouseY()
x2 = DesktopMouseX()
Box(x1, y1, x2-x1, y2-y1, RGB(red, 0, 0))
Box(x1 + 1, y1 + 1, x2-x1, y2-y1, RGB(red, 0, 0))
StopDrawing()
SettingCursor = 1
Else
SettingCursor = 0
EndIf
Case #WM_LBUTTONDOWN
y1 = DesktopMouseY()
x1 = DesktopMouseX()
drawbox = 1
Case #WM_LBUTTONUP
StartDrawing(WindowOutput(1))
DrawImage(ImageID(1), 0, 0)
StopDrawing()
If x1>x2 : Swap x2, x1 : EndIf
If y1>y2 : Swap y2, y1 : EndIf
GrabImage(1, 6, x1, y1, x2-x1, y2-y1)
drawbox = 0
Break
EndSelect
EndSelect
ForEver
EndIf
CloseWindow(0)
CloseWindow(1)
SetSystemCursor_(LoadCursor_(0, #IDC_CROSS), #OCR_NORMAL)
Screenpfad$ = InputRequester("Bildname", "Gib den Bildname für den Screen ein", "")
SaveImage(6, "other\screenshots\"+Screenpfad$ + ".png", #PB_ImagePlugin_PNG)