Jump to content

Roberto Paes

Members
  • Content count

    26
  • Joined

  • Last visited

Community Reputation

0 Comum

About Roberto Paes

  1. Roberto Paes

    executar código cmd em c#

    System.Diagnostics.Process process = new System.Diagnostics.Process(); System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo(); startInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden; startInfo.FileName = "cmd.exe"; startInfo.Arguments = "/C start copy " + Application.StartupPath + @"\launcher\Sanchez.Patcher.exe " + Application.StartupPath; process.StartInfo = startInfo; process.Start(); Oi pessoal, Boa noite. Me chamo Roberto e estou tendo problemas em usar o cmd com o c#. O meu código funciona perfeitamente, mas eu não consigo ocultar a janela do cmd. Bom, apresentado o meu problema. Espero que possam me ajudar.
  2. Roberto Paes

    Rewrite rule

    Oi galera, seguinte. Tenho esse link: debbohotel.net/client e ele direciona para um cliente. e eu quero que mude para debbohotel.net/hotel Até agora, a única coisa que consegui foi isso: Options +FollowSymLinks -MultiViews RewriteEngine On RewriteBase / RewriteRule ^hotel ./client [L,N] mas o problema, é que quando o usuário vai para o debbohotel.net/hotel.. ele recebe 404. mas quando o usuário digita debbohotel.net/hotel.php, ou qualquer outra coisa depois do hotel, ele funciona. Alguém pode me ajudar?
  3. Oi galera, seguinte. Tenho esse link: debbohotel.net/client e ele direciona para um cliente. e eu quero que mude para debbohotel.net/hotel Até agora, a única coisa que consegui foi isso: Options +FollowSymLinks -MultiViews RewriteEngine On RewriteBase / RewriteRule ^hotel ./client [L,N] mas o problema, é que quando o usuário vai para o debbohotel.net/hotel.. ele recebe 404. mas quando o usuário digita debbohotel.net/hotel.php, ou qualquer outra coisa depois do hotel, ele funciona. Alguém pode me ajudar?
  4. Roberto Paes

    PHP rewrite e pegar variável por método GET

    Oi pessoal, eu estou com um problema no meu site, é o seguinte. eu tenho uma página chamada profile.php e ela exibe algumas informações do usuário mas eu quero passar uma variável por link pra essa página, como se fosse assim: profile.php?user="usuario"; enfim, mas tem um problema, meu site usa o método rewrite, e não estou conseguindo passar a variável pra página profile.php essa é minha .htacess: RewriteEngine On RewriteRule ^(|/)$ index.php?url=$1 RewriteRule ^([a-zA-Z0-9_-]+)(|/)$ index.php?url=$1 RewriteRule ^news/(.*)$ /index.php?url=news&id=$1 RewriteEngine on RewriteRule ^(.*)\.htm$ $1.php [NC] RewriteRule ^(|/)$ dash.php?page=$1 RewriteRule ^([a-zA-Z0-9_-]+)(|/)$ dash.php?url=$1 RewriteEngine on RewriteRule ^habbo-imaging/badges/(.*).gif$ ./habbo-imaging/badge.php?badge=$1 parte da página profile que pega a variável: <?php $get = $_GET['usuario']; echo $get; ?>
  5. Olá pessoal, eu estou desenvolvendo uma aplicação que verifica se a senha digitada pelo usuário, é a mesma que está cadastrada no banco de dados.. ( explico melhor por comentário ) Mas o problema, é que eu não estou conseguindo passar a variável teste para o javascript. $teste = $core->hashed("310123101")."\n"; ?> esse é meu código php : <?php $teste = $core->hashed("310123101")."\n"; ?> <?php echo $teste; ?> e esse é o java script : <script> function verifica_senha(){ var utilizador = "<?php echo $teste; ?>"; window.alert(utilizador); } </script> Porém, a variável utilizador não está retornando nada. O que pode ser?
  6. Olá pessoas, estou desenvolvendo uma aplicação no visual basic que lista todos os arquivos em uma listbox, até aí tudo bem.. mas depois eu preciso fazer operações com esses arquivos, e o windows diz que estes arquivos estão sendo usados pela minha aplicação. Como resolvo isso? segue o código: ListBox1.Items.Clear() files = dirinfo.GetFiles("*", IO.SearchOption.AllDirectories) For Each file In files ListBox1.Items.Add(file.FullName) Next Dim fluxoTexto As IO.StreamWriter Dim Arquivo As String = Application.StartupPath + "\teste.txt" Dim conta As String = -1 fluxoTexto = New IO.StreamWriter(Arquivo) fluxoTexto.Write("[UPDATE]" & vbCrLf) fluxoTexto.Write("total=" & ListBox1.Items.Count & vbCrLf) For Each item As String In ListBox1.Items ' o erro começa aqui conta = conta + 1 crc = GetCRC32(item).ToString fluxoTexto.Write("[" & conta & "]" & vbCrLf) Dim arrItem() As String Dim strMensagem As String strMensagem = item arrItem = Split(strMensagem, "\update\") fluxoTexto.Write("caminho=" & arrItem(1) & vbCrLf) fluxoTexto.Write("crc32=" & crc & vbCrLf) infoReader = My.Computer.FileSystem.GetFileInfo(item) fluxoTexto.Write("len=" & infoReader.Length & vbCrLf) Exit For Next fluxoTexto.Close()
  7. Roberto Paes

    Erro no css, informações saindo da div

    erro: http://ap.imagensbrasil.org/image/DiugR
  8. index: <div class="container"> <aside role="complimentary" id="complimentary"> <div class="widget" id="status"> <h4 class="widget-title">Status do servidor</h4> <div class="widget-content"> <h5 class="online"><?php ##$fp = @fsockopen("abacatecraft.hostgamebr.com", 10451, $errno, $errstr, 800); ##if($fp >= 1){ ##echo '<font color=17325547>Online</font>';} ##else{ echo '<font color=990000>Offline</font>'; } ?> <br> </h5> <p>abacatecraft.hostgamebr.com</p> </div><!-- .widget-content --> </div><!-- .widget --> <div class="equipe" id="search"> <h4 class="equipe-title">Equipe</h4> <div class="equipe-content"> <p> <?php include 'exibirequipe.php'; ?> </div><!-- .widget-content --> </div><!-- .widget --> style.css : /* ########################################################### ### Project Information ### ### Template: MC Generic ### ### Version: 1.03 ### ### Release: 09 July 2012 ### ### Author: D3X Solutions - Seth Moon ### ### URL: design.d3x.co/demo/mcgeneric ### ### Copyright: 2012 D3X Solutions ### ### License: GNU GPL 2 ### ########################################################### */ /* UNCOMPRESSED CSS FILE INSIDE EXTRAS FOLDER */ @font-face { font-family: "Minecraft Regular"; src: url("font/minecraft_font.eot?") format("eot"), url("font/minecraft_font.woff") format("woff"), url("font/minecraft_font.ttf") format("truetype"), url("font/minecraft_font.svg#Minecraft") format("svg"); font-weight: normal; font-style: normal; } @font-face { font-family: "MineCrafter 2.0 Regular"; src: url("font/minecrafter_20.eot?") format("eot"), url("font/minecrafter_20.woff") format("woff"), url("font/minecrafter_20.ttf") format("truetype"), url("font/minecrafter_20.svg#MineCrafter-2.0") format("svg"); font-weight: normal; font-style: normal; } h1, h2, h3, h4, h5, h6 { margin: 0; font-family: "Minecraft Regular"; } /** * HTML5 Boilerplate Styles, slightly modified for this template */ article, aside, details, figcaption, figure, footer, header, hgroup, nav, section { display: block; } audio, canvas, video { display: inline-block; *display: inline; *zoom: 1; } audio: not([controls]) { display: none; } [hidden] { display: none; } html { font-size: 100%; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; text-align: center; background: url(img/teste.png); color: #FFF; } html, button, input, select, textarea { font-family: sans-serif; color: #222; } body { margin: 0; font-size: 1em; line-height: 1.4; } ::-moz-selection { background: #526E21; color: #FFF; text-shadow: none; } ::-webkit-selection { background: #526E21; color: #FFF; text-shadow: none; } ::selection { background: #526E21; color: #FFF; text-shadow: none; } a { color: #951A13; } a:visited { color: #951A13; } a:hover { color: #C3251D; } a:focus { outline: thin dotted; } a:hover, a:active { outline: 0; } abbr[title] { border-bottom: 1px dotted; } b, strong { font-weight: bold; } blockquote { margin: 1em 40px; font-family: "Times New Roman", Times, serif; font-style: italic; line-height: 160%; } dfn { font-style: italic; } hr { display: block; height: 1px; border: 0; border-top: 1px solid #ccc; margin: 1em 0; padding: 0; } ins { background: #ff9; color: #000; text-decoration: none; } mark { background: #ff0; color: #000; font-style: italic; font-weight: bold; } pre, code, kbd, samp { font-family: monospace, serif; _font-family: 'courier new', monospace; font-size: 1em; } pre { white-space: pre; white-space: pre-wrap; word-wrap: break-word; } q { quotes: none; } q:before, q:after { content: ""; content: none; } small { font-size: 85%; } sub, sup { font-size: 75%; line-height: 0; position: relative; vertical-align: baseline; } sup { top: -0.5em; } sub { bottom: -0.25em; } ul, ol { margin: 1em 0; padding: 0 0 0 40px; } dd { margin: 0 0 0 40px; } nav ul, nav ol { list-style: none; list-style-image: none; margin: 0; padding: 0; } img { border: 0; -ms-interpolation-mode: bicubic; vertical-align: middle; } svg: not(: root) { overflow: hidden; } figure { margin: 0; } form { margin: 0; } fieldset { border: 0; margin: 0; padding: 0; } label { cursor: pointer; } legend { border: 0; *; padding: 0; white-space: normal; } button, input, select, textarea { font-size: 100%; margin: 0; vertical-align: baseline; *vertical-align: middle; } button, input { line-height: normal; } input:focus { outline:none; } button, input[type=button], input[type=reset], input[type=submit] { cursor: pointer; -webkit-appearance: button; *overflow: visible; } button[disabled], input[disabled] { cursor: default; } input[type=checkbox], input[type=radio] { box-sizing: border-box; padding: 0; *width: 13px; *height: 13px; } input[type=search] { -webkit-appearance: textfield; -moz-box-sizing: content-box; -webkit-box-sizing: content-box; box-sizing: content-box; float: left; width: 174px; line-height: 1.5em; background: #8B8B8B; color: #FFF; text-shadow: 2px 2px #3F3F3F; font-family: "Minecraft Regular", Arial; border: 2px solid #555; border-bottom-color: #FFF; border-right: none; padding: 6px; } input[type=search]: : -webkit-search-decoration, input[type=search]: : -webkit-search-cancel-button { -webkit-appearance: none; } button: : -moz-focus-inner, input: : -moz-focus-inner { border: 0; padding: 0; } textarea { overflow: auto; vertical-align: top; resize: vertical; } input: valid, textarea:valid { } input: invalid, textarea:invalid { background-color: #f0dddd; } table { border-collapse: collapse; border-spacing: 0; } td { vertical-align: top; } /** * General/Core Styles * Create or modify Styles below */ .container { width: 900px;/*The template is currently built to only handle 900px*/ text-align: left; margin: 0 auto 20px;/*top left/right bottom*/ } .teste { width: 150px;/*The template is currently built to only handle 900px*/ text-align: center; margin: 0 auto 20px;/*top left/right bottom*/ } /** * Header Styles */ header hgroup h1, header hgroup h2 { font-family: "MineCrafter 2.0 Regular"; text-transform: uppercase; text-align: center; } header hgroup a, header hgroup a:visited, header hgroup a:hover { text-decoration: none; color: #FCF6E8; } header h1, header h2 { margin: 0; font-weight: 400; color: #FCF6E8; } header h1 { margin-top: 20px; font-size: 5em; } header h2 { font-size: 2em; } header nav li { float: left; } header nav a, header nav a:visited { display: block; background: url(img/sprite-crafty.png) #AA8C55 no-repeat -890px -274px; border: 2px solid #56472A; -moz-box-shadow: -2px -2px 3px #333; -webkit-box-shadow: -2px -2px 3px #333; box-shadow: -2px -2px 3px #333; color: #000; font-family: "Minecraft Regular", Arial; text-decoration: none; margin: 8px; padding: 10px 10px 11px; text-transform: capitalize; } header nav a:hover { color: #FFF; background-position: -890px -319px; } /** * The Sidebar Style */ aside[role=complimentary] { float: right; width: 250px; padding-top:8px; } /** * Widget styling. * Widgets are the little sections of content in the sidebar. * Comon use cases for a sidebar widgets include menus, search boxes, and user forms. */ .widget { position:relative; margin-bottom:20px; } .widget-title { height: 35px; padding-top:10px; margin-bottom:8px; font-size: 1.2em; text-align: center; color: #E0E0E0; text-shadow: 2px 2px #383838; background: url(img/sprite-crafty.png) no-repeat -1299px -274px; font-family: "Minecraft Regular", Arial; font-weight: 400; text-transform: capitalize; } .widget-content { position:relative; background: url(img/sprite-crafty.png) repeat-y -640px 0; color: #000; padding: 10px; } .widget-content:before { background: url(img/sprite-crafty.png) no-repeat -1299px -321px; content: " "; display: block; width: 250px; height: 8px; position: absolute; top: -8px; left: 0; } .widget-content:after { background: url(img/sprite-crafty.png) no-repeat -1299px -329px; content: " "; display: block; width: 250px; height: 8px; position: absolute; bottom: -8px; left: 0; } .widget ul { list-style:none; margin:0; padding:0; } .widget ul ul { margin-left:10px; margin-right:10px; margin-top:5px; } .widget li { border:2px solid #383838; margin-bottom:5px; background:#FFF; } .widget li a { display:block; padding:5px; background:#8B8B8B; color:#FFF; border:2px solid white; text-decoration:none; } .widget li a:hover { background:#515151; } .equipe { width: 300px; height: 600px; position:relative; margin-bottom:1000px; } .equipe-title { height: px; padding-top:10px; margin-bottom:8px; font-size: 1.2em; text-align: center; color: #E0E0E0; text-shadow: 2px 2px #383838; background: url(img/sprite-crafty.png) no-repeat -1299px -274px; font-family: "Minecraft Regular", Arial; font-weight: 400; text-transform: capitalize; } .equipe-content { position:relative; background: url(img/sprite-crafty.png) repeat-y -640px 0; color: #000; padding: 10px; } .equipe-content:before { background: url(img/sprite-crafty.png) no-repeat -1299px -321px; content: " "; display: block; width: 250px; height: 8px; position: absolute; top: -8px; left: 0; } .equipe-content:after { background: url(img/sprite-crafty.png) no-repeat -1299px -329px; content: " "; display: block; width: 250px; height: 8px; position: absolute; bottom: -8px; left: 0; } .equipe ul { list-style:none; margin:0; padding:0; } .equipe ul ul { margin-left:10px; margin-right:10px; margin-top:5px; } .equipe li { border:2px solid #383838; margin-bottom:5px; background:#FFF; } .equipe li a { display:block; padding:5px; background:#8B8B8B; color:#FFF; border:2px solid white; text-decoration:none; } .equipe li a:hover { background:#515151; } #main { overflow:hidden; margin:0%; } #menu { float:left; width:32%; height:10px; position:relative; left: -300px; top: 0px; margin:0; padding-left: 400px; } #conteudo { float:left; width:167%; height:10px; position: relative; left: -320px; top: 0px; padding-left: 400px; /*padding-right: auto; margin:0%; */ } .tamanho { width: 100%; } /** * News Widget */ #news .item-pubdate { text-align:right; font-style:italic; padding:5px; padding-top:2px; color:#333; } #news li { border:none; } /** * Login Widget */ #login { font-family: "Minecraft Regular", Arial; } #login label { color:#666; } #login input[type=text],#login input[type=email],#login input[type=password] { margin:0 auto; margin-bottom:5px; background: #8B8B8B; color: #FFF; border: 2px solid #555; border-bottom-color: #FFF; text-shadow: 2px 2px #3F3F3F; font-family: "Minecraft Regular", Arial; padding: 6px; line-height: 1.5em; } #login input[type=submit] { float:right; border: 2px solid #000; font-family: "Minecraft Regular", Arial; color: #E0E0E0; text-shadow: 2px 2px #383838; text-align: center; text-decoration: none; background: url(img/sprite-crafty.png) no-repeat -892px -42px; padding: 5px 15px 9px; } #login input[type=submit]:hover { color: #FFFFA0; text-shadow: 2px 2px #3F3F28; cursor: pointer; background-position: -892px -82px; } #login a { display:inline-block; padding-top:7px; padding-left:20px; } #equipe { font-family: "Minecraft Regular", Arial; } #equipe label { color:#666; } #equipe input[type=text],#login input[type=email],#login input[type=password] { margin:0 auto; margin-bottom:px; background: #8B8B8B; color: #FFF; border: 2px solid #555; border-bottom-color: #FFF; text-shadow: 2px 2px #3F3F3F; font-family: "Minecraft Regular", Arial; padding: 6px; line-height: 1.5em; } #equipe input[type=submit] { float:left; border: 30px solid #000; font-family: "Minecraft Regular", Arial; color: #E0E0E0; text-shadow: 2px 2px #383838; text-align: center; text-decoration: none; background: url(img/sprite-crafty.png) no-repeat -892px -90px; padding: 5px 15px 9px; } #equipe input[type=submit]:hover { color: #FFFFA0; text-shadow: 2px 2px #3F3F28; cursor: pointer; background-position: -892px -82px; } #equipe a { display:inline-block; padding-top:7px; padding-left:20px; } /** * Server Status Widget */ #status .widget-content h5, #status .widget-content p { text-align: center; margin: 0; } #status .widget-content h5 { font-size: 1.5em; } #status .widget-content h5.online { color: green; } #status .widget-content h5.offline { color: red; } #status .widget-content p { font-style: italic; font-size: .8em; } /** * Search Widget */ input[type=search] { float: left; width: 174px; line-height: 1.5em; background: #8B8B8B; color: #FFF; text-shadow: 2px 2px #3F3F3F; font-family: "Minecraft Regular", Arial; border: 2px solid #555; border-bottom-color: #FFF; border-right: none; padding: 6px; } ::-webkit-input-placeholder { color: #FFF; } ::-moz-placeholder { color: #FFF; } input.searchbtn { float: left; width: 38px; height: 40px; border: 2px solid #555; border-left: none; border-bottom-color: #FFF; background: url(img/sprite-crafty.png) no-repeat -1532px -122px; color: transparent; } input.searchbtn:hover { cursor: pointer; background-position: -1532px -162px; } .ie input[type=search] {/*IE Support*/ padding: 8px 6px; } /** * Primary Content Area Styles * This is where the blog postings or content will be shown. */ div[role=main] { margin-right: 260px; padding-top: 26px; } div[role=main] h1 a, div[role=main] h1 a:visited, div[role=main] h2 a, div[role=main] h2 a:visited, div[role=main] h3 a, div[role=main] h3 a:visited, div[role=main] h4 a, div[role=main] h4 a:visited, div[role=main] h5 a, div[role=main] h5 a:visited, div[role=main] h6 a, div[role=main] h6 a:visited { text-decoration: none; } div[role=main] h1, div[role=main] h2 { font-family: "MineCrafter 2.0 Regular"; } div[role=main] h1 { font-size: 3em; text-transform: uppercase; } div[role=main] h3 { font-size: 1.5em; text-align: center; margin: 20px 0; } div[role=main] h4 { display: block; margin-bottom: 10px; font-size: 1.25em; } /** * Article Styles * This is the styling for the books you see on the page. * :before and :after are used so you don't need to add any extra elements. * The padding from the top of the book to the start of the text can not be altered without cutting off the text. */ article:before { background: url(img/sprite-crafty.png) no-repeat -890px -120px; content: " "; display: block; width: 640px; height: 66px; position: absolute; top: -26px; left: 0; z-index:2; } article { background: url(img/sprite-crafty.png) repeat-y; color: #000; margin-bottom: 70px; position: relative; padding: 50px 70px 88px; z-index:1; } article:after { background: url(img/sprite-crafty.png) no-repeat -890px -186px; content: " "; display: block; width: 640px; height: 88px; position: absolute; bottom: -80px; left: 0; } /** * Button Styles * Add class="button" to a link or text. * Does NOT work for multiline buttons. */ .button, .button:visited { display: block; border: 2px solid #000; font-family: "Minecraft Regular", Arial; color: #E0E0E0; text-shadow: 2px 2px #383838; text-align: center; text-decoration: none; background: url(img/sprite-crafty.png) no-repeat -892px -42px; padding: 5px 15px 9px; } .button:hover { color: #FFFFA0; text-shadow: 2px 2px #3F3F28; cursor: pointer; background-position: -892px -82px; } /** * Table Styles */ table { text-align: center; } tr:nth-child(even) { background: #D3CBB8; } td { vertical-align: center; padding: 0 10px; } td.label { text-align: right; } /** * Footer Styles */ footer, footer a, footer a:visited, footer a:hover { clear: both; font-style: italic; margin: 10px 0; color: #666; text-decoration: none; } /** * More HTML5 Boilerplate Styles. * Do not place any CSS after this */ .ir { display: block; border: 0; text-indent: -999em; overflow: hidden; background-color: transparent; background-repeat: no-repeat; text-align: left; direction: ltr; *line-height: 0; } .ir br { display: none; } .hidden { display: none !important; visibility: hidden; } .visuallyhidden { border: 0; clip: rect(0 0 0 0); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; } .visuallyhidden.focusable:active, .visuallyhidden.focusable:focus { clip: auto; height: auto; margin: 0; overflow: visible; position: static; width: auto; } .invisible { visibility: hidden; } .clearfix:before, .clearfix:after { content: ""; display: table; } .clearfix:after { clear: both; } .clearfix { *zoom: 1; } /*IE Support*/ .lt-ie8 header nav a, .lt-ie8 header nav a:visited { background-position: -888px -272px; } .lt-ie8 header nav a:hover { background-position: -888px -317px; } .lt-ie8 #complimentary { float: right; width: 250px; padding-top:0; } .lt-ie8 .widget-title { margin-bottom:0; } .lt-ie8 .widget-content { background:#C6C6C6; border:2px solid black; } .lt-ie8 #main { margin-right: 260px; padding-top:0; } .lt-ie8 #main h1, .lt-ie8 #main h2 { font-family: "MineCrafter 2.0 Regular"; } .lt-ie8 article { background:#FCF6E4; border:20px solid #74321E; padding: 46px 50px 68px; } .lt-ie8 .button, .lt-ie8 .button:visited { background-position:-890px -40px; } .lt-ie8 .button:hover { background-position: -890px -80px; } .lt-ie8 input.searchbtn:hover { background-position: -1530px -162px; } Erro: texto aparecendo fora da div. Ajude-me
  9. Roberto Paes

    Thread !

    Boa tarde galera do fórum, tudo bem ?? seguinte: Estou desenvolvendo uma aplicação no visual basic 2010 express.. mas houve um problema. Ela precisa se comunicar com meu arduino ( um micro controlador..). Vamos ao que realmente interessa, o problema. Função que chama o user32.dll e envia o comando para o computador.. <DllImport("user32.dll", SetLastError:=True, CharSet:=CharSet.Auto)> Private Shared Function SendMessage(ByVal hWnd As IntPtr, ByVal Msg As UInteger, ByVal wParam As IntPtr, ByVal lParam As IntPtr) As IntPtr End Function Esse é o comando que ele deve realizar dentro da serial port data received( esse comando diminuiu o volume do computador, chamando o uso do user32.dll ) SendMessage(Me.Handle, WM_APPCOMMAND, &H30292, APPCOMMAND_VOLUME_DOWN * &H10000) Código que está com erro: Private Sub SerialPort1_DataReceived(ByVal sender As System.Object, ByVal e As System.IO.Ports.SerialDataReceivedEventArgs) Handles SerialPort1.DataReceived Dim textoDaPorta As String textodaPorta = SerialPort1.ReadLine RichTextBox1.Invoke(Sub() RichTextBox1.Text += textoDaPorta & Environment.NewLine) If textoDaPorta = 3877748955 Then Label3.Invoke(Sub() Label3.Text = textoDaPorta) SendMessage.invoke(Sub() SendMessage(Me.Handle, WM_APPCOMMAND, &H30292, APPCOMMAND_VOLUME_UP * &H10000)) End If If textoDaPorta = 2721879231 Then Label3.Invoke(Sub() Label3.Text = textoDaPorta) End If End Sub Erro que o visual basic reporta: Error 1 Argument not specified for parameter 'hWnd' of 'Private Shared Function SendMessage(hWnd As System.IntPtr, Msg As UInteger, wParam As System.IntPtr, lParam As System.IntPtr) As System.IntPtr'. C:\Users\rober_000\documents\visual studio 2010\Projects\volumearduino\volumearduino\Form1.vb 78 13 volumearduino Error 2 Argument not specified for parameter 'lParam' of 'Private Shared Function SendMessage(hWnd As System.IntPtr, Msg As UInteger, wParam As System.IntPtr, lParam As System.IntPtr) As System.IntPtr'. C:\Users\rober_000\documents\visual studio 2010\Projects\volumearduino\volumearduino\Form1.vb 78 13 volumearduino Error 3 Argument not specified for parameter 'Msg' of 'Private Shared Function SendMessage(hWnd As System.IntPtr, Msg As UInteger, wParam As System.IntPtr, lParam As System.IntPtr) As System.IntPtr'. C:\Users\rober_000\documents\visual studio 2010\Projects\volumearduino\volumearduino\Form1.vb 78 13 volumearduino Error 4 Argument not specified for parameter 'wParam' of 'Private Shared Function SendMessage(hWnd As System.IntPtr, Msg As UInteger, wParam As System.IntPtr, lParam As System.IntPtr) As System.IntPtr'. C:\Users\rober_000\documents\visual studio 2010\Projects\volumearduino\volumearduino\Form1.vb 78 13 volumearduino Erro que aparece sem o uso do invoke : || Cross-thread operation not valid: Control 'Form1' accessed from a thread other than the thread it was created on.Usando SendMessage(Me.Handle, WM_APPCOMMAND, &H30292, APPCOMMAND_VOLUME_DOWN * &H10000)
  10. É o seguinte galera, estou desenvolvendo uma aplicação que fará o download de um arquivo em zip. E depois este arquivo será extraído e assim, substituindo os arquivos antigos. Esse é um auto update.. O problema é o seguinte: Até 76kb.. o programa funciona numa boa, eu consigo ver o progressbar funcionando e etc.. Quando o arquivo passa para o tamanho MB, ele trava a aplicação dá um erro de not responding mas continua realizando a extração, apenas o form parece dar erro. Vídeo que melhor explica essa situação : https://www.youtube.com/watch?v=lOPdw2V9-Bc&feature=youtu.be Meu código: Imports Ionic.Zip Imports System.IO Imports Ionic.Crc Public Class Form1 Private Sub MyExtract() Try Dim ZipToUnpack As String = Application.StartupPath & "\update.zip" Dim UnpackDirectory As String = Application.StartupPath Using zip1 As ZipFile = ZipFile.Read(ZipToUnpack) Dim e As ZipEntry ' here, we extract every entry, but we could extract conditionally, ' based on entry name, size, date, checkbox status, etc. For Each e In zip1 e.Extract(UnpackDirectory, ExtractExistingFileAction.OverwriteSilently) System.Threading.Thread.Sleep(20) Next ' MsgBox("Atualização terminou.") Me.ProgressBar1.Value = Me.ProgressBar1.Maximum.ToString Timer1.Enabled = False End Using Catch exc1 As Exception MsgBox("Atualização deu problema.") Timer1.Enabled = False End Try End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click MyExtract() Timer1.Enabled = True End Sub Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim ZipToUnpack As String = Application.StartupPath & "\update.zip" Using zip1 As ZipFile = ZipFile.Read(ZipToUnpack) ProgressBar1.Maximum = zip1.Entries.Count.ToString() Label3.Text = zip1.Entries.Count.ToString() End Using End Sub Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick ' Dim ZipToUnpack As String = Application.StartupPath & "\update.zip" ' Using zip1 As ZipFile = ZipFile.Read(ZipToUnpack) 'Label2.Text = zip1.Entries.Count.ToString ' +"De" + zip1.EntryFileNames.Count.ToString ' End Using If Me.ProgressBar1.Maximum > Me.ProgressBar1.Value Then Me.ProgressBar1.Value += 1 MyBase.Update() End If Label3.Text = ProgressBar1.Maximum Label4.Text = ProgressBar1.Value Label5.Text = Timer1.Enabled End Sub End Class Desculpe-me pelo erro no título. Pensei que fosse tag.
  11. Roberto Paes

    Formatar data,

    Amigos, encontrei um datetime picker na internet, mas obtive o seguinte problema: a data vem assim, 2013/10/16 04:00. esse é o script do date picker(um campo que eu posso selecionar a data e a hora e depois adicionar ao banco de dados) esse é o script: <script>/* window.onerror = function(errorMsg) { $('#console').html($('#console').html()+'<br>'+errorMsg) }*/ $('#datetimepicker').datetimepicker({ dayOfWeekStart : 1, lang:'pt_BR', disabledDates:['1986/01/08','1986/01/09','1986/01/10'], startDate: '01/05/1986' }); $('#datetimepicker').datetimepicker({value:'15/04/2015 05:03',step:10}); $('#default_datetimepicker').datetimepicker({ formatTime:'H:i', formatDate:'d.m.Y', defaultDate:'8.12.1986', // it's my birthday defaultTime:'10:00', timepickerScrollbar:false }); $('#datetimepicker10').datetimepicker({ step:5, inline:true }); $('#datetimepicker_mask').datetimepicker({ mask:'9999/19/39 29:59' }); $('#datetimepicker1').datetimepicker({ datepicker:false, format:'H:i', step:5 }); $('#datetimepicker2').datetimepicker({ yearOffset:222, lang:'ch', timepicker:false, format:'d/m/Y', formatDate:'Y/m/d', minDate:'-1970/01/02', // yesterday is minimum date maxDate:'+1970/01/02' // and tommorow is maximum date calendar }); $('#datetimepicker3').datetimepicker({ inline:true }); $('#datetimepicker4').datetimepicker(); $('#open').click(function(){ $('#datetimepicker4').datetimepicker('show'); }); $('#close').click(function(){ $('#datetimepicker4').datetimepicker('hide'); }); $('#reset').click(function(){ $('#datetimepicker4').datetimepicker('reset'); }); $('#datetimepicker5').datetimepicker({ datepicker:false, allowTimes:['12:00','13:00','15:00','17:00','17:05','17:20','19:00','20:00'], step:5 }); $('#datetimepicker6').datetimepicker(); $('#destroy').click(function(){ if( $('#datetimepicker6').data('xdsoft_datetimepicker') ){ $('#datetimepicker6').datetimepicker('destroy'); this.value = 'create'; }else{ $('#datetimepicker6').datetimepicker(); this.value = 'destroy'; } }); var logic = function( currentDateTime ){ if( currentDateTime.getDay()==6 ){ this.setOptions({ minTime:'11:00' }); }else this.setOptions({ minTime:'8:00' }); }; $('#datetimepicker7').datetimepicker({ onChangeDateTime:logic, onShow:logic }); $('#datetimepicker8').datetimepicker({ onGenerate:function( ct ){ $(this).find('.xdsoft_date') .toggleClass('xdsoft_disabled'); }, minDate:'-1970/01/2', maxDate:'+1970/01/2', timepicker:false }); $('#datetimepicker9').datetimepicker({ onGenerate:function( ct ){ $(this).find('.xdsoft_date.xdsoft_weekend') .addClass('xdsoft_disabled'); }, weekends:['01.01.2014','02.01.2014','03.01.2014','04.01.2014','05.01.2014','06.01.2014'], timepicker:false }); var dateToDisable = new Date(); dateToDisable.setDate(dateToDisable.getDate() + 2); $('#datetimepicker11').datetimepicker({ beforeShowDay: function(date) { if (date.getMonth() == dateToDisable.getMonth() && date.getDate() == dateToDisable.getDate()) { return [false, ""] } return [true, ""]; } }); $('#datetimepicker12').datetimepicker({ beforeShowDay: function(date) { if (date.getMonth() == dateToDisable.getMonth() && date.getDate() == dateToDisable.getDate()) { return [true, "custom-date-style"]; } return [true, ""]; } }); $('#datetimepicker_dark').datetimepicker({theme:'dark'}) </script> </div> </body> </html>
  12. Roberto Paes

    Problema com query ( mysql)

    O problema é no where..
  13. Roberto Paes

    Problema com query ( mysql)

    Dim Query As String Dim connection As New MySqlConnection(connStr) connection.Open() Query = "UPDATE test SET play ='" + "0" + "'," Query = Query + " front = '" + "0" + "'," Query = Query + " back = '" + "0" + "'," Query = Query + " value = '" + "50" + "'," Query = Query + " item = '" + "0" + "'," Query = Query + " WHERE dbid = '2' " Dim cmd As MySqlCommand = New MySqlCommand(Query, connection) Dim i As Integer = cmd.ExecuteNonQuery() If (i > 0) Then Timer1.Enabled = True Else Label4.Text = "Não foi possível conectar-se com o aplicativo móvel." End If connection.Close() O visual basic informa que : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE dbid = '2'' at line 1, como consertar essa síntaxe?
  14. Roberto Paes

    Problema com if

    Olá pessoal, desenvolvi um aplicativo para android que usa o mysql para se comunicar com o visual basic e controlar um player. No código abaixo, 1 quer dizer verdadeiro, ou seja. Ele dá play na música, porém.. esse if é continuo pois eu preciso verificar se houve alteração na variavel que contem esse valor. Observe: Try Dim query As String = "SELECT play FROM test" Dim connection As New MySqlConnection(connStr) With sqlCmd connection.Open() .Connection = connection .CommandText = query End With Dreader = sqlCmd.ExecuteReader() Do While Dreader.Read Label1.Text = Dreader("play") Loop Dreader.Close() connection.Dispose() connection.Close() Catch ex As Exception End Try If (Label1.Text = "1") Then AxWindowsMediaPlayer1.URL = ListBox1.SelectedItem Label2.Text = "Now Playing: " & ListBox1.SelectedItem End If End Sub Como fazer para ler se houve alteração sem o if e conseguir dar o play na música, pois, quando essa variável é 1. O player de música fica tocando e parando a música. Preciso que ele perceba que houve alteração na variavel, veja qual é o valor e assim. Dê o play na música.
  15. Roberto Paes

    If não realiza ação

    Não funcionou mas obrigado pela ajuda, abraços!... eu estou desenvolvendo um app no android que controla o player dessa página. Se puder chamar alguém para ajudar, eu seria eternamente grato
×

Important Information

Ao usar o fórum, você concorda com nossos Terms of Use.