mirror of
https://github.com/FellippeHeitor/InForm.git
synced 2025-01-15 11:59:34 +00:00
Autoname the new PictureBox control created after an image file is dropped.
This commit is contained in:
parent
d038626684
commit
8b0a7da87b
1 changed files with 9 additions and 0 deletions
|
@ -76,10 +76,14 @@ $IF WIN THEN
|
||||||
FUNCTION CloseHandle& (BYVAL hObject AS LONG)
|
FUNCTION CloseHandle& (BYVAL hObject AS LONG)
|
||||||
FUNCTION GetExitCodeProcess& (BYVAL hProcess AS LONG, lpExitCode AS LONG)
|
FUNCTION GetExitCodeProcess& (BYVAL hProcess AS LONG, lpExitCode AS LONG)
|
||||||
END DECLARE
|
END DECLARE
|
||||||
|
|
||||||
|
CONST PathSep$ = "\"
|
||||||
$ELSE
|
$ELSE
|
||||||
DECLARE LIBRARY
|
DECLARE LIBRARY
|
||||||
FUNCTION PROCESS_CLOSED& ALIAS kill (BYVAL pid AS INTEGER, BYVAL signal AS INTEGER)
|
FUNCTION PROCESS_CLOSED& ALIAS kill (BYVAL pid AS INTEGER, BYVAL signal AS INTEGER)
|
||||||
END DECLARE
|
END DECLARE
|
||||||
|
|
||||||
|
CONST PathSep$ = "/"
|
||||||
$END IF
|
$END IF
|
||||||
|
|
||||||
'Load context menu icon image:
|
'Load context menu icon image:
|
||||||
|
@ -351,6 +355,11 @@ SUB __UI_BeforeUpdateDisplay
|
||||||
SelectNewControl TempValue
|
SelectNewControl TempValue
|
||||||
|
|
||||||
PreviewLoadImage Control(TempValue), _DROPPEDFILE(i)
|
PreviewLoadImage Control(TempValue), _DROPPEDFILE(i)
|
||||||
|
|
||||||
|
b$ = MID$(_DROPPEDFILE(i), _INSTRREV(_DROPPEDFILE(i), PathSep$) + 1)
|
||||||
|
SWAP i, TempValue
|
||||||
|
GOSUB AutoName
|
||||||
|
SWAP i, TempValue
|
||||||
END IF
|
END IF
|
||||||
IF i = _TOTALDROPPEDFILES THEN _FINISHDROP
|
IF i = _TOTALDROPPEDFILES THEN _FINISHDROP
|
||||||
NEXT
|
NEXT
|
||||||
|
|
Loading…
Reference in a new issue