-
Total de itens
9.657 -
Registro em
Tudo que Jhonas postou
-
exemplo http://www.hardware.com.br/comunidade/converter-binario/164395/ abraço
-
Algoritmos e Programação - exercícios
pergunta respondeu ao Adrianassba de Jhonas em Lógica de Programação
exemplo http://trabalhosgratuitos.com/Tecnologia/-Escreva-O-Signo-Zod%C3%ADaco/194190.html abraço -
Criptografia e Descriptografia
pergunta respondeu ao DesenvolvedorRoger de Jhonas em Lógica de Programação
o link não esta funcionando- 6 respostas
-
- criptografia
- descriptografia
- (e %d mais)
-
Pegar dados de Outra TextBox.Text e inserir no Access
pergunta respondeu ao anacarolina099 de Jhonas em Visual Basic
veja esse exemplo http://www.excel-easy.com/vba/examples/interactive-userform.html abraço -
consultar aleatoriamente dados no banco de dados
pergunta respondeu ao F4b1nh0 de Jhonas em Visual Basic
voce pode fazer isso usando a função random https://www.google.com.br/?gfe_rd=cr&ei=6s0hVLnrMIXEqAX6t4CIAw#q=random+vba basta fazer a randomização no numero total de registros da tabela, e com esse valor, apontar para o registro da tabela depois basta ler o registro, clicar em um botão, e mostrar a tradução. abraço -
tente o metodo find pesquise no google pela palavra: find vba function abraço
-
Controlar Som do Windows pela Trackbar
pergunta respondeu ao Rubens Oliveira de Jhonas em Visual Basic
exemplos Private Sub TrackBar1_Scroll(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TrackBar1.Scroll SetVolume(TrackBar1.TickFrequency) End Sub ou http://www.dreamincode.net/forums/topic/350714-sound-control-using-a-trackbar/ http://www.ehow.com.br/criar-equalizador-grafico-visual-basic-como_40088/ abraço- 1 resposta
-
- Som
- Controlar Som
- (e %d mais)
-
quanto ao erro Can't Find Project Or Libary não pode encontrar o projeto ou a biblioteca quando voce formata o HD as informações ( Dlls ou outros arquivos ) que são utilizados pelo VB são deletados, consequentemente voce deve repor esses arquivos na pasta Sytem32 do windows para que esses erros não ocorram abraço
-
exemplo http://imasters.com.br/artigo/2097/dotnet/automacao-comercial-com-vb-vbnet-e-c-ecf-e-tef-parte-03/ abraço
-
ajudem me. como faço para fazer com que programa, troquem informações
pergunta respondeu ao igor4200 de Jhonas em Visual Basic
mantenha o banco de dados em um micro, e coloque o programa para rodar nos 2 micros o micro1 que contem o banco de dados , o programa tera acesso direto o micro2 o programa devera enxergar o banco de dados que esta no micro1 a conexão entre os 2 micros pode ser feita via cabo crossover ou atraves de um Hub de 8 portas a mudança no programa seria apenas, na hora de efetuar a conexão com o banco de dados abraço -
Como finalizar processo adcional no VB
pergunta respondeu ao Coreta System de Jhonas em Visual Basic
exemplo Module Module1 Sub Main() ' Start the server-app.exe Process. Dim p As Process = Process.Start("server-app") Console.WriteLine("Started") ' Sleep for one second. Threading.Thread.Sleep(1000) /// tempo de espera para finalizar ' Terminate. p.Kill() Console.WriteLine("Killed") End Sub End Module abraço -
a maneira mais simples seria voce trocar o componente ztable pelo IBQuery exemplo tabela1 codigo nome tabela2 codigo endereco telefone na propriedade SQL do componente IBQuery coloque select tabela1.codigo, tabela1.nome, tabela2.codigo, tabela2.endereco, tabela2.telefone where tabela1.codigo = tabela2.codigo OBS: veja que a referencia entre as tabelas é pelo campo comum ( codigo ) que existe nas 2 tabelas para manipular tabelas do Interbase o QuickDesk https://www.google.com.br/?gfe_rd=cr&ei=AcwgVMOjHsfFqAXVqYGYAw#q=quickdesk+interbase+download atraves dele voce tambem consegue fazer relacionamento entre suas tabelas mais informações https://www.google.com.br/?gfe_rd=cr&ei=9cggVKubONPAqAXh2ICYCg&gws_rd=ssl#q=relacionamento+entre+tabelas+interbase abraço
-
qual é o banco de dados que esta usando ?
-
so que as medidas que ele puxou do outro banco ele fica o quadrado branco mais como ele esta setado stringgrid1.Cells[i,2] ele fica no 2 ela não acompanha o nome, eu queria que ele acompanhace o nome voce tem que fazer relacionamento entre as tabelas, ou seja, voce deve ter um campo comum que esteja na tabela 1 e na tabela 2 exemplo dessa forma quando voce puxar um item de uma tabela, na outra já estara apontando para o correspondente desse item abraço
-
[ME AJUDEM](Como cria um sistema de favoritos)
pergunta respondeu ao fabio12 de Jhonas em Visual Basic
veja esse exemplo http://www.forum-invaders.com.br/vb/showthread.php/34026-Tutorial-Colocando-Favoritos-em-seu-Navegador! abraço -
o componente msflxgrd.ocx ou uma de suas dependencias não esta corretamente registrada: o arquivo esta faltando ou invalido Tente cancelar o registro e registrar novamente o arquivo msflxgrd.ocx a. Clique no menu "Iniciar", clique em Todos os programas, clique em Acessórios. b. Clique com o botão direito em "Prompt de comando" e selecione "Executar como administrador" no menu. Depois de reconhecer a advertência de Controle de Conta de Usuário, digite os seguintes comandos (um de cada vez): regsvr32 / u C: \ WINDOWS \ system32 \ msflxgrd.ocx C regsvr32: \ windows \ system32 \ msflxgrd.ocx ou tente regsvr32 C:\Windows\SysWOW64\MSFLXGRD.OCX abraço
-
É possivel gerar interrupção no visual basic ?
pergunta respondeu ao MARCOS PEDROSO de Jhonas em Visual Basic
veja se esse exemplo te ajuda http://www.macoratti.net/vbserial.htm abraço -
esse exemplo está em delphi, mas voce pode observar a lógica do jogo... que será a mesma para o VB program ChickenCrossing; {$APPTYPE CONSOLE} {Time to code and test 1 hour, 6 minutes} {bugs fixed: 1. Error 104 - forgot reset(f); 2. Hang - forgot f in readln(f,width,length, etc. statement 3. Incorrect output - toca and tocd multiplied by chickenspeed instead of divide 4. Incorrect output - tod field incorrect, same error, multiply by speed instead of divide 5. Incorrect output - forgot to add start time (i+ ...) in toca, tocd calc 6. Incorrect output - read variables in wrong order readln(f, length, width...); instead of readln(f,width length...); } uses SysUtils; {Problem Description Why did the chicken cross the road? Well, that is not our concern. We only seek to make sure that it gets across safely. The chicken will cross several roads (anything from Farm-to-Market roads to interstate highways including access roads). For each road to cross, the chicken looks to see how many lanes there are to cross and what traffic there is on each lane. The chicken then starts waiting for traffic to clear so it can cross safely. In order to maintain the timing between steps and his head-bobbing, the chicken will only start walking on 1 second intervals. However, this chicken is particularly impatient and will start walking whether it is safe or not after waiting only 60 seconds and it may be time to break out the barbeque sauce. When the chicken does cross the road, it will start walking on a path perpendicular to the lanes (all lanes are parallel) at a constant rate of 10 feet/second and will not stop until reaching the other side. All lanes are 15 feet wide and there is no room between the lanes. Each vehicle description includes a width in feet of the vehicle (0<W<=15 feet), the length of the vehicle (0<L<=40 feet), a constant speed of the vehicle in feet/second (0<S<=100 feet/second), and the time (in seconds) which the vehicle will cross the line which the chicken will attempt to walk along. Second zero is the first opportunity for the chicken to start across the road. Vehicles always drive down the exact center of the lane they occupy (no drunk drivers here!). Information for each crossing will be formatted in the input file as follows. The first line for each crossing will contain the number of lanes (1<=L<=20) to be crossed (direction does not matter here). The second line contains the number of vehicles (0<=N<=100) involved in the crossing. Each of the subsequent N lines contains the description of the vehicles in no particular order. The first value of the line is an integer which identifies the lane number (1 to L) the vehicle occupies (lane 1 is closest to the chicken). The second through fifth values are floating point numbers which identify the width, length and speed of the vehicle and the time (in seconds) that the vehicle will cross the line the chicken will walk along. You must read to the end-of-file. You may assume that there are no lane changes; collisions between vehicles are irrelevant; and sufficient safety margin has been included in the dimensions of the vehicle to treat the chicken as a single point. It is time to get the barbeque sauce if at any time any part of the vehicle and the single point of the chicken intersect. For each road to cross, you must output the crossing number (start counting at one) and an integer representing the earliest second (0 to 60) the chicken should start to cross such that it can cross safely. If the chicken cannot cross safely, you must print the message "Bar-B-Q time!" instead of the crossing start time. Your output should be formatted similar to that in the examples below. Sample Input: 2 8 2 5.0 6.3 12.0 47.7 1 14.5 39.6 66.0 29.3 2 14.8 40.0 9.0 4.8 1 11.1 40.0 100.0 24.3 1 9.0 14.2 83.6 2.1 1 9.0 15.0 88.0 1.1 2 12.6 29.9 80.67 19.25 1 3.0 6.0 40.0 10.6 6 1 4 15.0 40.0 0.1 4.4 6 1 2 15.0 40.0 0.1 4.4 Sample Output: Crossing 1 should start at 8. Crossing 2 Bar-B-Q time! Crossing 3 should start at 0. } type TTruck=class length,width,speed,toa,tod:single; lane:integer; end; var chickspeed:integer=10; lanewidth:integer=15; f:text; i:integer; nbrlanes:integer; nbrtrucks:integer; trucks:array[1..100] of TTruck; casenbr:integer=0; procedure computeanswer; var i,j:integer; toca,tocd:single; {time of chicked arrival & departure from a truck wide space} ok1,ok2,solved:boolean; begin solved:=false; for i:= 0 to 60 do begin ok2:=true; for j:=1 to nbrtrucks do with trucks[j] do begin ok1:=false; toca:=i+((lane-1)*lanewidth+lanewidth/2-width/2)/chickspeed; tocd:=i+((lane-1)*lanewidth+lanewidth/2+width/2)/chickspeed; if tocd<toa then OK1 :=true; If toca>tod then OK1 :=true; if not OK1 then begin ok2:=false; break; end; end; if ok2 then {solution found} begin writeln('Crossing '+inttostr(casenbr)+' should start at '+inttostr(i)); solved:=true; break; end; end; if not solved then writeln('Crossing '+inttostr(casenbr)+' Bar-B-Q time!'); end; begin assignfile(f,'Data.txt'); reset(f); while not eof(f) do begin readln(f,nbrlanes); readln(f,nbrtrucks); for i:= 1 to nbrtrucks do begin trucks:=TTRuck.create; with trucks do begin readln(f,lane,width,length,speed,toa); tod:=toa+length/speed; end; end; inc(casenbr); computeanswer; end; readln; end. abraço
-
voce tem que aprender a manipular a API Hook https://www.google.com.br/?gfe_rd=cr&ei=N04gVKn2JujGsAeRqYDoBQ&gws_rd=ssl#q=api+hooking+delphi abraço
-
capturar dados em tempo real de um site e mostra-lo no form do delphi
pergunta respondeu ao joelmir4111 de Jhonas em Delphi, Kylix
voce pode importar os dados da pagina para o excel e depois passar para o delphi http://juliobattisti.com.br/cursos/excelavancado/modulo2/09.asp http://office.microsoft.com/pt-br/excel-help/obter-dados-externos-de-uma-pagina-da-web-HA010218472.aspx abraço -
1 Tentativa usando POS: erro2:= WebBrowser1.OleObject.Document.All.Tags('p').Item(1).InnerText; s := trim(erro2); if pos('encontrado',s) > 0 then showmessage('Achou o conteudo'); if pos('encontrado',s) = 0 then showmessage('Não achou o conteudo'); 2 Tentativa usando Ansi: erro2:= WebBrowser1.OleObject.Document.All.Tags('p').Item(1).InnerText; s := trim(erro2); Res2:= AnsiCompareText(s,'Nenhum pedido foi encontrado'); if Res2 = 0 then showmessage('Achou o conteudo'); if Res2 > 0 then showmessage('Achou o conteudo diferente >');] if Res2 < 0 then showmessage('Achou o conteudo diferente <');
-
não é isso ... veja que na mensagem eu coloquei #13 para pular de linha na mensagem que vem da pagina esse caracter é substituido por outro que fica oculto veja esse exemplo para poder entender como fazer usando esse endereço de navegação https://carrinho.americanas.com.br/CustomerWeb/pages/LoginMinhaConta o conteudo desse comando foi colocado dentro de um Edit erro2:= WebBrowser1.OleObject.Document.All.Tags('p').Item(1).InnerText; seria : Não é possivel a venda de ingressos à pessoa júridica unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, OleCtrls, SHDocVw; type TForm1 = class(TForm) Button1: TButton; Button2: TButton; WebBrowser1: TWebBrowser; Edit1: TEdit; procedure Button1Click(Sender: TObject); procedure Button2Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form1: TForm1; implementation {$R *.dfm} procedure TForm1.Button1Click(Sender: TObject); begin WebBrowser1.Silent := true; WebBrowser1.Navigate('https://carrinho.americanas.com.br/CustomerWeb/pages/LoginMinhaConta'); end; procedure TForm1.Button2Click(Sender: TObject); var erro2 : variant; Res2 : integer; s : string; begin erro2:= WebBrowser1.OleObject.Document.All.Tags('p').Item(1).InnerText; edit1.Text := erro2; s := trim(erro2); Res2:= AnsiCompareText(s,'Não é possivel a venda de ingressos à pessoa júridica'); if Res2 = 0 then showmessage('Mensagem com conteudo igual'); if Res2 < 0 then showmessage('Mensagem com conteudo diferente <'); if Res2 > 0 then showmessage('Mensagem com conteudo diferente >'); if pos('venda',erro2) > 0 then showmessage('Mensagem com conteudo igual'); end; end. ========================================================== o resultado usando AnsiCompareText será : Mensagem com conteudo diferente > o resultado usando Pos será : Mensagem com conteudo igual OBS: usando o AnsiCompareText para o conteudo de erro2 e a string 'Não é possivel a venda de ingressos à pessoa júridica' demonstra que o conteudo de erro2 tem valores numericos entre os caracteres, mas que não aparecem usando POS a substring venda existe dentro da string erro2 então sugiro que voce faça alguns testes como no exemplo, para ver o resultado abraço
-
seria o mesmo que isso showmessage('Atenção:'+#13+'Nenhum pedido foi encontrado') usando function Pos(Substr: string; S: string): Integer; voce pode procurar a qualquer substring dentro de uma string exemplo if pos('Atenção', 'Atenção: Nenhum pedido foi encontrado') > 0 then if pos('Nenhum ', 'Atenção: Nenhum pedido foi encontrado') > 0 then if pos('pedido ', 'Atenção: Nenhum pedido foi encontrado') > 0 then if pos('foi', 'Atenção: Nenhum pedido foi encontrado') > 0 then if pos('encontrado', 'Atenção: Nenhum pedido foi encontrado') > 0 then OBS: se a substring for encontrada dentro da string então será retornado um valor > 0 abraço
-
ok.. para evitar que no texto tenham caracteres ocultos ou espaços vazios, tente assim Res2:= AnsiCompareText(trim(Erro2),'Clique aqui para consultar pedidos anteriores.'); ou ainda voce pode testar dessa maneira if pos(trim(Erro2),'Clique aqui para consultar pedidos anteriores.') > 0 then ou if pos('anteriores',trim(Erro2)) > 0 then abraço
-
function AnsiCompareText ( const String1, String2 : string ) : Integer; veja que a função retorna um valor inteiro A função AnsiCompareText compara a Sequência1 e Sequência2 pela igualdade, ignorando caracteres maiusculas ou minusculas. A forma atual seria CompareText. begin // Compare two obviously different strings CompareStrings('HELLO', 'WORLD'); // Compare identical strings CompareStrings('Hi 2 you', 'Hi 2 you'); // AnsiCompareText treats upper and lower case identically CompareStrings('ABCdef', 'abcDEF'); // All letters follow numbers in Delphi CompareStrings('abc', '123'); end; // Compare two strings, and show which is bigger than the other procedure TForm1.CompareStrings(const string1, string2: string); var result : Integer; begin // Compare some strings result := AnsiCompareText(string1, string2); if result < 0 then ShowMessage(string1+' < '+string2); if result = 0 then ShowMessage(string1+' = '+string2); if result > 0 then ShowMessage(string1+' > '+string2); end; HELLO < WORLD Hi 2 you = Hi 2 you ABCdef = abcDEF abc > 123 OBS: se em => erro2:= WebBrowser1.OleObject.Document.All.Tags('p').Item(1).InnerText; erro2 := <strong>Clique aqui para consultar pedidos anteriores. </strong> Res2:= AnsiCompareText(Erro2,'Clique aqui para consultar pedidos anteriores.'); o resultado > 0 ================================== já se fosse erro2 := <strong>Clique aqui para consultar pedidos anteriores. </strong> Res2:= AnsiCompareText(Erro2,'<strong>Clique aqui para consultar pedidos anteriores. </strong>'); o resultado = 0 abraço