PROFESSIONAL NEWSGROUPS
WINDEV
,
WEBDEV
and
WINDEV Mobile
Home
|
Recent messages
|
Connect
|
Sign out
|
English
Home
→
WINDEV 25
→
WX - Trabalhando com imagem selecionando, atribuindo ao controle imagem e gravando no banco de dados e exibindo pela tablegrid
WX - Trabalhando com imagem selecionando, atribuindo ao controle imagem e gravando no banco de dados e exibindo pela tablegrid
Started by BOLLER, Dec., 07 2019 2:17 PM - No answer
Connect yourself…
BOLLER
#1
Registered member
3,651 messages
Popularité : +175 (223 votes)
Posted on December, 07 2019 - 2:17 PM
//BOTAO SELECIONAR FOTO E ATRIBUIÇÃO AO CONTROLE DE IMAGEM NA TELA
Procedure
SelectImagem
(
)
s
File
is string
=
fSelect
(
""
,
""
,
"Selecione o arquivo"
,
"Todos (*.*)"
+
TAB
+
"*.*"
+
CR
+
"JPG"
+
TAB
+
"*.JPG"
+
CR
+
"BMP"
+
TAB
+
"*.BMP"
+
CR
+
"PNG"
+
TAB
+
"*.PNG"
+
CR
+
"SVG"
+
TAB
+
"*.SVG"
,
"*.*"
)
v
Imagem
is
Variant
=
dLoadImage
(
s
File
,
imgDefault
)
RESULT
v
Imagem
//NO CLICK DA IMAGEM
IMG_
T002_FOTO
=
SelectImagem
(
)
Tablegrid Exibindo Imagem
DO
Banco
E
VENTO
-
SELECT ROW TABLE
Procedure
SelecionaRegistro
(
)
//Captura a linha
nx
is
8
-
bytes int
=
TableInfoXY
(
TABLE_
T001_CLUBES
,
tiLineNumber
,
MouseXPos
(
)
,
MouseYPos
(
)
)
IF
nx
>
0
THEN
//captura o id unico da tabela
GNID
=
TABLE_
T001_CLUBES
[
nx
]
.
COL_T001_CLUBE_ID
IMG_
T001_LOGO_CLUBE_GRANDE
=
TABLE_
T001_CLUBES
[
nx
]
.
COL_T001_LOGO
END
//retorna o id
RESULT
GNID
Botão Gravar Imagem
No
Banco
de
Dados
Procedure
Gravar
(
)
ScreenToFile
(
)
T001_CLUBES.T001_LOGO
=
dLoadImage
(
IMG_
T001_LOGO
,
imgDefault
)
IF
GNID
=
0
THEN
IF
HAdd
(
T001_CLUBES
) =
True
THEN
Toast
(
"Gravou com sucesso!"
)
ELSE
Info
(
ErrorInfo
(
)
)
END
ELSE
IF
HModify
(
T001_CLUBES
) =
True
THEN
Toast
(
"Gravou com sucesso!"
)
ELSE
Info
(
ErrorInfo
(
)
)
END
END
// Position on the current record
TableDisplay
(
TABLE_
T001_CLUBES
,
taCurrentFirst
)
MyInternalWindow
..
Plane
=
1
--
Adriano José Boller
______________________________________________
Consultor e Representante Oficial da
PcSoft no Brasil
+55 (41) 99949 1800
adrianoboller@gmail.com
skype: adrianoboller
http://wxinformatica.com.br/
Report
0
0
→ Go back to WINDEV 25
WINDEV 25
Français
English
Español
Portuguesa
Close this window
Search type
Only topics
All the messages
Search period
Any time
Past hour
Past 24 hours
Past week
Past month
Past year
Cancel
Preview of your message
Adding an image
Import an image from a URL
Send an image from a file of your disk
Drop a file or click "Browse..."
or
Cancel
0%
WLanguage
SQL
XML, HTML
JAVA, Javascript
Text