Ir para conteúdo
Fórum Script Brasil

ramon

Membros
  • Total de itens

    1.354
  • Registro em

  • Última visita

Posts postados por ramon

  1. Eu tenho um bem simples cara veja se te serve wink.gif

    'Num módulo
    
    Function Codifica(Entrada As String, Senha As String) As String
    Dim a As Long
    Dim i As Long
    Dim t As Long
    On Error Resume Next
    t = 1
    Codifica = String(Len(Entrada), 0)
    For i = 1 To Len(Entrada)
        a = Asc(Mid(Entrada, i, 1)) + Asc(Mid(Senha, t, 1))
        While a > 255
            a = a - 256
        Wend
        Mid$(Codifica, i, 1) = Chr(a)
        t = t + 1
        If t > Len(Senha) Then: t = 1
    Next i
    End Function
    
    Function Decodifica(Entrada As String, Senha As String) As String
    Dim a As Long
    Dim i As Long
    Dim t As Long
    On Error Resume Next
    t = 1
    Decodifica = String(Len(Entrada), 0)
    For i = 1 To Len(Entrada)
        a = Asc(Mid(Entrada, i, 1)) - Asc(Mid(Senha, t, 1))
        While a < 0
            a = a + 255
        Wend
        Mid$(Decodifica, i, 1) = Chr(a)
        t = t + 1
        If t > Len(Senha) Then: t = 1
    Next i
    End Function
    
    
    
    'Exemplo:
    
    'Num Form:
    
    Private Sub Command1_Click()
    Dim STR As String
    STR = InputBox("Digite algum texto.")
    STR = Codifica(STR, "abc")
    MsgBox Decodifica(STR, "abc")
    End Sub
    

    Qualquer coisa volta ae cara.

    beleza, falow!

  2. Sim biggrin.gif

    Crie um Form Qualquer

    Adicione o ADD IN ActiveX Document Migration Wizard ao projeto e o execute

    Selecione o form que deseja exportar

    E mande gerar um EXE

    Perceba que ele irá criar um arquivo com a extensão .VBD

    É soa associar esse arquivo ao Internet Explorer, e abri-lo pelo navegador

    Ex: C:\WINDOWS\Desktop\docForm1.vbd

  3. Que eu saiba, cookies são simples arquivos .TXT.

    Um FileListBox com Pattern = *.TXT e depois:

    Sub ApagaCookies() 
    
    Dim I As Integer 
    Dim F As String 
    
    File1.Refresh 
    
    For I = 0 To File1.ListCount - 1 
    F = File1.List(I) 
    If Dir(F) <> "" Then Kill F 
    Next 
    
    End Sub
    

    Simples não é? tongue.gif

  4. já resolvi minha duvida bastaria apenas fazer isso

    Option Explicit
    Dim WithEvents Label1 As Label
    Dim WithEvents Label2 As Label
    Dim WithEvents Label3 As Label
    Dim WithEvents Label4 As Label
    Dim WithEvents Label5 As Label
    
    Private Sub Form_Load()
    
    Set Label1 = Form1.Controls.Add("VB.Label", "Label1")
    Set Label2 = Form1.Controls.Add("VB.Label", "Label2")
    Set Label3 = Form1.Controls.Add("VB.Label", "Label3")
    Set Label4 = Form1.Controls.Add("VB.Label", "Label4")
    Set Label5 = Form1.Controls.Add("VB.Label", "Label5")
    
    Label1.Visible = True
    Label1.Top = 500
    Label1.Left = 500
    Label1.Caption = "eee"
    
    Label2.Visible = True
    Label2.Top = 500
    Label2.Left = 500
    
    Label3.Visible = True
    Label3.Top = 500
    Label3.Left = 500
    
    Label4.Visible = True
    Label4.Top = 500
    Label4.Left = 500
    
    Label5.Visible = True
    Label5.Top = 500
    Label5.Left = 500
    
    End Sub

  5. Como eu faço para criar varias labels em tempo de execução

    Tipo não sei quantas label eu preciso posso precisar de 5 6 7 então gostaria de saber se há uma maneira de criar elas quando o form for carregado

×
×
  • Criar Novo...