ORÇAMENTO SIMPLIFICADO PARA ELETRÔNICA
Código Fonte Escrito em VB6 para uso livre.
' PROGRAMADOR: Cícero Andrade
' LOCAL: BRASIL-MG-IBIRITÉ
' CONTATO: 55(31)98449-7996 (Whatsapp)
' PROGRAMA EM VB6 PARA ORÇAMENTO EM LOJA DE ELECTRÓNICA VERSÃO 1.2
' O PROGRAMADOR DISPONIBILIZA O CÓDIGO FONTE E O EXECUTÁVEL PARA USO LIVRE
Private Sub Form_Load()
Dim i As Long
pasta = "c:\Orçar\"
Arq = "*.txt"
Arquivo = Dir(pasta & Arq)
If Arquivo = "" Then Text9 = "0001"
While Arquivo ""
i = i + 1
Arquivo = Dir()
Text9 = i + 1
Text9 = Format(Text9, "0000")
Wend
End Sub
Private Sub Gravar_Click()
Dim Arquivo As String
If Dir("c:\Orçar\", vbDirectory) = "" Then MkDir "c:\Orçar\"
pasta = "c:\Orçar\"
Arq = Text9.Text & ".txt"
Arquivo = pasta & Arq
Open Arquivo For Output As #1
Print #1, "Orçamento==> "; Text9.Text
Print #1,
Print #1, Text1.Text
Print #1, Text2.Text
Print #1, Text3.Text
Print #1, Text4.Text
Print #1, Text5.Text
Print #1, Text6.Text
Print #1, Text7.Text
Print #1, Text8.Text
Print #1, Text19.Text
Close #1
Fim = MsgBox("Gravado! Gostaria de Sair", vbYesNo, "GRAVANDO...")
If Fim = vbYes Then End
If Fim = vbNo Then Unload Me
Orça1.Show
End Sub
Private Sub Imprimir_Click()
Orça1.PrintForm
End Sub
Private Sub OsCliente_Click()
Orça2.Show
End Sub
Private Sub OSGravada_Click()
Orça2.Show
End Sub
Private Sub ParaManutenção_Click()
Shell ("C:\Users\FH\Documents\CadastroFH.exe"), vbNormalFocus
End Sub
Private Sub Sair_Click()
End
End Sub
Private Sub Text1_Change()
Text17 = Text1.Text
End Sub
Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then
Text2.SetFocus
End If
End Sub
Private Sub Text19_Change()
Text20.Text = Text19.Text
End Sub
Private Sub Text19_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then
Text1.SetFocus
End If
End Sub
Private Sub Text2_Change()
Text16 = Text2.Text
End Sub
Private Sub Text2_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then
Text3.SetFocus
End If
End Sub
Private Sub Text2_LostFocus()
'Text2.Text = Format.Number
Text2.Text = Format(Text2.Text, "##/##/####")
End Sub
Private Sub Text3_Change()
Text15 = Text3.Text
End Sub
Private Sub Text3_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then
Text4.SetFocus
End If
End Sub
Private Sub Text4_Change()
Text14 = Text4.Text
End Sub
Private Sub Text4_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then
Text5.SetFocus
End If
End Sub
Private Sub Text5_Change()
Text13 = Text5.Text
End Sub
Private Sub Text5_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then
Text6.SetFocus
End If
End Sub
Private Sub Text5_LostFocus()
Text5.Text = Format(Text5.Text, "(##)#####-####")
End Sub
Private Sub Text6_Change()
Text12 = Text6.Text
End Sub
Private Sub Text6_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then
Text7.SetFocus
End If
End Sub
Private Sub Text6_LostFocus()
Text6.Text = Format(Text6.Text, "##/##/####")
End Sub
Private Sub Text7_Change()
Text11 = Text7.Text
End Sub
Private Sub Text7_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then
Text8.SetFocus
End If
End Sub
Private Sub Text7_LostFocus()
Text7.Text = Format(Text7.Text, "R$########,##0.00")
End Sub
Private Sub Text8_Change()
Text10 = Text8.Text
End Sub
Private Sub Text8_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then
Text19.SetFocus
End If
End Sub
Private Sub Text9_Change()
Text18.Text = Text9.Text
End Sub
Private Sub Text9_LostFocus()
Text9.Text = Format(Text9.Text, "####")
End Sub
' PROGRAMADOR: Cícero Andrade
' LOCAL: BRASIL-MG-IBIRITÉ
' CONTATO: 55(31)98449-7996 (Whatsapp)
' PROGRAMA EM VB6 PARA ORÇAMENTO EM LOJA DE ELECTRÓNICA VERSÃO 1.2
' O PROGRAMADOR DISPONIBILIZA O CÓDIGO FONTE E O EXECUTÁVEL PARA USO LIVRE
Private Sub Form_Load()
Dim i As Long
pasta = "c:\Orçar\"
Arq = "*.txt"
Arquivo = Dir(pasta & Arq)
If Arquivo = "" Then Text9 = "0001"
While Arquivo ""
i = i + 1
Arquivo = Dir()
Text9 = i + 1
Text9 = Format(Text9, "0000")
Wend
End Sub
Private Sub Gravar_Click()
Dim Arquivo As String
If Dir("c:\Orçar\", vbDirectory) = "" Then MkDir "c:\Orçar\"
pasta = "c:\Orçar\"
Arq = Text9.Text & ".txt"
Arquivo = pasta & Arq
Open Arquivo For Output As #1
Print #1, "Orçamento==> "; Text9.Text
Print #1,
Print #1, Text1.Text
Print #1, Text2.Text
Print #1, Text3.Text
Print #1, Text4.Text
Print #1, Text5.Text
Print #1, Text6.Text
Print #1, Text7.Text
Print #1, Text8.Text
Print #1, Text19.Text
Close #1
Fim = MsgBox("Gravado! Gostaria de Sair", vbYesNo, "GRAVANDO...")
If Fim = vbYes Then End
If Fim = vbNo Then Unload Me
Orça1.Show
End Sub
Private Sub Imprimir_Click()
Orça1.PrintForm
End Sub
Private Sub OsCliente_Click()
Orça2.Show
End Sub
Private Sub OSGravada_Click()
Orça2.Show
End Sub
Private Sub ParaManutenção_Click()
Shell ("C:\Users\FH\Documents\CadastroFH.exe"), vbNormalFocus
End Sub
Private Sub Sair_Click()
End
End Sub
Private Sub Text1_Change()
Text17 = Text1.Text
End Sub
Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then
Text2.SetFocus
End If
End Sub
Private Sub Text19_Change()
Text20.Text = Text19.Text
End Sub
Private Sub Text19_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then
Text1.SetFocus
End If
End Sub
Private Sub Text2_Change()
Text16 = Text2.Text
End Sub
Private Sub Text2_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then
Text3.SetFocus
End If
End Sub
Private Sub Text2_LostFocus()
'Text2.Text = Format.Number
Text2.Text = Format(Text2.Text, "##/##/####")
End Sub
Private Sub Text3_Change()
Text15 = Text3.Text
End Sub
Private Sub Text3_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then
Text4.SetFocus
End If
End Sub
Private Sub Text4_Change()
Text14 = Text4.Text
End Sub
Private Sub Text4_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then
Text5.SetFocus
End If
End Sub
Private Sub Text5_Change()
Text13 = Text5.Text
End Sub
Private Sub Text5_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then
Text6.SetFocus
End If
End Sub
Private Sub Text5_LostFocus()
Text5.Text = Format(Text5.Text, "(##)#####-####")
End Sub
Private Sub Text6_Change()
Text12 = Text6.Text
End Sub
Private Sub Text6_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then
Text7.SetFocus
End If
End Sub
Private Sub Text6_LostFocus()
Text6.Text = Format(Text6.Text, "##/##/####")
End Sub
Private Sub Text7_Change()
Text11 = Text7.Text
End Sub
Private Sub Text7_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then
Text8.SetFocus
End If
End Sub
Private Sub Text7_LostFocus()
Text7.Text = Format(Text7.Text, "R$########,##0.00")
End Sub
Private Sub Text8_Change()
Text10 = Text8.Text
End Sub
Private Sub Text8_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then
Text19.SetFocus
End If
End Sub
Private Sub Text9_Change()
Text18.Text = Text9.Text
End Sub
Private Sub Text9_LostFocus()
Text9.Text = Format(Text9.Text, "####")
End Sub
Ótima iniciativa, meu caro!
Minha sugestão é que você compartilhe o código na área de arquivos/upload do fórum.
Creio que seja iniciante aqui no fórum, então, boas vindas!
Minha sugestão é que você compartilhe o código na área de arquivos/upload do fórum.
Creio que seja iniciante aqui no fórum, então, boas vindas!
Faça seu login para responder