Escolar Documentos
Profissional Documentos
Cultura Documentos
Visual Basic
Visual Basic
Autor:
Marcelo de Oliveira Rodrigues
Software de gerenciamento
Nilted Modas_Moda Infanto Juvenil
COTECA APARECIDA/SP
Sumrio
Captulo 1
Introduo.....................................................................................................................3
Captulo 2
Objetivo........................................................................................................................5
Captulo 3
Banco de Dados...........................................................................................................6
1.1 Estruturas das Tabelas................................................................................7
Captulo 4
Linguagem de Programao utilizada........................................................................10
2.1 Design (Formulrios).................................................................................11
Captulo 5
Melhorias no Sistema...............................................................................................219
Captulo 6
Concluso.................................................................................................................220
Captulo 7
Referncia Bibliogrfica............................................................................................221
Introduo
a.n.li.se
(gr anlysis) sf 1 Decomposio ou separao de um todo em seus elementos
constituintes. 2 Exame ou estudo da natureza de uma coisa complexa ou
determinao de suas feies essenciais, por esse mtodo. 3 Psiq Psicanlise.
Antn (acepo 1): sntese.
sis.te.ma
(gr sstema) sm 1 Conjunto de coisas ou partes de modo a formarem um todo
complexo ou unitrio. 2 Qualquer conjunto ou srie de membros ou elementos
correlacionados. 3 Hbito ou costume peculiar de cada criatura. 4 Anat Conjunto de
rgos compostos dos mesmos tecidos destinados a idnticas funes fisiolgicas.
5 Astr Grupo de corpos celestes associados e agindo em conjunto, segundo
determinadas leis naturais. 6 Mtodo, modo, forma, plano. 7 Conjunto das
instituies polticas pelas quais governado um Estado. 8 Inform Conjunto
formado por um ou mais computadores, seus perifricos e os programas
utilizados. Sistema Digestrio (antes denominado aparelho digestivo), Anat:
conjunto de rgos que tm por funo tornar os alimentos assimilveis, aproveitar
parte deles e expulsar a poro intil. Sistema Nervoso, Anat: conjunto dos centros
nervosos e de todos os nervos. Sistema Nervoso Autnomo: parte do sistema
nervoso que inerva a musculatura cardaca e controla secrees glandulares
diversas. dividido em dois grandes setores: o simptico e o parassimptico.
Anlise de sistemas
Anlise de sistemas a atividade que tem como finalidade realizar
estudos de processos a fim de encontrar o melhor e mais racional caminho para que
a informao possa ser processada. O analista de sistemas estuda os diversos
sistemas existentes entre hardwares (equipamento), softwares (programas) e o
usurio final, seus comportamentos e aplicaes, desenvolvendo a partir de ento
solues que sero padronizadas e transcritas da forma que o computador possa
executar.
Objetivo
Desenvolver um projeto de desenvolvimento de software para gerenciar
uma loja, iniciando pela anlise do sistema, projeto do sistema e programao, na
execuo e finalizao do programa para possvel implantao futura.
Banco de Dados
Bancos de dados (ou bases de dados) so conjuntos de registros
dispostos em estrutura regular que possibilita a reorganizao dos mesmos e
produo de informao. Um banco de dados normalmente agrupa registros
utilizveis para um mesmo fim.
Um banco de dados usualmente mantido e acessado por meio de um
software conhecido como Sistema Gerenciador de Banco de Dados (SGBD).
Normalmente um SGBD adota um modelo de dados, de forma pura, reduzida ou
estendida. Muitas vezes o termo banco de dados usado como sinnimo de SGDB.
O modelo de dados mais adotado hoje em dia o modelo relacional, onde
as estruturas tm a forma de tabelas, compostas por linhas e colunas.
1.1 Forma que ser armazenado os dados, formao das tabelas e seus
Clientes
Nome do Campo
Cod_Cli
Nome_Cli
Logradouro_Cli
Endereco_Cli
Bairro_Cli
Compl_Cli
Cidade_Cli
Cep_Cli
Estado_Cli
DataNasc_Cli
Sexo_Cli
Cpf_Cli
Fone1_Cli
Fone2_Cli
Ramal_Cli
Renda_Cli
Email_Cli
Tipo de dados
Nmero
Texto
Texto
Texto
Texto
Texto
Texto
Nmero
Texto
Data/Hora
Texto
Nmero
Nmero
Nmero
Nmero
Nmero
Texto
Compras
Nome do Campo
Cod_Compra
Nf_Compra
CodPro_Compra
Qtd_Compra
CodFor_Compra
Data_Compra
Tipo de dados
Nmero
Nmero
Nmero
Nmero
Nmero
Data/Hora
Fornecedores
Nome do Campo
Cod_For
Razao_For
NomeFantasia_For
Logradouro_For
Endereco_For
Cidade_For
Bairro_For
Estado_For
Cep_For
Compl_For
Fone1_For
Fone2_For
Ramal_For
Fax_For
Email_For
Repre_For
InscEstadual_For
Cnpj_For
Tipo de dados
Nmero
Texto
Texto
Texto
Texto
Texto
Texto
Texto
Nmero
Texto
Nmero
Nmero
Nmero
Nmero
Texto
Texto
Nmero
Nmero
Funcionarios
Nome do Campo
Cod_Fun
Nome_Fun
Endereco_Fun
Logradouro_Fun
Bairro_Fun
Cidade_Fun
Compl_Fun
Cep_Fun
Estado_Fun
Rg_Fun
Cpf_Fun
Sexo_Fun
DataNasc_Fun
Fone1_Fun
Fone2_Fun
DataAdm_Fun
EMail_Fun
Cargo_Fun
Fotografia_Fun
Nivel_Fun
Senha_Fun
Tipo de dados
Nmero
Texto
Texto
Texto
Texto
Texto
Texto
Nmero
Texto
Nmero
Nmero
Texto
Data/Hora
Nmero
Nmero
Data/Hora
Texto
Texto
Texto
Texto
Texto
10
Produtos
Nome do Campo
Cod_Pro
Nome_Pro
Desc_Pro
Valor_Pro
CodFor_Pro
Tipo de dados
Nmero
Texto
Texto
Unidade Monetria
Nmero
User_Sistema
Nome do Campo
CodUser_Sist
Usuario_Sist
Senha_Sist
Nivel_Sist
Nmero
Texto
Texto
Texto
Vendas
Nome do Campo
Cod_Vend
CodCli_Vend
NomeCli_Vend
Funcionario_Vend
Data_Vend
Tipo de dados
Tipo de dados
Nmero
Nmero
Texto
Texto
Data/Hora
Vendas_Detalhes
Nome do Campo
Cod_VendDet
Item_VendDet
CodVend_VendDet
CodPro_VendDet
DescPro_VendDet
Qtd_VendDet
Preco_VendDet
SubTotal_VendDet
FormaPag_Vend
Total_VendDet
Tipo de dados
Nmero
Nmero
Nmero
Nmero
Texto
Nmero
Unidade Monetria
Unidade Monetria
Texto
Unidade Monetria
11
Visual Basic
O Visual Basic uma linguagem de programao produzida pela
empresa Microsoft, e parte integrante do pacote Microsoft Visual Studio. Sua
verso mais recente faz parte do pacote Visual Studio .NET, voltada para aplicaes
.Net. Sua verso anterior fez parte do Microsoft Visual Studio 6.0, ainda muito
utilizado atualmente.
Um aperfeioamento do BASIC, a linguagem dirigida por eventos (event
driven), e possui tambm um ambiente de desenvolvimento integrado (IDE Integrated Development Environment) totalmente grfico, facilitanto enormemente a
construo da interface das aplicaes (GUI - Graphical User Interface), da o nome
"Visual". Em suas primeiras verses, o Visual Basic no permitia acesso a bancos
de dados, sendo portanto, voltado apenas para iniciantes, mas devido ao sucesso
entre as empresas - que faziam uso de componentes adicionais fabricados por
terceiros para acesso a dados - a linguagem logo adotou tecnologias como DAO,
RDO, e ADO, tambm da Microsoft, permitindo fcil acesso a bases de dados. Mais
tarde foi adicionada tambm a possibilidade de criao de controles ActiveX, e, com
a chegada do Visual Studio .NET, o Visual Basic se tornou uma linguagem
totalmente orientada a objetos.
12
mesmo.
13
If rsLogon.RecordCount = 0 Then
MsgBox "Usurio ou Senha Invlida!", vbOKOnly + vbInformation, "Aviso"
txtUsuario.Text = ""
txtSenha.Text = ""
txtUsuario.SetFocus
rsLogon.Close
14
Exit Sub
Else
frmSplashPrincipal.Show
Vnivel = rsLogon("Nivel_Sist")
Vnome = rsLogon("Usuario_Sist")
mdiPrincipal.stbMostra.Panels(1).Text = "Operador: " & Vnome
If Vnivel = "B" Then
With mdiPrincipal
.Gerenciar.Visible = False
End With
End If
Unload Me
End If
End Sub
lblData.Caption = Date
lblHora.Caption = Time
End Sub
15
End If
End Sub
16
If pbbarra1.Value = 25 Then
pbbarra2.Value = pbbarra2.Value + 20
End If
If pbbarra1.Value = 50 Then
pbbarra2.Value = pbbarra2.Value + 20
End If
If pbbarra1.Value = 75 Then
pbbarra2.Value = pbbarra2.Value + 20
End If
17
Tela Principal, nela esto disponveis todas as ferramentas para uso dos
usurios.
18
19
End Sub
20
frmConProdutos.Top = 2000
frmConProdutos.Left = 2000
End Sub
21
cnBiblioteca.ConnectionString = "Provider=microsoft.jet.oledb.4.0"
cnBiblioteca.Open "D:\MARCELO\Projeto VB Final2\Loja.mdb"
End Sub
22
frmSplash.Left = 5000
ElseIf Button.Key = "Sair" Then
If MsgBox("Deseja realmente sair do sistema?", vbYesNo + vbQuestion, "Aviso") =
vbYes Then
End
End If
End If
End Sub
Private Sub UtiAgenda_Click()
frmSplash.Show
frmSplash.Top = 3000
frmSplash.Left = 5000
End Sub
23
frmTelaVenda.Left = 1500
frmTelaVenda.Top = 700
End Sub
Sub CentraImagem()
Picture1.Cls
Picture1.Visible = True
Picture1.AutoRedraw = True
Picture1.BackColor = &H8000000C
Picture1.Height = Me.Height
Image1.Stretch = False
Image1.Top = Picture1.Height / 2 - Image1.Height / 2
Image1.Left = Picture1.Width / 2 - Image1.Width / 2
Picture1.PaintPicture Image1, Image1.Left, Image1.Top, Image1.Width,
Image1.Height
mdiPrincipal.Picture = Picture1.Image
Picture1.Visible = False
End Sub
Sub EstendeImagem()
Picture1.Cls
Picture1.Visible = True
Picture1.AutoRedraw = True
Picture1.BackColor = &H8000000C
Picture1.Height = Me.Height
Image1.Stretch = True
Image1.Top = 0
Image1.Left = 0
Image1.Height = Picture1.Height
Image1.Width = Picture1.Width
Picture1.PaintPicture Image1, Image1.Left, Image1.Top, Image1.Width,
Image1.Height
mdiPrincipal.Picture = Picture1.Image
Picture1.Visible = False
24
End Sub
Sub NormalImagem()
Picture1.Visible = True
Image1.Stretch = False
mdiPrincipal.Picture = Image1.Picture
Picture1.Visible = False
End Sub
Sub LadoaLadoImagem()
Dim wid As Single
Dim hgt As Single
Dim x As Single
Dim y As Single
Picture1.Visible = True
Picture1.AutoRedraw = True
Picture1.Height = Me.Height
Image1.Stretch = False
wid = Image1.Width
hgt = Image1.Height
y=0
Do While y < Picture1.ScaleHeight
x=0
Do While x < Picture1.ScaleWidth
Picture1.PaintPicture Image1, x, y, wid, hgt
x = x + wid
Loop
y = y + hgt
Loop
Picture1.Visible = False
mdiPrincipal.Picture = Picture1.Image
End Sub
25
Tela onde inserido dados cadastrais dos clientes, podendo tambm alter-los
26
With xCombo
If xKeyAscii = 8 Then
If .SelStart = 0 Then Exit Function
.SelStart = .SelStart - 1
.SelLength = Len(.Text)
.SelText = vbNullString
Else
intPos = .SelStart
tStr = .Text
.SelText = (Chr$(xKeyAscii))
End If
lngFind = SendMessage(.hWnd, CB_FINDSTRING, 0, ByVal .Text)
If lngFind = -1 Then
.Text = tStr
.SelStart = intPos
.SelLength = (Len(.Text) - intPos)
Combo_AutoCompletar = xKeyAscii
Else
intPos = .SelStart
intLength = Len(.List(lngFind)) - Len(.Text)
.SelText = .SelText & Right$(.List(lngFind), intLength)
.SelStart = intPos
.SelLength = intLength
End If
End With
End Function
27
28
cmdExcluir.Enabled = False
cmdAlterar.Enabled = False
cmdPrimeiro.Enabled = False
cmdAnterior.Enabled = False
cmdProximo.Enabled = False
cmdUltimo.Enabled = False
cmdIncluir.Enabled = True
cmdFechar.Enabled = True
cmdCancelar.Enabled = False
cmdGravar.Enabled = False
Else
MostraRegistro
cmdGravar.Enabled = False
cmdCancelar.Enabled = False
cmdIncluir.Enabled = True
cmdFechar.Enabled = True
cmdPrimeiro.Enabled = True
cmdAnterior.Enabled = True
cmdProximo.Enabled = True
cmdUltimo.Enabled = True
cmdAlterar.Enabled = True
cmdExcluir.Enabled = True
End If
DesabilitaCampos
End Sub
rsCadClientes.Delete
If rsCadClientes.RecordCount = 0 Then
LimpaRegistro
29
cmdExcluir.Enabled = False
cmdAlterar.Enabled = False
cmdPrimeiro.Enabled = False
cmdAnterior.Enabled = False
cmdProximo.Enabled = False
cmdUltimo.Enabled = False
Else
rsCadClientes.MoveNext
If rsCadClientes.EOF Then
rsCadClientes.MoveLast
End If
MostraRegistro
End If
End If
End Sub
30
rsCadClientes("Cod_Cli") = txtCodigo.Text
rsCadClientes("Nome_Cli") = txtNome.Text
rsCadClientes("Logradouro_Cli") = cmbLogradouro.Text
rsCadClientes("Endereco_Cli") = txtEndereco.Text
rsCadClientes("Bairro_Cli") = txtBairro.Text
rsCadClientes("Compl_Cli") = txtComplemento.Text
rsCadClientes("Cidade_Cli") = txtCidade.Text
rsCadClientes("Cep_Cli") = txtCEP.Text
rsCadClientes("Estado_Cli") = txtEstado.Text
rsCadClientes("DataNasc_Cli") = txtData.Text
rsCadClientes("Sexo_Cli") = cmbSexo.Text
rsCadClientes("Cpf_Cli") = txtCPF.Text
rsCadClientes("Fone1_Cli") = txtFone1.Text
rsCadClientes("Fone2_Cli") = txtFone2.Text
rsCadClientes("Ramal_Cli") = txtRamal.Text
rsCadClientes("Renda_Cli") = txtRenda.Text
rsCadClientes("Email_Cli") = txtEmail.Text
31
rsCadClientes.Update
DesabilitaCampos
MsgBox "Dados do Cliente salvos com sucesso!!!", vbOKOnly + vbInformation,
"Aviso"
cmdCancelar.Enabled = False
cmdIncluir.Enabled = True
cmdFechar.Enabled = True
cmdGravar.Enabled = False
cmdPrimeiro.Enabled = True
cmdAnterior.Enabled = True
cmdProximo.Enabled = True
cmdUltimo.Enabled = True
cmdAlterar.Enabled = True
cmdExcluir.Enabled = True
End Sub
If rsCadClientes.RecordCount = 0 Then
rsCadClientes.AddNew
Vcodigo = 1
txtCodigo.Text = Format(Vcodigo, "00000")
Else
rsCadClientes.MoveLast
Vcodigo = rsCadClientes("Cod_Cli")
Vcodigo = Vcodigo + 1
rsCadClientes.AddNew
LimpaRegistro
txtCodigo.Text = Format(Vcodigo, "00000")
End If
HabilitaCampos
32
txtNome.SetFocus
cmdCancelar.Enabled = True
cmdFechar.Enabled = False
cmdIncluir.Enabled = False
cmdGravar.Enabled = True
cmdPrimeiro.Enabled = False
cmdAnterior.Enabled = False
cmdProximo.Enabled = False
cmdUltimo.Enabled = False
cmdExcluir.Enabled = False
cmdAlterar.Enabled = False
End Sub
33
End If
End Sub
DesabilitaCampos
lblContador.Caption = "Clientes Cadastrados: " & rsCadClientes.RecordCount
End Sub
34
35
36
txtCEP.Text = Empty
End If
37
txtFone2.Text = rsCadClientes("Fone2_Cli")
Else
txtFone2.Text = Empty
End If
38
txtRamal.Enabled = True
txtData.Enabled = True
cmbSexo.Enabled = True
txtRenda.Enabled = True
txtEmail.Enabled = True
txtCPF.Enabled = True
txtComplemento.Enabled = True
End Sub
Private Sub LimpaRegistro()
txtCodigo.Text = ""
txtNome.Text = ""
cmbLogradouro.Text = ""
txtCEP.Text = ""
txtEndereco.Text = ""
txtBairro.Text = ""
txtCidade.Text = ""
txtEstado.Text = ""
txtFone1.Text = ""
txtFone2.Text = ""
txtRamal.Text = ""
txtData.Text = ""
cmbSexo.Text = ""
txtRenda.Text = ""
txtEmail.Text = ""
txtCPF.Text = ""
txtComplemento.Text = ""
End Sub
39
End Sub
40
End Sub
41
cmdAnterior.Enabled = False
cmdProximo.Enabled = False
cmdUltimo.Enabled = False
End Sub
42
cmdAnterior.Enabled = True
cmdProximo.Enabled = True
cmdUltimo.Enabled = True
cmdAlterar.Enabled = True
cmdExcluir.Enabled = True
End If
DesabilitaCampos
End Sub
rsCadCompras.Delete
If rsCadCompras.RecordCount = 0 Then
LimpaRegistro
cmdExcluir.Enabled = False
cmdAlterar.Enabled = False
cmdPrimeiro.Enabled = False
cmdAnterior.Enabled = False
cmdProximo.Enabled = False
cmdUltimo.Enabled = False
Else
rsCadCompras.MoveNext
If rsCadCompras.EOF Then
rsCadCompras.MoveLast
End If
MostraRegistro
End If
End If
End Sub
43
Unload Me
End Sub
rsCadCompras("Cod_Compra") = txtCodigo.Text
rsCadCompras("Nf_Compra") = txtNF.Text
rsCadCompras("CodPro_Compra") = txtCodPro.Text
rsCadCompras("Qtd_Compra") = txtQtd.Text
rsCadCompras("CodFor_Compra") = txtCodFor.Text
44
rsCadCompras("Data_Compra") = txtData.Text
rsCadCompras.Update
DesabilitaCampos
MsgBox "Dados da Compra salvos com sucesso!!!", vbOKOnly + vbInformation,
"Aviso"
cmdCancelar.Enabled = False
cmdIncluir.Enabled = True
cmdFechar.Enabled = True
cmdGravar.Enabled = False
cmdPrimeiro.Enabled = True
cmdAnterior.Enabled = True
cmdProximo.Enabled = True
cmdUltimo.Enabled = True
cmdAlterar.Enabled = True
cmdExcluir.Enabled = True
End Sub
If rsCadCompras.RecordCount = 0 Then
rsCadCompras.AddNew
Vcodigo = 1
txtCodigo.Text = Format(Vcodigo, "00000")
Else
rsCadCompras.MoveLast
Vcodigo = rsCadCompras("Cod_Compra")
Vcodigo = Vcodigo + 1
rsCadCompras.AddNew
LimpaRegistro
txtCodigo.Text = Format(Vcodigo, "00000")
End If
45
HabilitaCampos
txtNF.SetFocus
cmdCancelar.Enabled = True
cmdFechar.Enabled = False
cmdIncluir.Enabled = False
cmdGravar.Enabled = True
cmdPrimeiro.Enabled = False
cmdAnterior.Enabled = False
cmdProximo.Enabled = False
cmdUltimo.Enabled = False
cmdExcluir.Enabled = False
cmdAlterar.Enabled = False
End Sub
46
If KeyAscii = 13 Then
SendKeys "{tab}"
End If
End Sub
DesabilitaCampos
End Sub
47
48
Else
txtData.Text = Empty
End If
End Sub
Private Sub HabilitaCampos()
txtNF.Enabled = True
txtCodPro.Enabled = True
txtQtd.Enabled = True
txtCodFor.Enabled = True
txtData.Enabled = True
End Sub
Private Sub LimpaRegistro()
txtCodigo.Text = ""
txtNF.Text = ""
txtCodPro.Text = ""
txtQtd.Text = ""
txtCodFor.Text = ""
txtData.Text = ""
End Sub
49
If (KeyAscii < Asc("0") Or KeyAscii > Asc("9") And KeyAscii <> 8) Then
KeyAscii = 0
End If
End Sub
50
51
.SelStart = .SelStart - 1
.SelLength = Len(.Text)
.SelText = vbNullString
Else
intPos = .SelStart
tStr = .Text
.SelText = (Chr$(xKeyAscii))
'
.SelText = IIf(xUpperCase, _
'
UCase$(Chr$(xKeyAscii)), _
'
LCase$(Chr$(xKeyAscii)))
End If
lngFind = SendMessage(.hWnd, CB_FINDSTRING, 0, ByVal .Text)
If lngFind = -1 Then
.Text = tStr
.SelStart = intPos
.SelLength = (Len(.Text) - intPos)
Combo_AutoCompletar = xKeyAscii
Else
intPos = .SelStart
intLength = Len(.List(lngFind)) - Len(.Text)
.SelText = .SelText & Right$(.List(lngFind), intLength)
.SelStart = intPos
.SelLength = intLength
End If
End With
End Function
52
53
cmdProximo.Enabled = False
cmdUltimo.Enabled = False
cmdIncluir.Enabled = True
cmdFechar.Enabled = True
cmdCancelar.Enabled = False
cmdGravar.Enabled = False
Else
MostraRegistro
cmdGravar.Enabled = False
cmdCancelar.Enabled = False
cmdIncluir.Enabled = True
cmdFechar.Enabled = True
cmdPrimeiro.Enabled = True
cmdAnterior.Enabled = True
cmdProximo.Enabled = True
cmdUltimo.Enabled = True
cmdAlterar.Enabled = True
cmdExcluir.Enabled = True
End If
DesabilitaCampos
End Sub
rsCadFornecedores.Delete
If rsCadFornecedores.RecordCount = 0 Then
LimpaRegistro
cmdExcluir.Enabled = False
cmdAlterar.Enabled = False
cmdPrimeiro.Enabled = False
cmdAnterior.Enabled = False
54
cmdProximo.Enabled = False
cmdUltimo.Enabled = False
Else
rsCadFornecedores.MoveNext
If rsCadFornecedores.EOF Then
rsCadFornecedores.MoveLast
End If
MostraRegistro
End If
End If
End Sub
55
rsCadFornecedores("Cod_For") = txtCodigo.Text
rsCadFornecedores("Razao_For") = txtRazao.Text
rsCadFornecedores("NomeFantasia_For") = txtNome.Text
rsCadFornecedores("Logradouro_For") = cmbLogradouro.Text
rsCadFornecedores("Endereco_For") = txtEndereco.Text
rsCadFornecedores("Bairro_For") = txtBairro.Text
rsCadFornecedores("Compl_For") = txtComplemento.Text
rsCadFornecedores("Cidade_For") = txtCidade.Text
rsCadFornecedores("Cep_For") = txtCEP.Text
rsCadFornecedores("Estado_For") = txtEstado.Text
rsCadFornecedores("Cnpj_For") = txtCNPJ.Text
rsCadFornecedores("Fone1_For") = txtFone1.Text
rsCadFornecedores("Fone2_For") = txtFone2.Text
rsCadFornecedores("Ramal_For") = txtRamal.Text
rsCadFornecedores("Fax_For") = txtFax.Text
56
rsCadFornecedores("Email_For") = txtEmail.Text
rsCadFornecedores("Repre_For") = txtRepresentante.Text
rsCadFornecedores("InscEstadual_For") = txtInsc.Text
rsCadFornecedores.Update
DesabilitaCampos
MsgBox "Informaes do Fornecedor salvos com sucesso!!!", vbOKOnly +
vbInformation, "Aviso"
cmdCancelar.Enabled = False
cmdIncluir.Enabled = True
cmdFechar.Enabled = True
cmdGravar.Enabled = False
cmdPrimeiro.Enabled = True
cmdAnterior.Enabled = True
cmdProximo.Enabled = True
cmdUltimo.Enabled = True
cmdAlterar.Enabled = True
cmdExcluir.Enabled = True
End Sub
If rsCadFornecedores.RecordCount = 0 Then
rsCadFornecedores.AddNew
Vcodigo = 1
txtCodigo.Text = Format(Vcodigo, "00000")
Else
rsCadFornecedores.MoveLast
Vcodigo = rsCadFornecedores("Cod_For")
Vcodigo = Vcodigo + 1
rsCadFornecedores.AddNew
LimpaRegistro
txtCodigo.Text = Format(Vcodigo, "00000")
57
End If
HabilitaCampos
txtRazao.SetFocus
cmdCancelar.Enabled = True
cmdFechar.Enabled = False
cmdIncluir.Enabled = False
cmdGravar.Enabled = True
cmdPrimeiro.Enabled = False
cmdAnterior.Enabled = False
cmdProximo.Enabled = False
cmdUltimo.Enabled = False
cmdExcluir.Enabled = False
cmdAlterar.Enabled = False
End Sub
58
DesabilitaCampos
End Sub
59
60
txtRazao.Text = Empty
End If
61
62
End If
63
txtNome.Enabled = True
cmbLogradouro.Enabled = True
txtCEP.Enabled = True
txtEndereco.Enabled = True
txtBairro.Enabled = True
txtCidade.Enabled = True
txtEstado.Enabled = True
txtFone1.Enabled = True
txtFone2.Enabled = True
txtRamal.Enabled = True
txtFax.Enabled = True
txtRepresentante.Enabled = True
txtInsc.Enabled = True
txtEmail.Enabled = True
txtCNPJ.Enabled = True
txtComplemento.Enabled = True
End Sub
Private Sub LimpaRegistro()
txtCodigo.Text = ""
txtRazao.Text = ""
txtNome.Text = ""
cmbLogradouro.Text = ""
txtCEP.Text = ""
txtEndereco.Text = ""
txtBairro.Text = ""
txtCidade.Text = ""
txtEstado.Text = ""
txtFone1.Text = ""
txtFone2.Text = ""
txtRamal.Text = ""
txtFax.Text = ""
txtRepresentante.Text = ""
txtInsc.Text = ""
txtEmail.Text = ""
64
txtCNPJ.Text = ""
txtComplemento.Text = ""
End Sub
65
66
67
If xKeyAscii = 8 Then
If .SelStart = 0 Then Exit Function
.SelStart = .SelStart - 1
.SelLength = Len(.Text)
.SelText = vbNullString
Else
intPos = .SelStart
tStr = .Text
.SelText = (Chr$(xKeyAscii))
'
.SelText = IIf(xUpperCase, _
'
UCase$(Chr$(xKeyAscii)), _
'
LCase$(Chr$(xKeyAscii)))
End If
lngFind = SendMessage(.hWnd, CB_FINDSTRING, 0, ByVal .Text)
If lngFind = -1 Then
.Text = tStr
.SelStart = intPos
.SelLength = (Len(.Text) - intPos)
Combo_AutoCompletar = xKeyAscii
Else
intPos = .SelStart
intLength = Len(.List(lngFind)) - Len(.Text)
.SelText = .SelText & Right$(.List(lngFind), intLength)
.SelStart = intPos
.SelLength = intLength
End If
End With
End Function
68
69
cmdExcluir.Enabled = False
cmdAlterar.Enabled = False
cmdPrimeiro.Enabled = False
cmdAnterior.Enabled = False
cmdProximo.Enabled = False
cmdUltimo.Enabled = False
cmdIncluir.Enabled = True
cmdFechar.Enabled = True
cmdCancelar.Enabled = False
cmdGravar.Enabled = False
cmdIncluirFoto.Visible = False
Else
MostraRegistro
cmdGravar.Enabled = False
cmdCancelar.Enabled = False
cmdIncluir.Enabled = True
cmdFechar.Enabled = True
cmdPrimeiro.Enabled = True
cmdAnterior.Enabled = True
cmdProximo.Enabled = True
cmdUltimo.Enabled = True
cmdAlterar.Enabled = True
cmdExcluir.Enabled = True
cmdIncluirFoto.Visible = False
End If
DesabilitaCampos
End Sub
rsCadFuncionarios.Delete
70
If rsCadFuncionarios.RecordCount = 0 Then
LimpaRegistro
cmdExcluir.Enabled = False
cmdAlterar.Enabled = False
cmdPrimeiro.Enabled = False
cmdAnterior.Enabled = False
cmdProximo.Enabled = False
cmdUltimo.Enabled = False
Else
rsCadFuncionarios.MoveNext
If rsCadFuncionarios.EOF Then
rsCadFuncionarios.MoveLast
End If
MostraRegistro
End If
End If
End Sub
71
rsCadFuncionarios("Cod_Fun") = txtCodigo.Text
rsCadFuncionarios("Nome_Fun") = txtNome.Text
rsCadFuncionarios("Logradouro_Fun") = cmbLogradouro.Text
rsCadFuncionarios("Endereco_Fun") = txtEndereco.Text
rsCadFuncionarios("Bairro_Fun") = txtBairro.Text
rsCadFuncionarios("Compl_Fun") = txtComplemento.Text
rsCadFuncionarios("Cidade_Fun") = txtCidade.Text
rsCadFuncionarios("Cep_Fun") = txtCEP.Text
rsCadFuncionarios("Estado_Fun") = txtEstado.Text
rsCadFuncionarios("RG_Fun") = txtRG.Text
rsCadFuncionarios("DataNasc_Fun") = txtDataNasc.Text
rsCadFuncionarios("Sexo_Fun") = cmbSexo.Text
rsCadFuncionarios("Cpf_Fun") = txtCPF.Text
rsCadFuncionarios("Fone1_Fun") = txtFone1.Text
rsCadFuncionarios("Fone2_Fun") = txtFone2.Text
72
rsCadFuncionarios("DataAdm_Fun") = txtDataAdm.Text
rsCadFuncionarios("Cargo_Fun") = txtCargo.Text
rsCadFuncionarios("Email_Fun") = txtEmail.Text
rsCadFuncionarios.Update
DesabilitaCampos
MsgBox "Dados do Funcionrio salvos com sucesso!!!", vbOKOnly + vbInformation,
"Aviso"
cmdCancelar.Enabled = False
cmdIncluir.Enabled = True
cmdFechar.Enabled = True
cmdGravar.Enabled = False
cmdPrimeiro.Enabled = True
cmdAnterior.Enabled = True
cmdProximo.Enabled = True
cmdUltimo.Enabled = True
cmdAlterar.Enabled = True
cmdExcluir.Enabled = True
cmdIncluirFoto.Visible = False
End Sub
If rsCadFuncionarios.RecordCount = 0 Then
rsCadFuncionarios.AddNew
Vcodigo = 1
txtCodigo.Text = Format(Vcodigo, "00000")
Else
rsCadFuncionarios.MoveLast
73
Vcodigo = rsCadFuncionarios("Cod_Fun")
Vcodigo = Vcodigo + 1
rsCadFuncionarios.AddNew
LimpaRegistro
txtCodigo.Text = Format(Vcodigo, "00000")
End If
HabilitaCampos
txtNome.SetFocus
cmdCancelar.Enabled = True
cmdFechar.Enabled = False
cmdIncluir.Enabled = False
cmdGravar.Enabled = True
cmdPrimeiro.Enabled = False
cmdAnterior.Enabled = False
cmdProximo.Enabled = False
cmdUltimo.Enabled = False
cmdExcluir.Enabled = False
cmdAlterar.Enabled = False
cmdIncluirFoto.Visible = True
imgFoto.Picture = LoadPicture("")
End Sub
Foto = ""
Vfiltro = "Arquivos BMP (*.BMP) (*.bmp) Todos Arquivos /*.*"
CommonDialog1.Filter = Vfiltro
CommonDialog1.DefaultExt = "BMP"
CommonDialog1.ShowOpen
Foto = CommonDialog1.FileName
74
imgFoto.Picture = LoadPicture(Foto)
Else
imgFoto.Picture = LoadPicture("")
End If
End Sub
75
DesabilitaCampos
End Sub
76
77
End If
78
txtCEP.Text = rsCadFuncionarios("Cep_Fun")
Else
txtCEP.Text = Empty
End If
79
80
Else
NomeFoto = Empty
imgFoto.Picture = LoadPicture("")
End If
End Sub
Private Sub HabilitaCampos()
txtNome.Enabled = True
cmbLogradouro.Enabled = True
txtCEP.Enabled = True
txtEndereco.Enabled = True
txtBairro.Enabled = True
txtCidade.Enabled = True
txtEstado.Enabled = True
txtFone1.Enabled = True
txtFone2.Enabled = True
txtRG.Enabled = True
txtDataNasc.Enabled = True
txtDataAdm.Enabled = True
cmbSexo.Enabled = True
txtEmail.Enabled = True
txtCPF.Enabled = True
txtComplemento.Enabled = True
txtCargo.Enabled = True
End Sub
Private Sub LimpaRegistro()
txtCodigo.Text = ""
txtNome.Text = ""
cmbLogradouro.Text = ""
txtCEP.Text = ""
txtEndereco.Text = ""
txtBairro.Text = ""
txtCidade.Text = ""
txtEstado.Text = ""
txtFone1.Text = ""
81
txtFone2.Text = ""
txtRG.Text = ""
txtDataNasc.Text = ""
txtDataAdm.Text = ""
cmbSexo.Text = ""
txtEmail.Text = ""
txtCPF.Text = ""
txtComplemento.Text = ""
txtCargo.Text = ""
End Sub
82
83
cmdAnterior.Enabled = False
cmdProximo.Enabled = False
cmdUltimo.Enabled = False
End Sub
84
cmdAnterior.Enabled = True
cmdProximo.Enabled = True
cmdUltimo.Enabled = True
cmdAlterar.Enabled = True
cmdExcluir.Enabled = True
End If
DesabilitaCampos
End Sub
rsCadProdutos.Delete
If rsCadProdutos.RecordCount = 0 Then
LimpaRegistro
cmdExcluir.Enabled = False
cmdAlterar.Enabled = False
cmdPrimeiro.Enabled = False
cmdAnterior.Enabled = False
cmdProximo.Enabled = False
cmdUltimo.Enabled = False
Else
rsCadProdutos.MoveNext
If rsCadProdutos.EOF Then
rsCadProdutos.MoveLast
End If
MostraRegistro
End If
End If
End Sub
85
Unload Me
End Sub
rsCadProdutos("Cod_Pro") = txtCodigo.Text
rsCadProdutos("Nome_Pro") = txtNome.Text
rsCadProdutos("Desc_Pro") = txtDescricao.Text
rsCadProdutos("Valor_Pro") = txtValor.Text
rsCadProdutos("CodFor_Pro") = txtCodFor.Text
86
rsCadProdutos.Update
DesabilitaCampos
MsgBox "Dados do Produto salvos com sucesso!!!", vbOKOnly + vbInformation,
"Aviso"
cmdCancelar.Enabled = False
cmdIncluir.Enabled = True
cmdFechar.Enabled = True
cmdGravar.Enabled = False
cmdPrimeiro.Enabled = True
cmdAnterior.Enabled = True
cmdProximo.Enabled = True
cmdUltimo.Enabled = True
cmdAlterar.Enabled = True
cmdExcluir.Enabled = True
End Sub
If rsCadProdutos.RecordCount = 0 Then
rsCadProdutos.AddNew
Vcodigo = 1
txtCodigo.Text = Format(Vcodigo, "00000")
Else
rsCadProdutos.MoveLast
Vcodigo = rsCadProdutos("Cod_Pro")
Vcodigo = Vcodigo + 1
rsCadProdutos.AddNew
LimpaRegistro
txtCodigo.Text = Format(Vcodigo, "00000")
End If
HabilitaCampos
87
txtNome.SetFocus
cmdCancelar.Enabled = True
cmdFechar.Enabled = False
cmdIncluir.Enabled = False
cmdGravar.Enabled = True
cmdPrimeiro.Enabled = False
cmdAnterior.Enabled = False
cmdProximo.Enabled = False
cmdUltimo.Enabled = False
cmdExcluir.Enabled = False
cmdAlterar.Enabled = False
End Sub
88
SendKeys "{tab}"
End If
End Sub
DesabilitaCampos
End Sub
89
End Sub
Private Sub HabilitaCampos()
txtNome.Enabled = True
txtDescricao.Enabled = True
90
txtValor.Enabled = True
txtCodFor.Enabled = True
End Sub
Private Sub LimpaRegistro()
txtCodigo.Text = ""
txtNome.Text = ""
txtDescricao.Text = ""
txtValor.Text = ""
txtCodFor.Text = ""
End Sub
91
92
.TextArray(2) = "Endereo"
.TextArray(3) = "Cidade"
.TextArray(4) = "Estado"
End With
If cboTipo.Text = "Todos" Then
txtParametro.Enabled = False
Else
txtParametro.Enabled = True
End If
End Sub
End If
End Sub
93
94
Exit Sub
End If
95
End If
96
txtParametro.Text = ""
With fgConsultaCli
.ColWidth(0) = 800
.ColWidth(1) = 3500
.ColWidth(2) = 3500
.ColWidth(3) = 2000
.ColWidth(4) = 800
.Rows = 1
.TextArray(0) = "Cdigo"
.TextArray(1) = "Nome"
.TextArray(2) = "Endereo"
.TextArray(3) = "Cidade"
.TextArray(4) = "Estado"
End With
cboTipo.SetFocus
End If
End Sub
Private Sub EncheGrid()
97
End Sub
98
99
End With
If cboTipo.Text = "Todos" Then
txtParametro.Enabled = False
Else
txtParametro.Enabled = True
End If
End Sub
End If
End Sub
100
.ColWidth(0) = 800
.ColWidth(1) = 1500
.ColWidth(2) = 1500
.ColWidth(3) = 1000
.ColWidth(4) = 1800
.Rows = 1
.TextArray(0) = "Cdigo"
.TextArray(1) = "N da Nota Fiscal"
.TextArray(2) = "Cdigo do Produto"
.TextArray(3) = "Quantidade"
.TextArray(4) = "Cdigo do Fornecedor"
End With
End Sub
101
VConNota = CInt(txtParametro.Text)
102
fgConsultaCom.Clear
Vfrase = "Select * from Compras Where Nf_Compra=" & VConNota
Set rsConCompras = mdiPrincipal.cnBiblioteca.Execute(Vfrase)
EncheGrid
VConForn = CInt(txtParametro.Text)
fgConsultaCom.Clear
Vfrase = "Select * from Compras Where CodFor_Compra=" & VConForn
Set rsConCompras = mdiPrincipal.cnBiblioteca.Execute(Vfrase)
EncheGrid
103
rsConCompras.Close
End If
104
End With
cboTipo.SetFocus
End If
End Sub
Private Sub EncheGrid()
End Sub
105
106
.TextArray(4) = "Cidade"
.TextArray(5) = "Estado"
End With
If cboTipo.Text = "Todos" Then
txtParametro.Enabled = False
Else
txtParametro.Enabled = True
End If
End Sub
End If
End Sub
107
Toolbar1.Left = 12960
With fgConsultaFor
.ColWidth(0) = 800
.ColWidth(1) = 3500
.ColWidth(2) = 3500
.ColWidth(3) = 3000
.ColWidth(4) = 2000
.ColWidth(5) = 800
.Rows = 1
.TextArray(0) = "Cdigo"
.TextArray(1) = "Razo Social"
.TextArray(2) = "Nome Fantasia"
.TextArray(3) = "Endereo"
.TextArray(4) = "Cidade"
.TextArray(5) = "Estado"
End With
End Sub
108
txtParametro.SetFocus
Exit Sub
End If
109
Exit Sub
End If
110
fgConsultaFor.Clear
cboTipo.Text = "Escolha o tipo de Consulta"
txtParametro.Text = ""
With fgConsultaFor
.ColWidth(0) = 800
.ColWidth(1) = 3500
.ColWidth(2) = 3500
.ColWidth(3) = 3000
.ColWidth(4) = 2000
.ColWidth(5) = 800
.Rows = 1
.TextArray(0) = "Cdigo"
.TextArray(1) = "Razo Social"
.TextArray(2) = "Nome Fantasia"
.TextArray(3) = "Endereo"
.TextArray(4) = "Cidade"
.TextArray(5) = "Estado"
End With
cboTipo.SetFocus
End If
End Sub
Private Sub EncheGrid()
111
End Sub
112
113
End If
End Sub
114
.ColWidth(1) = 3500
.ColWidth(2) = 3500
.ColWidth(3) = 2000
.ColWidth(4) = 800
.Rows = 1
.TextArray(0) = "Cdigo"
.TextArray(1) = "Nome"
.TextArray(2) = "Endereo"
.TextArray(3) = "Cidade"
.TextArray(4) = "Estado"
End With
End Sub
115
116
117
.ColWidth(2) = 3500
.ColWidth(3) = 2000
.ColWidth(4) = 800
.Rows = 1
.TextArray(0) = "Cdigo"
.TextArray(1) = "Nome"
.TextArray(2) = "Endereo"
.TextArray(3) = "Cidade"
.TextArray(4) = "Estado"
End With
cboTipo.SetFocus
End If
End Sub
Private Sub EncheGrid()
118
rsConFuncionarios.MoveNext
Loop
End Sub
119
120
txtParametro.Enabled = False
Else
txtParametro.Enabled = True
End If
End Sub
End If
End Sub
With fgConsultaPro
.ColWidth(0) = 800
.ColWidth(1) = 3500
121
.ColWidth(2) = 3500
.ColWidth(3) = 1500
.Rows = 1
.TextArray(0) = "Cdigo"
.TextArray(1) = "Nome"
.TextArray(2) = "Descrico"
.TextArray(3) = "Cod Fornecedor"
End With
End Sub
122
txtParametro.SetFocus
Exit Sub
End If
123
124
125
End With
cboTipo.SetFocus
End If
End Sub
Private Sub EncheGrid()
End Sub
126
127
Const VERDADEIRO = -1
Const FALSO = 0
128
UltimaEntrada = "CE"
End Sub
FlagDecimal = VERDADEIRO
UltimaEntrada = "NUMS"
End Sub
129
'Botao de Limpar
'Sinal de Porcentagem
'Ponto decimal
130
131
NumOps = NumOps + 1
End If
If NumOps = 1 Then
Op1 = Val(Visor.Caption)
ElseIf NumOps = 2 Then
Op2 = Val(Visor.Caption)
Select Case FlagOperacao
Case "+"
Op1 = Op1 + Op2
Case "-"
Op1 = Op1 - Op2
Case "X"
Op1 = Op1 * Op2
Case "/"
If Op2 = 0 Then
MsgBox "Erro, Diviso por zero impossvel", 48, "Spasso Calc"
Else
Op1 = Op1 / Op2
End If
Case "="
Op1 = Op2
End Select
Visor.Caption = Format$(Op1)
NumOps = 1
End If
UltimaEntrada = "OPS"
FlagOperacao = Operator(Index).Caption
End Sub
132
'Botao de Limpar
'Sinal de Porcentagem
'Ponto decimal
133
End If
End Sub
'
centro
'End With
End Sub
134
For i = 1 To Screen.FontCount - 1
135
Combo3.AddItem Screen.Fonts(i)
Next i
End Sub
RTF.Text = ""
136
137
End If
End Sub
138
RTF.SelItalic = False
Else
RTF.SelItalic = True
End If
139
DIALOGO.ShowSave
RTF.SaveFile (DIALOGO.FileName), 0
Unload Me
Exit Sub
End If
End If
Unload Me
End If
End Sub
140
lblVersao.Caption = "Verso " & App.Major & "." & App.Minor & "." & App.Revision
Screen.MousePointer = vbHourglass
End Sub
141
Option Explicit
142
143
ind2 = 0
iARQ = FreeFile
144
145
146
Print #iARQ, "Telefone" & ind2 & "=" & txtFone(ind2 - 35)
Next
Close iARQ
Inibe_Frames
Habilita_Tudo2
lblCopyright.Caption = ".:: Agenda Telefnica"
Pagina = Pag_Atual
Mostra_Letra (Mid(fra2.Caption, 1, 1))
Case 9
Open sFileINI For Output As iARQ
Print #iARQ, "{ Pgina 9 }"
For ind2 = 40 To 44 Step 1
Print #iARQ, "Nome" & ind2 & "=" & txtNome(ind2 - 40)
Print #iARQ, "Telefone" & ind2 & "=" & txtFone(ind2 - 40)
Next
Close iARQ
Inibe_Frames
Habilita_Tudo2
lblCopyright.Caption = ".:: Agenda Telefnica"
Pagina = Pag_Atual
Mostra_Letra (Mid(fra2.Caption, 1, 1))
Case 10
Open sFileINI For Output As iARQ
Print #iARQ, "{ Pgina 10 }"
For ind2 = 45 To 49 Step 1
Print #iARQ, "Nome" & ind2 & "=" & txtNome(ind2 - 45)
Print #iARQ, "Telefone" & ind2 & "=" & txtFone(ind2 - 45)
Next
Close iARQ
Inibe_Frames
Habilita_Tudo2
lblCopyright.Caption = ".:: Agenda Telefnica"
Pagina = Pag_Atual
Mostra_Letra (Mid(fra2.Caption, 1, 1))
147
End Select
End Function
148
149
INI_Parametre(1) = Separate_Value(sLine)
Case "Telefone" & (SA + 20)
INI_Parametre(2) = Separate_Value(sLine)
End Select
Case 6
Select Case Separate_Parametre(sLine)
Case "Nome" & (SA + 25)
INI_Parametre(1) = Separate_Value(sLine)
Case "Telefone" & (SA + 25)
INI_Parametre(2) = Separate_Value(sLine)
End Select
Case 7
Select Case Separate_Parametre(sLine)
Case "Nome" & (SA + 30)
INI_Parametre(1) = Separate_Value(sLine)
Case "Telefone" & (SA + 30)
INI_Parametre(2) = Separate_Value(sLine)
End Select
Case 8
Select Case Separate_Parametre(sLine)
Case "Nome" & (SA + 35)
INI_Parametre(1) = Separate_Value(sLine)
Case "Telefone" & (SA + 35)
INI_Parametre(2) = Separate_Value(sLine)
End Select
Case 9
Select Case Separate_Parametre(sLine)
Case "Nome" & (SA + 40)
INI_Parametre(1) = Separate_Value(sLine)
Case "Telefone" & (SA + 40)
INI_Parametre(2) = Separate_Value(sLine)
End Select
Case 10
Select Case Separate_Parametre(sLine)
150
Function Inibe()
Ultimo.Visible = False
Anterior.Visible = False
Proximo.Visible = False
Primeiro.Visible = False
For SA = 0 To 4 Step 1
lblNome(SA).Visible = False
lblTelefone(SA).Visible = False
txtNome(SA).Visible = False
txtFone(SA).Visible = False
Next
End Function
Function Mostra()
Ultimo.Visible = True
Anterior.Visible = True
Proximo.Visible = True
Primeiro.Visible = True
For SA = 0 To 4 Step 1
151
lblNome(SA).Visible = True
lblTelefone(SA).Visible = True
txtNome(SA).Visible = True
txtFone(SA).Visible = True
Next
End Function
Private Sub Anterior_MouseDown(Button As Integer, Shift As Integer, x As Single, y
As Single)
Pagina = Pagina - 1
Mostra_Letra ((Mid(fra2.Caption, 1, 1)))
End Sub
Function Reseta_Labels1()
lblSair.FontUnderline = False
152
lblPesquisar.FontUnderline = False
lblIncluir.FontUnderline = False
lblExcluir.FontUnderline = False
End Function
Function Inibe_Controles()
Anterior.FontUnderline = False
Proximo.FontUnderline = False
Ultimo.FontUnderline = False
Primeiro.FontUnderline = False
End Function
153
154
txtNome(3).Text = ""
txtFone(3).Text = ""
Desabilita_Tudo2
Pag_Atual = Pagina
lblCopyright.Caption = Space(15) & ".:: Excluindo"
Salva (App.Path & "\Dat\" & (Mid(fra2.Caption, 1, 1)) & "\" & Pagina & ".dat")
End If
If fraCampos5.Visible = True Then
txtNome(4).Text = ""
txtFone(4).Text = ""
Desabilita_Tudo2
Pag_Atual = Pagina
lblCopyright.Caption = Space(15) & ".:: Excluindo"
Salva (App.Path & "\Dat\" & (Mid(fra2.Caption, 1, 1)) & "\" & Pagina & ".dat")
End If
End Sub
155
156
Desabilita_Tudo
fraCampos3.Visible = True
NomeO = txtNome(2).Text
FoneO = txtFone(2).Text
Case 3
Desabilita_Tudo
fraCampos4.Visible = True
NomeO = txtNome(3).Text
FoneO = txtFone(3).Text
Case 4
Desabilita_Tudo
fraCampos5.Visible = True
NomeO = txtNome(4).Text
FoneO = txtFone(4).Text
End Select
End Sub
Function Desabilita_Tudo()
fra1.Enabled = False
A.Enabled = False
B.Enabled = False
C.Enabled = False
D.Enabled = False
E.Enabled = False
F.Enabled = False
G.Enabled = False
H.Enabled = False
I.Enabled = False
J.Enabled = False
L.Enabled = False
M.Enabled = False
N.Enabled = False
O.Enabled = False
P.Enabled = False
157
Q.Enabled = False
R.Enabled = False
S.Enabled = False
T.Enabled = False
U.Enabled = False
V.Enabled = False
XA.Enabled = False
Z.Enabled = False
W.Enabled = False
YA.Enabled = False
Anterior.Enabled = False
Proximo.Enabled = False
Ultimo.Enabled = False
Primeiro.Enabled = False
For II = 0 To 4 Step 1
lblNome(II).Enabled = False
lblTelefone(II).Enabled = False
lblMostraNome(II).Enabled = False
lblMostraTelefone(II).Enabled = False
Next
lblPag.Enabled = False
lblPagina.Enabled = False
lblPesquisar.Enabled = False
lblTot.Enabled = False
lblIncluir.Enabled = True
lblExcluir.Enabled = True
End Function
Function Habilita_Tudo()
fra1.Enabled = True
A.Enabled = True
B.Enabled = True
C.Enabled = True
D.Enabled = True
158
E.Enabled = True
F.Enabled = True
G.Enabled = True
H.Enabled = True
I.Enabled = True
J.Enabled = True
L.Enabled = True
M.Enabled = True
N.Enabled = True
O.Enabled = True
P.Enabled = True
Q.Enabled = True
R.Enabled = True
S.Enabled = True
T.Enabled = True
U.Enabled = True
V.Enabled = True
XA.Enabled = True
Z.Enabled = True
W.Enabled = True
YA.Enabled = True
Select Case Pagina
Case 1
Primeiro.Enabled = False
Anterior.Enabled = False
Proximo.Enabled = True
Ultimo.Enabled = True
Case 10
Primeiro.Enabled = True
Anterior.Enabled = True
Proximo.Enabled = False
Ultimo.Enabled = False
Case Else
Primeiro.Enabled = True
159
Anterior.Enabled = True
Proximo.Enabled = True
Ultimo.Enabled = True
End Select
For II = 0 To 4 Step 1
lblNome(II).Enabled = True
lblTelefone(II).Enabled = True
lblMostraNome(II).Enabled = True
lblMostraTelefone(II).Enabled = True
Next
lblPag.Enabled = True
lblPagina.Enabled = True
lblPesquisar.Enabled = True
lblTot.Enabled = True
lblIncluir.Enabled = False
lblExcluir.Enabled = False
End Function
Function Desabilita_Tudo2()
fra1.Enabled = False
fra2.Enabled = False
A.Enabled = False
B.Enabled = False
C.Enabled = False
D.Enabled = False
E.Enabled = False
F.Enabled = False
G.Enabled = False
H.Enabled = False
I.Enabled = False
J.Enabled = False
L.Enabled = False
M.Enabled = False
N.Enabled = False
160
O.Enabled = False
P.Enabled = False
Q.Enabled = False
R.Enabled = False
S.Enabled = False
T.Enabled = False
U.Enabled = False
V.Enabled = False
XA.Enabled = False
Z.Enabled = False
W.Enabled = False
YA.Enabled = False
Anterior.Enabled = False
Proximo.Enabled = False
Ultimo.Enabled = False
Primeiro.Enabled = False
For II = 0 To 4 Step 1
lblNome(II).Enabled = False
lblTelefone(II).Enabled = False
lblMostraNome(II).Enabled = False
lblMostraTelefone(II).Enabled = False
Next
lblPag.Enabled = False
lblPagina.Enabled = False
lblPesquisar.Enabled = False
lblTot.Enabled = False
lblIncluir.Enabled = False
lblExcluir.Enabled = False
lblSair.Enabled = False
End Function
Function Habilita_Tudo2()
fra1.Enabled = True
fra2.Enabled = True
161
A.Enabled = True
B.Enabled = True
C.Enabled = True
D.Enabled = True
E.Enabled = True
F.Enabled = True
G.Enabled = True
H.Enabled = True
I.Enabled = True
J.Enabled = True
L.Enabled = True
M.Enabled = True
N.Enabled = True
O.Enabled = True
P.Enabled = True
Q.Enabled = True
R.Enabled = True
S.Enabled = True
T.Enabled = True
U.Enabled = True
V.Enabled = True
XA.Enabled = True
Z.Enabled = True
W.Enabled = True
YA.Enabled = True
Select Case Pagina
Case 1
Primeiro.Enabled = False
Anterior.Enabled = False
Proximo.Enabled = True
Ultimo.Enabled = True
Case 10
Primeiro.Enabled = True
Anterior.Enabled = True
162
Proximo.Enabled = False
Ultimo.Enabled = False
Case Else
Primeiro.Enabled = True
Anterior.Enabled = True
Proximo.Enabled = True
Ultimo.Enabled = True
End Select
For II = 0 To 4 Step 1
lblNome(II).Enabled = True
lblTelefone(II).Enabled = True
lblMostraNome(II).Enabled = True
lblMostraTelefone(II).Enabled = True
Next
lblPag.Enabled = True
lblPagina.Enabled = True
lblPesquisar.Enabled = True
lblTot.Enabled = True
lblSair.Enabled = True
End Function
163
164
165
End Sub
166
P.FontUnderline = False
Q.FontUnderline = False
R.FontUnderline = False
S.FontUnderline = False
T.FontUnderline = False
U.FontUnderline = False
V.FontUnderline = False
XA.FontUnderline = False
Z.FontUnderline = False
W.FontUnderline = False
YA.FontUnderline = False
End Sub
167
End Sub
Private Sub F_MouseMove(Button As Integer, Shift As Integer, x As Single, y As
Single)
F.FontUnderline = True
End Sub
Private Sub G_MouseMove(Button As Integer, Shift As Integer, x As Single, y As
Single)
G.FontUnderline = True
End Sub
Private Sub H_MouseMove(Button As Integer, Shift As Integer, x As Single, y As
Single)
H.FontUnderline = True
End Sub
Private Sub I_MouseMove(Button As Integer, Shift As Integer, x As Single, y As
Single)
I.FontUnderline = True
End Sub
Private Sub J_MouseMove(Button As Integer, Shift As Integer, x As Single, y As
Single)
J.FontUnderline = True
End Sub
Private Sub L_MouseMove(Button As Integer, Shift As Integer, x As Single, y As
Single)
L.FontUnderline = True
End Sub
Private Sub M_MouseMove(Button As Integer, Shift As Integer, x As Single, y As
Single)
M.FontUnderline = True
End Sub
Private Sub N_MouseMove(Button As Integer, Shift As Integer, x As Single, y As
Single)
N.FontUnderline = True
End Sub
168
169
XA.FontUnderline = True
End Sub
Private Sub Z_MouseMove(Button As Integer, Shift As Integer, x As Single, y As
Single)
Z.FontUnderline = True
End Sub
Private Sub W_MouseMove(Button As Integer, Shift As Integer, x As Single, y As
Single)
W.FontUnderline = True
End Sub
Private Sub YA_MouseMove(Button As Integer, Shift As Integer, x As Single, y As
Single)
YA.FontUnderline = True
End Sub
170
End Sub
Private Sub D_MouseDown(Button As Integer, Shift As Integer, x As Single, y As
Single)
Pagina = 1
Mostra_Letra ("D")
fra2.Caption = "D:"
End Sub
Private Sub E_MouseDown(Button As Integer, Shift As Integer, x As Single, y As
Single)
Pagina = 1
Mostra_Letra ("E")
fra2.Caption = "E:"
End Sub
Private Sub F_MouseDown(Button As Integer, Shift As Integer, x As Single, y As
Single)
Pagina = 1
Mostra_Letra ("F")
fra2.Caption = "F:"
End Sub
Private Sub G_MouseDown(Button As Integer, Shift As Integer, x As Single, y As
Single)
Pagina = 1
Mostra_Letra ("G")
fra2.Caption = "G:"
End Sub
Private Sub H_MouseDown(Button As Integer, Shift As Integer, x As Single, y As
Single)
Pagina = 1
Mostra_Letra ("H")
fra2.Caption = "H:"
End Sub
Private Sub I_MouseDown(Button As Integer, Shift As Integer, x As Single, y As
Single)
Pagina = 1
171
Mostra_Letra ("I")
fra2.Caption = "I:"
End Sub
Private Sub J_MouseDown(Button As Integer, Shift As Integer, x As Single, y As
Single)
Pagina = 1
Mostra_Letra ("J")
fra2.Caption = "J:"
End Sub
Private Sub L_MouseDown(Button As Integer, Shift As Integer, x As Single, y As
Single)
Pagina = 1
Mostra_Letra ("L")
fra2.Caption = "L:"
End Sub
Private Sub M_MouseDown(Button As Integer, Shift As Integer, x As Single, y As
Single)
Pagina = 1
Mostra_Letra ("M")
fra2.Caption = "M:"
End Sub
Private Sub N_MouseDown(Button As Integer, Shift As Integer, x As Single, y As
Single)
Pagina = 1
Mostra_Letra ("N")
fra2.Caption = "N:"
End Sub
Private Sub O_MouseDown(Button As Integer, Shift As Integer, x As Single, y As
Single)
Pagina = 1
Mostra_Letra ("O")
fra2.Caption = "O:"
End Sub
172
173
fra2.Caption = "U:"
End Sub
Private Sub V_MouseDown(Button As Integer, Shift As Integer, x As Single, y As
Single)
Pagina = 1
Mostra_Letra ("V")
fra2.Caption = "V:"
End Sub
Private Sub XA_MouseDown(Button As Integer, Shift As Integer, x As Single, y As
Single)
Pagina = 1
Mostra_Letra ("X")
fra2.Caption = "X:"
End Sub
Private Sub Z_MouseDown(Button As Integer, Shift As Integer, x As Single, y As
Single)
Pagina = 1
Mostra_Letra ("Z")
fra2.Caption = "Z:"
End Sub
Private Sub YA_MouseDown(Button As Integer, Shift As Integer, x As Single, y As
Single)
Pagina = 1
Mostra_Letra ("Y")
fra2.Caption = "Y:"
End Sub
Private Sub W_MouseDown(Button As Integer, Shift As Integer, x As Single, y As
Single)
Pagina = 1
Mostra_Letra ("W")
fra2.Caption = "W:"
End Sub
174
175
If Status = 0 Then
MsgBox "O nome " & Nome_Atual & " no foi encontrado!", vbInformation
Mostra_Letra (Letra_Atual)
fra2.Caption = Letra_Atual & ":"
Pagina = Pag_Atual
Mostra_Letra (Mid(fra2.Caption, 1, 1))
Habilita_Tudo2
lblCopyright.Caption = ".:: Agenda Telefnica"
End If
End If
Mostra_Letra (Letra_Atual)
fra2.Caption = Letra_Atual & ":"
Pagina = Pag_Atual
Mostra_Letra (Mid(fra2.Caption, 1, 1))
Habilita_Tudo2
lblCopyright.Caption = ".:: Agenda Telefnica"
End Sub
176
177
.SelStart = .SelStart - 1
.SelLength = Len(.Text)
.SelText = vbNullString
Else
intPos = .SelStart
tStr = .Text
.SelText = (Chr$(xKeyAscii))
'
.SelText = IIf(xUpperCase, _
'
UCase$(Chr$(xKeyAscii)), _
'
LCase$(Chr$(xKeyAscii)))
End If
lngFind = SendMessage(.hWnd, CB_FINDSTRING, 0, ByVal .Text)
If lngFind = -1 Then
.Text = tStr
.SelStart = intPos
.SelLength = (Len(.Text) - intPos)
Combo_AutoCompletar = xKeyAscii
Else
intPos = .SelStart
intLength = Len(.List(lngFind)) - Len(.Text)
.SelText = .SelText & Right$(.List(lngFind), intLength)
.SelStart = intPos
.SelLength = intLength
End If
End With
End Function
178
txtCodCli.Text = rsConClientes("Cod_Cli")
End If
End Sub
179
If fgItem.Rows = 1 Then
180
Bruto = CCur(txtTotal.Text)
181
Desabilita
cmdFinalizar.Enabled = True
cmdCalcular.Enabled = False
cmdAltera.Enabled = True
cmdFechar.Enabled = False
End Sub
Private Sub Desabilita()
txtCodPro.Enabled = False
cboDescricao.Enabled = False
txtQtd.Enabled = False
Command1.Enabled = False
Command2.Enabled = False
cboFormPagamento.Enabled = False
txtDesc.Enabled = False
txtJuros.Enabled = False
txtCodCli.Enabled = False
cboCliente.Enabled = False
End Sub
182
.ColWidth(1) = 2000
.ColWidth(2) = 3500
.ColWidth(3) = 1000
.ColWidth(4) = 2000
.ColWidth(5) = 1500
.Rows = 1
.TextMatrix(0, 0) = "Item"
.TextMatrix(0, 1) = "Cdigo do Produto"
.TextMatrix(0, 2) = "Descrio"
.TextMatrix(0, 3) = "Quantidade"
.TextMatrix(0, 4) = "Preo Unitrio"
.TextMatrix(0, 5) = "Subtotal"
End With
cboFormPagamento.Text = "Escolha a forma de Pagar"
txtDesc.Text = 0
txtCodCli.Text = ""
cboCliente.Text = ""
lblTotal.Caption = "R$ 0,00"
txtJuros.Text = 0
lstreferente.Clear
lbltotal2.Caption = "0,00"
HabilitaCampos
txtCodPro.SetFocus
cmdCalcular.Enabled = False
cmdFinalizar.Enabled = False
cmdAltera.Enabled = False
cmdFechar.Enabled = True
cmdCancelar.Enabled = False
End Sub
183
fgItem.RowSel = 1
Vcontador = False
rsVenda("Cod_Vend") = lblVenda.Caption
rsVenda("CodCli_Vend") = txtCodCli.Text
rsVenda("NomeCli_Vend") = cboCliente.Text
rsVenda("Funcionario_Vend") = lblVendedor.Caption
rsVenda("Data_Vend") = lblData.Caption
rsVenda.Update
rsVendaDet.Update
184
End If
Loop
cmdFinalizar.Enabled = False
cmdCancelar.Enabled = False
cmdAltera.Enabled = False
frmRecibo.Show
frmRecibo.Left = 4000
frmRecibo.Top = 1000
End Sub
Private Sub cmdNova_Click()
lblVenda.Caption = ContadorVenda
txtItem.Text = 1
txtCodPro.Text = ""
cboDescricao.Text = ""
txtQtd.Text = ""
txtPrecoUni.Text = ""
txtTotal.Text = "R$ 0,00"
With fgItem
.ColWidth(0) = 800
.ColWidth(1) = 2000
.ColWidth(2) = 3500
.ColWidth(3) = 1000
.ColWidth(4) = 2000
.ColWidth(5) = 1500
.Rows = 1
.TextMatrix(0, 0) = "Item"
.TextMatrix(0, 1) = "Cdigo do Produto"
.TextMatrix(0, 2) = "Descrio"
.TextMatrix(0, 3) = "Quantidade"
.TextMatrix(0, 4) = "Preo Unitrio"
.TextMatrix(0, 5) = "Subtotal"
End With
cboFormPagamento.Text = "Escolha a forma de Pagar"
185
txtDesc.Text = 0
txtCodCli.Text = ""
cboCliente.Text = ""
lblTotal.Caption = "R$ 0,00"
txtJuros.Text = 0
lstreferente.Clear
lbltotal2.Caption = "0,00"
HabilitaCampos
txtCodPro.SetFocus
cmdCalcular.Enabled = False
cmdFinalizar.Enabled = False
cmdAltera.Enabled = False
cmdFechar.Enabled = True
cmdCancelar.Enabled = False
cmdNova.Enabled = False
End Sub
186
187
If rsVenda.RecordCount = 0 Then
rsVenda.AddNew
188
Vcodigo = 1
lblVenda.Caption = Format(Vcodigo, "00000")
Else
rsVenda.MoveLast
Vcodigo = rsVenda("Cod_Vend")
Vcodigo = Vcodigo + 1
rsVenda.AddNew
lblVenda.Caption = Format(Vcodigo, "00000")
End If
With fgItem
.ColWidth(0) = 800
.ColWidth(1) = 2000
.ColWidth(2) = 3500
.ColWidth(3) = 1000
.ColWidth(4) = 2000
.ColWidth(5) = 1500
.Rows = 1
.TextMatrix(0, 0) = "Item"
.TextMatrix(0, 1) = "Cdigo do Produto"
.TextMatrix(0, 2) = "Descrio"
.TextMatrix(0, 3) = "Quantidade"
.TextMatrix(0, 4) = "Preo Unitrio"
.TextMatrix(0, 5) = "Subtotal"
End With
189
190
cboCliente.Text = rsConClientes("Nome_Cli")
End If
End Sub
191
cboDescricao.Text = rsConProdutos("Nome_Pro")
txtPrecoUni.Text = Format(rsConProdutos("Valor_Pro"), "currency")
cmdCalcular.Enabled = True
cmdCancelar.Enabled = True
cmdFechar.Enabled = False
End If
End Sub
192
cmdCancelar.Enabled = False
cmdFechar.Enabled = False
End If
Exit Sub
End If
txtCodPro.Text = rsConProdutos("Cod_Pro")
txtPrecoUni.Text = Format(rsConProdutos("Valor_Pro"), "Currency")
cmdCalcular.Enabled = True
cmdCancelar.Enabled = True
cmdFechar.Enabled = False
End If
End Sub
If txtDesc.Text = 0 Then
txtJuros.Enabled = True
193
End If
End Sub
If txtJuros.Text = 0 Then
txtDesc.Enabled = True
End If
End Sub
194
Dim S As Object
195
Exit Sub
End If
For M = 1 To Len(Valor.Text)
If Mid$(Valor.Text, M, 1) = "," Then
str = str + "."
Else
str = str & Mid$(Valor.Text, M, 1)
End If
Next M
'Set S = CreateObject("Word.Document")
S.Application.Visible = True
With S.Application.Selection
.EndKey Unit:=6
.Tables.Add range:=.range, NumRows:=1, NumColumns:=2,
DefaultTableBehavior:=1, AutoFitBehavior:=0
.Tables(1).Style = "Tabela com grade"
.Tables(1).ApplyStyleHeadingRows = True
.Tables(1).ApplyStyleLastRow = True
.Tables(1).ApplyStyleFirstColumn = True
.Tables(1).ApplyStyleLastColumn = True
.Style = S.Styles("Ttulo 1")
.Borders(-1).LineStyle = 0
.Borders(-2).LineStyle = 0
.Borders(-3).LineStyle = 0
.Borders(-4).LineStyle = 0
.Borders(-4).LineStyle = 0
.Borders(-8).LineStyle = 0
.TypeText Text:="Recibo N: " & IEMOS.Text
.MoveRight Unit:=12
.Borders(-1).LineStyle = 0
.Borders(-2).LineStyle = 0
.Borders(-3).LineStyle = 0
.Borders(-4).LineStyle = 0
196
.Borders(-4).LineStyle = 0
.Borders(-8).LineStyle = 0
.Style = S.Styles("Normal")
.TypeText Text:="Valor: " & Format$(Val(str), "currency")
.MoveRight Unit:=12
.Style = S.Styles("Normal")
'.TypeText Text:=IEMOS.Text
.MoveRight Unit:=1, Count:=2, Extend:=1
.Cells.merge
.MoveRight Unit:=12
.TypeText Text:="Cliente: " & Endereco.Text
.MoveRight Unit:=12
.TypeText Text:="A importncia de " & Extenso(str, "Reais", "Real")
.MoveRight Unit:=12
.TypeText Text:="Referente: " & referente.Text
.MoveRight Unit:=12
.MoveRight Unit:=12
.TypeText Text:=Lugar.Text & ", " & Day(Data.Text) & " de " &
MonthName(Month(Data.Text)) & " de " & Year(Data.Text)
.MoveRight Unit:=12
.MoveRight Unit:=12
.Cells.Split NumRows:=1, NumColumns:=2, MergeBeforeSplit:=False
.MoveLeft Unit:=1, Count:=1
.TypeText Text:="Emitente: " & Emitente.Text
.MoveRight Unit:=12
.TypeText Text:="CNPJ: " & Cpf.Text
.MoveRight Unit:=12
.MoveRight Unit:=1, Count:=2, Extend:=1
.Cells.merge
.TypeText Text:="Assinatura _______________________________"
.MoveDown Unit:=5, Count:=1
.TypeParagraph
End With
Unload Me
197
frmTelaVenda.cmdNova.Enabled = True
End Sub
Valor.Text = 0
Data.Text = Date
Set S = CreateObject("Word.Document")
IEMOS.Text = frmTelaVenda.lblVenda.Caption
Valor.Text = frmTelaVenda.lbltotal2.Caption
Valor2.Text = frmTelaVenda.lblTotal.Caption
Endereco.Text = frmTelaVenda.cboCliente.Text
End Sub
Private Sub valor_Change()
Dim vlr
For M = 1 To Len(Valor.Text)
If Mid$(Valor.Text, M, 1) = "," Then
vlr = vlr + "."
Else
vlr = vlr & Mid$(Valor.Text, M, 1)
End If
Next M
If Not IsNumeric(vlr) Then Exit Sub
Ext.Text = Extenso(Val(vlr), "Reais", "Real")
End Sub
198
199
txtNova.SetFocus
Exit Sub
End If
If Vatual.RecordCount = 0 Then
MsgBox "Senha Atual incorreta!", vbOKOnly + vbCritical, "Ateno"
txtAtual.Text = Empty
txtAtual.SetFocus
Vatual.Close
Exit Sub
End If
200
efetuar o logoff do sistema a tela a ser carregada novamente ser a padro, assim,
no descaracterizando o programa.
Option Explicit
End Sub
201
202
203
204
205
If rsUsuarios.RecordCount = 0 Then
rsUsuarios.AddNew
Vcodigo = 1
txtCodUsuario.Text = Format(Vcodigo, "0000")
Else
rsUsuarios.MoveLast
Vcodigo = rsUsuarios("CodUser_Sist")
Vcodigo = Vcodigo + 1
rsUsuarios.AddNew
LimpaRegistro
txtCodUsuario.Text = Format(Vcodigo, "0000")
End If
HabilitaCampos
txtUsuario.SetFocus
206
cmdCancelar.Enabled = True
cmdFechar.Enabled = False
cmdIncluir.Enabled = False
cmdGravar.Enabled = True
cmdPrimeiro.Enabled = False
cmdAnterior.Enabled = False
cmdProximo.Enabled = False
cmdUltimo.Enabled = False
cmdExcluir.Enabled = False
cmdAlterar.Enabled = False
End Sub
Private Sub cmdAlterar_Click()
HabilitaCampos
txtUsuario.SetFocus
cmdIncluir.Enabled = False
cmdFechar.Enabled = False
cmdCancelar.Enabled = True
cmdAlterar.Enabled = False
cmdGravar.Enabled = True
cmdExcluir.Enabled = False
cmdPrimeiro.Enabled = False
cmdAnterior.Enabled = False
cmdProximo.Enabled = False
cmdUltimo.Enabled = False
End Sub
207
208
rsUsuarios.Delete
If rsUsuarios.RecordCount = 0 Then
LimpaRegistro
cmdExcluir.Enabled = False
cmdAlterar.Enabled = False
cmdPrimeiro.Enabled = False
cmdAnterior.Enabled = False
cmdProximo.Enabled = False
cmdUltimo.Enabled = False
Else
rsUsuarios.MoveNext
If rsUsuarios.EOF Then
rsUsuarios.MoveLast
End If
MostraRegistro
End If
End If
End Sub
209
Exit Sub
End If
rsUsuarios("CodUser_Sist") = txtCodUsuario.Text
rsUsuarios("Usuario_Sist") = txtUsuario.Text
rsUsuarios("Senha_Sist") = txtSenha.Text
rsUsuarios("Nivel_Sist") = txtNivel.Text
rsUsuarios.Update
DesabilitaCampos
MsgBox "Dados do Usurio salvos com sucesso!!!", vbOKOnly + vbInformation,
"Aviso"
cmdCancelar.Enabled = False
cmdIncluir.Enabled = True
cmdFechar.Enabled = True
cmdGravar.Enabled = False
cmdPrimeiro.Enabled = True
cmdAnterior.Enabled = True
cmdProximo.Enabled = True
cmdUltimo.Enabled = True
cmdAlterar.Enabled = True
cmdExcluir.Enabled = True
End Sub
Private Sub cmdPrimeiro_Click()
rsUsuarios.MoveFirst
MostraRegistro
End Sub
210
211
DesabilitaCampos
End Sub
212
txtNivel.Text = Empty
End If
End Sub
Private Sub HabilitaCampos()
txtUsuario.Enabled = True
txtSenha.Enabled = True
txtNivel.Enabled = True
End Sub
Private Sub LimpaRegistro()
txtCodUsuario.Text = ""
txtUsuario.Text = ""
txtSenha.Text = ""
txtNivel.Text = ""
End Sub
213
214
Else
txtParametro.Enabled = True
End If
End Sub
End If
End Sub
215
.Rows = 1
.TextArray(0) = "Cdigo"
.TextArray(1) = "Nome do Usurio"
.TextArray(2) = "Nivel"
End With
End Sub
216
217
218
cboTipo.SetFocus
End If
End Sub
Private Sub EncheGrid()
End Sub
219
KeyAscii = 0
End If
End If
End Sub
Help File
Arquivo de ajuda aos usurios, onde contm todas as informaes
220
Melhorias no Sistema.
Diante de tudo o que foi apresentado, todo e qualquer sistema deve ser
modelado aos poucos, aps sua implantao passa ser um momento, de
diariamente levantar falhas, que de imediato deve ser corrigidas, porem o mais
importante, maneiras de se melhorar o programa, onde suprir a necessidade da
instituio pela qual utiliza o sotfware desenvolvido.
Conforme se passa o tempo de sua utilizao novas ferramentas sero
solicitadas em prol da agilidade e praticidade, segui a baixo melhorias j detectadas
pelo programador e que j esto em andamento medidas para provveis solues.
Backup:
De acordo com o fluxo de informaes, deve ser programado para se
fazer o backup dos dados.
A informao o bem mais valioso de uma empresa, nelas esto o
sangue que permite a empresa estar viva.
Relatrios:
Documento de grande importncia, pois neles estaro implessos os
dados e informaes para se dar continuidade no bom funcionamento da empresa,
vivemos em um Pas capitalista e movido por nmeros.
Contole de estoque:
Mantm o controle das mercadorias a serem vendidas de acordo com a
necessidade da demanda da loja, assim no deichando faltar as devidas
mercadorias, pois sua fonte de lucros vem das vendas.
221
Concluso
Dentre todas as fases que se tem at chegarmos no melhor, para que o
programa desenvolvido seja satisfatrio e atenda toda necessidade, temos que
atentar e seguir da melhor maneira todas elas, tais como:
Estudo;
Anlise;
Projetos;
Implementao;
Simulao;
Implantao;
Operao e
Manuteno.
Assim trabalhando em equipe, com Analista, Programador e Projetista.
Todo Sistema h falhas, isso consiste em detecta-los e corrigi-los to
breve possvel.
de grande importncia passar por todos esses mtodos, assim
podemos adquirir experincias, pois conforme o tempo se passa pode-se ir
modelando as tcnicas e mtodos.
222
Referncia Bibliogrfica
Significado de algumas palavras retiradas do dicionrio:
DIC Michaelis Escolar Verso 2.0 Agosto de 2002
Editora Melhoramentos Ltda