Mostrando postagens com marcador _CURSO_THREADS. Mostrar todas as postagens
Mostrando postagens com marcador _CURSO_THREADS. Mostrar todas as postagens

segunda-feira, 1 de março de 2021

DICAS 3274 - WINDEV - COMO FAZER QUE NA TABELA FIQUE POSICIONADA , CONFORME IR SENDO PREENCHIDO - PERGUNTAS E RESPOSTAS - 31





https://youtu.be/m4RmG9HwnDI



Bom Dia Boa Tarde Boa Noite

Seja Membro do Canal

Esse Video vai estrear as XX:00 do dia 02/03/2021 

DICAS 3274 - WINDEV - COMO FAZER QUE NA TABELA FIQUE POSICIONADA , CONFORME IR SENDO PREENCHIDO - PERGUNTAS E RESPOSTAS - 31


ASSUNTOS

Como fazer que na tabela fique posicionada,conforme ir sendo preenchido
Vamos criar uma window chamada tabela thread
Vamos criar um botao para gerar a tabela
Vamos criar uma tabela por programacao com 1 coluna apenas 
Vamos criar uma procedure chamada gera tabela 
Vamos fazer o codigo do gera tabela
Feito o codigo vamos entrar no botao de gerar a tabela 
vamos agora acrescentar o comando thread na chamada da procedure 
vamos tambem criar outro botao para parar a thread  

================= codigos

PROCEDURE gera_tabela()
TableDeleteAll(TABLE_thread) //TABLE_thread.DeleteAll()
nContador is int=0
LOOP
nRegistro is int=TableAddLine(TABLE_thread)
TABLE_thread[nRegistro].COL_Descricao=nRegistro
TableSelectPlus(TABLE_thread,nRegistro,tsRow)
nContador+=1
IF nContador>80 THEN
BREAK
END
LOOP (3000000)
END
END

================= codigos

//gera_tabela()

ThreadExecute("gera_tabela",threadNormal,gera_tabela)

================= codigos


ThreadStop("gera_tabela")



================ INDICES THREADS



=============== INDICE PERGUNTAS E RESPOSTA



========== INDICE TABELA

CRIANDO UMA TABELA MANUAL-PARTE 1 DICAS 1936-PUBLICA-WINDEV-TABELA 86 
The TreeView Table Control - DICAS 1972 - PUBLICA - WINDEV - TABELA 87 - 
DICAS 2012 - WINDEV - TABELA - 88 - BuildBrowsingTable - PREENCHER TABELA
DICAS 2013 - WINDEV - TABELA - 89 - TableRecNum - Numero de Registros
DICAS 2014 - WINDEV - TABELA - 90 - TableToText
DICAS 2015 - WINDEV - TABELA - 91- TableToXML
DICAS 2016 - WINDEV - TABELA - 92- TableToExcel
DICAS 2017 - WINDEV - TABELA - 93 - TableToClipboard
DICAS 2018 - WINDEV - TABELA - 94 - TableStartFilling
DICAS 2043 - WINDEV - TABELA 95 - Border
DICAS 2070 - WINDEV MOBILE WEBDEV - TABELA 96 - NAO MOSTRAR VAMOS ZERADOS
DICAS 2072 - WINDEV - TABELA 97 - TOTALIZADORES MANUAL
DICAS 2073 - WINDEV - TABELAS 98 - TABELAS RELACIONADAS
DICAS 2076 - WINDEV WEBDEV MOBILE - TABELA 99 - WHILE HOut
DICAS 2086 - WINDEV - TABELA 100 - FontLarge - BrushColor
DICAS 2090 - WINDEV - TABELA 101 - TableSavePositionAndSelection TableRestorePositionAndSelection
DICAS 2098 - WINDEV WEBDEV MOBILE - TABELA 102 - MOSTRAR OU ESCONDER TABELA
DICAS 2099 - WINDEV WEBDEV MOBILE - TABELA 103 - AJUSTAR JANELA
DICAS 2119 WINDEV TABELAS 104 TableStartFilling end
DICAS 2125 WINDEV WEBDEV MOBILE TABELA 105 ZOOM
DICAS 2127 WINDEV WEBDEV MOBILE TABELA 106 FOR EACH SELECTED ROW OF
DICAS 2128 WINDEV WEBDEV MOBILE TABELA 107 DIGITAR TABELA
DICAS 2137 WINDEV WEBDEV MOBILE TABELA 108 popup menu na tabela
DICAS 2149 WINDEV WEBDEV MOBILE TABELA 109 MONTAR TABELA POR PROGR for each
DICAS 2153 WINDEV WEBDEV MOBILE TABELA 110 TreeView Table control
DICAS 2186 WINDEV WEBDEV MOBILE TABELA 111 TOTAL MANUAL REGISTROS
DICAS 2261 WINDEV WEBDEV MOBILE TABELA 112 ANCORAR TABELA
DICAS 2299 WINDEV WEBDEV MOBILE TABELA 114 TABELA INTERNA
AO VIVO 2880 TRANSMITIDO NO FACEBOOK VARIOS VIDEOS TABELA WINDEV
DICAS 3252 - WEBDEV - COMO FAZER UMA RELACAO DE CTE - PERGUNTAS E RESPOSTAS 14


PlayList WebDev tutorial Amarildo Webdev
Playlist Windev Tutorial Amarildo Windev
PlayList Windev Mobile 
Amarildo
Donwloads Windev
Windev
WxSolucoes
Matos Informatica
Repositorio Windev
Inscricao Evento Pcsof
Site forum Google 
Video sobre 3 Mil Videos Windev 
Video sobre Alfaserver servidor 
















quarta-feira, 2 de setembro de 2020

DICAS 3063 -WINDEV TUTORIAL 86 -Licao 7.6-09-09-2020 11hrs-The Threads












https://youtu.be/5nvpTSY_yhk

https://youtu.be/5nvpTSY_yhk


Bom Dia/Boa Tarde/Boa Noite

Esse Ao Vivo vai estrear as 11:00 do dia 09/09/2020 
DICAS 3063 -WINDEV TUTORIAL 86 -Licao 7.6-09-09-2020 11hrs-The Threads
Tutoriel WINDEV : Leçon 7.6. Programmation avancée - Les threads

ASSUNTOS

DEFINICAO THREADS
EXEMPLOS DE USO DE THREAD
MOSTRANDO O EXEMPLO PCSOFT
  THE THREADS
CRIADO UM PROJETO, REFAZENDO ESSE EXEMPLO 
  EM PORTUGUES,INGLES,FRANCES,ESPANHOL
EXECUTANDO THREAD_AMARILDO 
EXPLICANDO CADA LINHA DO CODIGO 
PROJETO ESTA NO REPOSITORIO WINDEV
  
Video original da Franca

Playlist Windev Tutorial Amarildo
Playlist windev Franca PcSoft
Amarildo
Windev
WxSolucoes
Matos Informatica
Repositorio Windev
Site forum Google 
Video sobre 3 Mil Videos Windev 
PlayList Pedrosao
Video sobre Alfaserver servidor 

DICAS 2979 - WINDEV TUTORIAL 2 - 1.2- CRIAR JANELA E INSERIR TEXTO E EXIBIR
DICAS 2980 - WINDEV TUTORIAL 3 - 2.1- VARIAVEIS PARTE 1
DICAS 2981 - WINDEV TUTORIAL 4 - 2.2- VARIAVEIS ESCOPO - PARTE 2
DICAS 2982 - WINDEV TUTORIAL 5 - 2.1- VARIAVEIS OPERADORES PARTE 3
DICAS 2983 - WINDEV TUTORIAL 6 - 2.1.D - VARIAVEIS STRINGS PARTE 4
DICAS 2984 - WINDEV TUTORIAL 7 - 2.1.E - VARIAVEIS ARRAYS PARTE 5
DICAS 2985 - WINDEV TUTORIAL 8 - 2.2.A - CONDICOES IF-SWITCH PARTE 1
DICAS 2986 - WINDEV TUTORIAL 9 - 2.2.B - CONDICOES PARTE 2
DICAS 2987 - WINDEV TUTORIAL 10 - 2.3.A - LOOP PARTE 1
DICAS 2988 - WINDEV TUTORIAL 11 - 2.3.B - LOOP EXEMPLOS PARTE 2
DICAS 2989 - WINDEV TUTORIAL 12 - Lesson 2.4. The procedures - PARTE 1
DICAS 2990 - WINDEV TUTORIAL 13 - Leçon 2.4.b. Procedures Parametros - PARTE 2
DICAS 2991 - WINDEV TUTORIAL 14 - PROCEDURES REFERENCIA - PARTE 3
DICAS 2992 - WINDEV TUTORIAL 15 - PROCEDURES OPCIONAIS OU OBRIGATORIAS - PARTE 4
DICAS 2993 - WINDEV TUTORIAL 16 - PROCEDURES EXEMPLOS - PARTE 5
DICAS 2994 - WINDEV TUTORIAL 17 - PERGUNTAS E RESPOSTA - PARTE 1
DICAS 2995 - WINDEV TUTORIAL 18 - PERGUNTAS E RESPOSTA - PARTE 2
DICAS 2996 - WINDEV TUTORIAL 19 - WINDEV E OS BANCOS DE DADOS
DICAS 2997 - WINDEV TUTORIAL 20 - PROJETO E ANALISE - CRIACAO
DICAS 2998 - WINDEV TUTORIAL 21 - PROJETO E ANALISE - ARQUIVOS DADOS CLIENTE - PARTE 2
DICAS 2999 - WINDEV TUTORIAL 22 - PROJETO E ANALISE - ARQUIVOS DADOS CRIACAO ARQUIVO PEDIDO - PARTE 3
DICAS 3000 - WINDEV TUTORIAL 23 - PROJETO E ANALISE - IMPORTANDO CVS-ARQUIVO TEXTO - PARTE 4
DICAS 3001 - WINDEV TUTORIAL 24 - PROJETO E ANALISE - IMPORTANDO ARQUIVO PRODUTO - PARTE 5
DICAS 3002 - WINDEV TUTORIAL 25 - PROJETO E ANALISE - LINK - PARTE 6
DICAS 3003 - WINDEV TUTORIAL 26 - RAD COMPLETO
DICAS 3004 - WINDEV TUTORIAL 27 - VISAO GERAL
DICAS 3005 - WINDEV TUTORIAL 28 - Adicionar e Modificar Janelas PRODUTOS - PARTE A
DICAS 3006 - WINDEV TUTORIAL 29 - Adicionar e Modificar Janelas PRODUTOS Formulario - PARTE B
DICAS 3007 - WINDEV TUTORIAL 30 - Adicionar e Modificar Janelas PRODUTOS ALINHAR CAMPOS - PARTE C


===================================

PROCEDURE MyWindow()

// CRIANDO AS VARIAVEIS QUE VAMOS PRECISAR QUE VAMOS PRECISAR
// CREATING THE VARIABLES THAT WE WILL NEED THAT WE WILL NEED
// CRÉER LES VARIABLES DONT NOUS AURONS BESOIN DONT NOUS AVONS BESOIN
// CREANDO LAS VARIABLES QUE NECESITAREMOS QUE NECESITAREMOS

gMyThreadCounter is a Thread
gMyThreadCounterWithBound is a Thread

// ADICIONANDO NA BARRA DE PROGRESSO UM VALOR MAXIMO
// ADDING A MAXIMUM VALUE TO THE PROGRESS BAR
// AJOUTER UNE VALEUR MAXIMALE À LA BARRE DE PROGRESSION
// AÑADIR UN VALOR MÁXIMO A LA BARRA DE PROGRESO

PROGRESSBAR_SIMPLE_THREAD..MaxValue=50000

============================

// click btn_run

// Para executar um processo em segundo plano, crie um procedimento que conterá
   // o código a ser executado. 
// To run a process in the background, create a procedure that will contain
     // the code to run.
// Pour exécuter un processus en arrière-plan, créez une procédure qui contiendra
    // le code à exécuter.
// Para ejecutar un proceso en segundo plano, cree un procedimiento que contendrá
    // el código a ejecutar.

gMyThreadCounter = ThreadExecute(Increment,())

// ThreadExecute permite que você execute o código do procedimento em segundo plano.
    // Retorna uma variável de thread.  Incremento é o nome do procedimento.
   // O código deste procedimento será executado em segundo plano.    
// ThreadExecute allows you to execute the code of the procedure in the background.
    // It returns a thread variable. Increment is the name of the procedure. 
    // The code of this procedure will be run in the background.
// ThreadExecute vous permet d'exécuter le code de la procédure en arrière-plan.
   // Il renvoie une variable de thread. Incrément est le nom de la procédure.
   // Le code de cette procédure sera exécuté en arrière-plan.   
// ThreadExecute le permite ejecutar el código del procedimiento en segundo plano.
   // Devuelve una variable de hilo. Incrément est le nom de la procédure.
   // Le code de cette procédure sera exécuté en arrière-plan.

BTN_Run..Visible =False
BTN_Stop..Visible =True

========================================


// click btn stop

// ThreadStop é usado para parar um processo iniciado na tarefa em segundo plano.
// ThreadStop is used to stop a process started in background task.
// ThreadStop est utilisé pour arrêter un processus démarré en tâche d'arrière-plan.
// ThreadStop se usa para detener un proceso iniciado en una tarea en segundo plano.

gMyThreadCounter.RequestStop()

BTN_Run..Visible =True
BTN_Stop..Visible =False


========================================

PROCEDURE Increment()
// Este procedimento incrementa e exibe o valor de um contador em um controle de edição
// This procedure increments and displays the value of a counter in an edit control
// Cette procédure incrémente et affiche la valeur d'un compteur dans un champ d'édition
// Este procedimiento incrementa y muestra el valor de un contador en un control de edición
FOR i = 1 TO 50 000
// Não manipule a IU em um thread. Um procedimento deve ser executado no thread principal.
// Do not manipulate the UI in a thread. A procedure must be run in the main thread.
// Ne manipulez pas l'interface utilisateur dans un thread. Une procédure doit être exécutée dans le thread principal.
// No manipule la interfaz de usuario en un hilo. Se debe ejecutar un procedimiento en el hilo principal.
ExecuteMainThread(DisplayCounter,i)
// Se a parada do thread foi solicitada, saia do loop
// If the thread stop has been requested, exit loop
// Si l'arrêt du thread a été demandé, quitter la boucle
// Si se ha solicitado la detención del hilo, salir del bucle
IF ThreadStopRequested() THEN
BREAK
END
ThreadPause(1)
END
// Fim do processo (este procedimento deve lidar com a IU para que seja executado no encadeamento principal) // End process (this procedure must handle the UI so it is run in the main thread)
// Fim do processo (este procedimento deve lidar com a IU para que seja executado no encadeamento principal) // Finalizar el proceso (este procedimiento debe manejar la interfaz de usuario para que se ejecute en el hilo principal)
ExecuteMainThread(EndProcess)
INTERNAL PROCEDURE DisplayCounter(nCounter)
EDT_COUNTER = nCounter
PROGRESSBAR_SIMPLE_THREAD = nCounter
END 

INTERNAL PROCEDURE EndProcess()
BTN_Stop..Visible = False
BTN_Run..Visible = True
END

========================================
















========================================












Lesson 7.6. The threads
This lesson will teach you the following concepts
  • What are the threads?
Lesson duration

Estimated time: 10 mn
Previous LessonTable of contentsNext Lesson
Definition
Threads allow running code (or processes) in parallel with the main application. Therefore, several long processes can be run in background task without locking the main application (also called "Main thread").
Threads replace some types of timers.
In most cases, a secondary thread is used to detect an event such as a user action, an incoming email, a phone call, ...
Examples for using threads:
  • Retrieving emails in background task while typing a new email.
  • Communication application: managing phone calls, communication by socket, etc.
WINDEV allows you to:
  • manage the threads (Thread* functions).
  • use "signals" in order to synchronize several threads (Signal* functions).
  • use the threads with "semaphores" in order to manage the access to the resources shared by different threads (Semaphore* functions).
Example

Example

WINDEV is supplied with several unit examples allowing you to understand the benefit and the use of threads:
  • The threads (Pool).
  • The threads.
See Management of threads for more details.


Teste

Teste
teste