Ir para conteúdo
Fórum Script Brasil
  • 0

Problemas No Form


alexandremanowar

Pergunta

E aí pessoal

Eu tenho um projeto em vb.net 2005 para desktop e estava funcionando normalmente, porém eu tive que formatar minha máquina e reinstalar tudo, reinstalei o vb.net 2005 e fui testar quase todos os meu forms funcionam numa boa apenas um que esta dando um problema, quando abro meu projeto no vb ele carrega o projeto, e quando abro esse form ele me da a seguinte MSN de erro:

One or more errors encountered while loading the designer. The errors are listed below. Some errors can be fixed by rebuilding your project, while others may require code changes.

Object reference not set to an instance of an object.

Hide

at System.ComponentModel.ReflectPropertyDescriptor.SetValue(Object component, Object value)

at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeAssignStatement(IDesignerSerializationManager manager, CodeAssignStatement statement)

at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeStatement(IDesignerSerializationManager manager, CodeStatement statement)

Ele não permite nem eu olhar o form em modo gráfico, permite apenas eu olhar em código, pelo que eu entendi na MSN de erro algum objeto esta faltando, já olhei o código desse form todo e não achei onde pode estar o erro?

Esse é o código do form:

Imports System.Windows.Forms

Imports MySql.Data.MySqlClient

Public Class Nota

Private Sub unitario1_TextChanged(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles unitario1.KeyPress

Static separador As String = ","

Static válidos As String = "0123456789" & Chr(Keys.Back)

e.Handled = True

If válidos.Contains(e.KeyChar) Then

Dim txt As TextBox = sender

Dim texto As String = txt.Text.Replace(separador, "")

If e.KeyChar = Chr(Keys.Back) Then

If txt.Text.Length > 0 Then

texto = texto.Substring(0, texto.Length - 1)

End If

Else

texto = texto & e.KeyChar

End If

If texto.Length > 2 Then

texto = texto.Insert(texto.Length - 2, separador)

End If

txt.Text = texto

End If

End Sub

Private Sub unitario2_TextKeyPressed(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles unitario2.KeyPress

Static separador As String = ","

Static válidos As String = "0123456789" & Chr(Keys.Back)

e.Handled = True

If válidos.Contains(e.KeyChar) Then

Dim txt As TextBox = sender

Dim texto As String = txt.Text.Replace(separador, "")

If e.KeyChar = Chr(Keys.Back) Then

If txt.Text.Length > 0 Then

texto = texto.Substring(0, texto.Length - 1)

End If

Else

texto = texto & e.KeyChar

End If

If texto.Length > 2 Then

texto = texto.Insert(texto.Length - 2, separador)

End If

txt.Text = texto

End If

End Sub

Private Sub unitario3_TextKeyPressed(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles unitario3.KeyPress

Static separador As String = ","

Static válidos As String = "0123456789" & Chr(Keys.Back)

e.Handled = True

If válidos.Contains(e.KeyChar) Then

Dim txt As TextBox = sender

Dim texto As String = txt.Text.Replace(separador, "")

If e.KeyChar = Chr(Keys.Back) Then

If txt.Text.Length > 0 Then

texto = texto.Substring(0, texto.Length - 1)

End If

Else

texto = texto & e.KeyChar

End If

If texto.Length > 2 Then

texto = texto.Insert(texto.Length - 2, separador)

End If

txt.Text = texto

End If

End Sub

Private Sub unitario4_TextKeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles unitario4.KeyPress

Static separador As String = ","

Static válidos As String = "0123456789" & Chr(Keys.Back)

e.Handled = True

If válidos.Contains(e.KeyChar) Then

Dim txt As TextBox = sender

Dim texto As String = txt.Text.Replace(separador, "")

If e.KeyChar = Chr(Keys.Back) Then

If txt.Text.Length > 0 Then

texto = texto.Substring(0, texto.Length - 1)

End If

Else

texto = texto & e.KeyChar

End If

If texto.Length > 2 Then

texto = texto.Insert(texto.Length - 2, separador)

End If

txt.Text = texto

End If

End Sub

Private Sub unitario5_TextKeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles unitario5.KeyPress

Static separador As String = ","

Static válidos As String = "0123456789" & Chr(Keys.Back)

e.Handled = True

If válidos.Contains(e.KeyChar) Then

Dim txt As TextBox = sender

Dim texto As String = txt.Text.Replace(separador, "")

If e.KeyChar = Chr(Keys.Back) Then

If txt.Text.Length > 0 Then

texto = texto.Substring(0, texto.Length - 1)

End If

Else

texto = texto & e.KeyChar

End If

If texto.Length > 2 Then

texto = texto.Insert(texto.Length - 2, separador)

End If

txt.Text = texto

End If

End Sub

Private Sub unitario6_TextKeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles unitario6.KeyPress

Static separador As String = ","

Static válidos As String = "0123456789" & Chr(Keys.Back)

e.Handled = True

If válidos.Contains(e.KeyChar) Then

Dim txt As TextBox = sender

Dim texto As String = txt.Text.Replace(separador, "")

If e.KeyChar = Chr(Keys.Back) Then

If txt.Text.Length > 0 Then

texto = texto.Substring(0, texto.Length - 1)

End If

Else

texto = texto & e.KeyChar

End If

If texto.Length > 2 Then

texto = texto.Insert(texto.Length - 2, separador)

End If

txt.Text = texto

End If

End Sub

Private Sub unitario7_TextKeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles unitario7.KeyPress

Static separador As String = ","

Static válidos As String = "0123456789" & Chr(Keys.Back)

e.Handled = True

If válidos.Contains(e.KeyChar) Then

Dim txt As TextBox = sender

Dim texto As String = txt.Text.Replace(separador, "")

If e.KeyChar = Chr(Keys.Back) Then

If txt.Text.Length > 0 Then

texto = texto.Substring(0, texto.Length - 1)

End If

Else

texto = texto & e.KeyChar

End If

If texto.Length > 2 Then

texto = texto.Insert(texto.Length - 2, separador)

End If

txt.Text = texto

End If

End Sub

Private Sub unitario8_TextKeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles unitario8.KeyPress

Static separador As String = ","

Static válidos As String = "0123456789" & Chr(Keys.Back)

e.Handled = True

If válidos.Contains(e.KeyChar) Then

Dim txt As TextBox = sender

Dim texto As String = txt.Text.Replace(separador, "")

If e.KeyChar = Chr(Keys.Back) Then

If txt.Text.Length > 0 Then

texto = texto.Substring(0, texto.Length - 1)

End If

Else

texto = texto & e.KeyChar

End If

If texto.Length > 2 Then

texto = texto.Insert(texto.Length - 2, separador)

End If

txt.Text = texto

End If

End Sub

Private Sub unitario9_TextKeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles unitario9.KeyPress

Static separador As String = ","

Static válidos As String = "0123456789" & Chr(Keys.Back)

e.Handled = True

If válidos.Contains(e.KeyChar) Then

Dim txt As TextBox = sender

Dim texto As String = txt.Text.Replace(separador, "")

If e.KeyChar = Chr(Keys.Back) Then

If txt.Text.Length > 0 Then

texto = texto.Substring(0, texto.Length - 1)

End If

Else

texto = texto & e.KeyChar

End If

If texto.Length > 2 Then

texto = texto.Insert(texto.Length - 2, separador)

End If

txt.Text = texto

End If

End Sub

Private Sub unitario10_TextKeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles unitario10.KeyPress

Static separador As String = ","

Static válidos As String = "0123456789" & Chr(Keys.Back)

e.Handled = True

If válidos.Contains(e.KeyChar) Then

Dim txt As TextBox = sender

Dim texto As String = txt.Text.Replace(separador, "")

If e.KeyChar = Chr(Keys.Back) Then

If txt.Text.Length > 0 Then

texto = texto.Substring(0, texto.Length - 1)

End If

Else

texto = texto & e.KeyChar

End If

If texto.Length > 2 Then

texto = texto.Insert(texto.Length - 2, separador)

End If

txt.Text = texto

End If

End Sub

Private Sub totalservicos_TextKeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles totalservicos.KeyPress

Static separador As String = ","

Static válidos As String = "0123456789" & Chr(Keys.Back)

e.Handled = True

If válidos.Contains(e.KeyChar) Then

Dim txt As TextBox = sender

Dim texto As String = txt.Text.Replace(separador, "")

If e.KeyChar = Chr(Keys.Back) Then

If txt.Text.Length > 0 Then

texto = texto.Substring(0, texto.Length - 1)

End If

Else

texto = texto & e.KeyChar

End If

If texto.Length > 2 Then

texto = texto.Insert(texto.Length - 2, separador)

End If

txt.Text = texto

End If

End Sub

Private Sub Nota_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

End Sub

Private Sub unitario1_LostFocus(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles unitario1.LostFocus

total1.Text = unitario1.Text

Dim troca1 As String

If quantidade1.Text <> "" And unitario1.Text <> "" Then

troca1 = unitario1.Text

troca1 = troca1.Replace(",", ".")

Dim v1 As Double

v1 = quantidade1.Text * unitario1.Text

total1.Text = v1

totalprodutos.Text = total1.Text

valorfinal.Text = totalprodutos.Text

End If

End Sub

Private Sub unitario2_LostFocus(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles unitario2.LostFocus

Dim troca2 As String

If quantidade2.Text <> "" And unitario2.Text <> "" Then

troca2 = unitario2.Text

troca2 = troca2.Replace(",", ".")

Dim v2 As Double

v2 = quantidade2.Text * unitario2.Text

total2.Text = v2

v2 = v2 + total1.Text

totalprodutos.Text = v2

valorfinal.Text = totalprodutos.Text

End If

End Sub

Private Sub unitario3_LostFocus(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles unitario3.LostFocus

Dim troca3 As String

If quantidade3.Text <> "" And unitario3.Text <> "" Then

troca3 = unitario3.Text

troca3 = troca3.Replace(",", ".")

Dim v3 As Double

v3 = quantidade3.Text * unitario3.Text

total3.Text = v3

v3 = v3 + total1.Text + total2.Text

totalprodutos.Text = v3

valorfinal.Text = totalprodutos.Text

End If

End Sub

Private Sub unitario4_LostFocus(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles unitario4.LostFocus

Dim troca4 As String

If quantidade4.Text <> "" And unitario4.Text <> "" Then

troca4 = unitario4.Text

troca4 = troca4.Replace(",", ".")

Dim v4 As Double

v4 = quantidade4.Text * unitario4.Text

total4.Text = v4

v4 = v4 + total1.Text + total2.Text + total3.Text

totalprodutos.Text = v4

valorfinal.Text = totalprodutos.Text

End If

End Sub

Private Sub unitario5_LostFocus(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles unitario5.LostFocus

Dim troca5 As String

If quantidade5.Text <> "" And unitario5.Text <> "" Then

troca5 = unitario5.Text

troca5 = troca5.Replace(",", ".")

Dim v5 As Double

v5 = quantidade5.Text * unitario5.Text

total5.Text = v5

v5 = v5 + total1.Text + total2.Text + total4.Text + total4.Text

totalprodutos.Text = v5

valorfinal.Text = totalprodutos.Text

End If

End Sub

Private Sub unitario6_LostFocus(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles unitario6.LostFocus

Dim troca6 As String

If quantidade6.Text <> "" And unitario6.Text <> "" Then

troca6 = unitario6.Text

troca6 = troca6.Replace(",", ".")

Dim v6 As Double

v6 = quantidade6.Text * unitario6.Text

total6.Text = v6

v6 = v6 + total1.Text + total2.Text + total3.Text + total4.Text + total5.Text

totalprodutos.Text = v6

valorfinal.Text = totalprodutos.Text

End If

End Sub

Private Sub unitario7_LostFocus(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles unitario7.LostFocus

Dim troca7 As String

If quantidade7.Text <> "" And unitario7.Text <> "" Then

troca7 = unitario7.Text

troca7 = troca7.Replace(",", ".")

Dim v7 As Double

v7 = quantidade7.Text * unitario7.Text

total7.Text = v7

v7 = v7 + total1.Text + total2.Text + total3.Text + total4.Text + total5.Text + total6.Text + total7.Text

totalprodutos.Text = v7

valorfinal.Text = totalprodutos.Text

End If

End Sub

Private Sub unitario8_LostFocus(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles unitario8.LostFocus

Dim troca8 As String

If quantidade8.Text <> "" And unitario8.Text <> "" Then

troca8 = unitario8.Text

troca8 = troca8.Replace(",", ".")

Dim v8 As Double

v8 = quantidade8.Text * unitario8.Text

total8.Text = v8

v8 = v8 + total1.Text + total2.Text + total3.Text + total4.Text + total5.Text + total6.Text + total7.Text + total8.Text

totalprodutos.Text = v8

valorfinal.Text = totalprodutos.Text

End If

End Sub

Private Sub unitario9_LostFocus(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles unitario9.LostFocus

Dim troca9 As String

If quantidade9.Text <> "" And unitario9.Text <> "" Then

troca9 = unitario9.Text

troca9 = troca9.Replace(",", ".")

Dim v9 As Double

v9 = quantidade9.Text * unitario9.Text

total9.Text = v9

v9 = v9 + total1.Text + total2.Text + total3.Text + total4.Text + total5.Text + total6.Text + total7.Text + total8.Text + total9.Text

totalprodutos.Text = v9

valorfinal.Text = totalprodutos.Text

End If

End Sub

Private Sub unitario10_LostFocus(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles unitario10.LostFocus

Dim troca10 As String

If quantidade10.Text <> "" And unitario10.Text <> "" Then

troca10 = unitario10.Text

troca10 = troca10.Replace(",", ".")

Dim v10 As Double

v10 = quantidade10.Text * unitario10.Text

total10.Text = v10

v10 = v10 + total1.Text + total2.Text + total3.Text + total4.Text + total5.Text + total6.Text + total7.Text + total8.Text + total9.Text + total10.Text

totalprodutos.Text = v10

valorfinal.Text = totalprodutos.Text

End If

End Sub

Private Sub totalservicos_LostFocus(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles totalservicos.LostFocus

If totalprodutos.Text <> "" Then

Dim v12 As Double

v12 = 0 + totalprodutos.Text + totalservicos.Text

totalprodutos.Text = v12

valorfinal.Text = totalprodutos.Text

End If

If totalprodutos.Text = "" Then

totalprodutos.Text = totalservicos.Text

valorfinal.Text = totalprodutos.Text

End If

End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)

Dim conn As New MySqlConnection

conn.ConnectionString = "server=servidor;user id=usuario;password=senha;database=base"

conn.Open()

Dim cmd As New MySqlCommand("INSERT INTO nota (fatura) VALUES ('teste')", conn)

cmd.ExecuteNonQuery()

conn.Close()

End Sub

Private Sub operacao_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles operacao.TextChanged

If operacao.Text.Length > 20 Then

MsgBox("Você chegou no limite do campo, se continuar o texto vai ultrapassar o campo da nota", MsgBoxStyle.Exclamation, "Atenção")

End If

End Sub

Private Sub cfop_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cfop.TextChanged

If cfop.Text.Length > 3 Then

MsgBox("Você chegou no limite do campo, se continuar o texto vai ultrapassar o campo da nota", MsgBoxStyle.Exclamation, "Atenção")

End If

End Sub

Private Sub nome_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles nome.TextChanged

If nome.Text.Length > 32 Then

MsgBox("Você chegou no limite do campo, se continuar o texto vai ultrapassar o campo da nota", MsgBoxStyle.Exclamation, "Atenção")

End If

End Sub

Private Sub cnpj_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cnpj.TextChanged

If cnpj.Text.Length > 15 Then

MsgBox("Você chegou no limite do campo, se continuar o texto vai ultrapassar o campo da nota", MsgBoxStyle.Exclamation, "Atenção")

End If

End Sub

Private Sub endereco_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles endereco.TextChanged

If endereco.Text.Length > 37 Then

MsgBox("Você chegou no limite do campo, se continuar o texto vai ultrapassar o campo da nota", MsgBoxStyle.Exclamation, "Atenção")

End If

End Sub

Private Sub Bairro_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Bairro.TextChanged

If Bairro.Text.Length > 11 Then

MsgBox("Você chegou no limite do campo, se continuar o texto vai ultrapassar o campo da nota", MsgBoxStyle.Exclamation, "Atenção")

End If

End Sub

Private Sub municipio_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles municipio.TextChanged

If municipio.Text.Length > 20 Then

MsgBox("Você chegou no limite do campo, se continuar o texto vai ultrapassar o campo da nota", MsgBoxStyle.Exclamation, "Atenção")

End If

End Sub

Private Sub uf_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles uf.TextChanged

If uf.Text.Length > 2 Then

MsgBox("É permitido apenas 2 digitos nesse campo", MsgBoxStyle.Exclamation, "Atenção")

uf.Text = ""

uf.Focus()

End If

End Sub

Private Sub inscricao_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles inscricao.TextChanged

If inscricao.Text.Length > 15 Then

MsgBox("Você chegou no limite do campo, se continuar o texto vai ultrapassar o campo da nota", MsgBoxStyle.Exclamation, "Atenção")

End If

End Sub

Private Sub fatura_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles fatura.TextChanged

If fatura.Text.Length > 78 Then

MsgBox("Você chegou no limite do campo, se continuar o texto vai ultrapassar o campo da nota", MsgBoxStyle.Exclamation, "Atenção")

End If

End Sub

Private Sub codigo1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles codigo1.TextChanged

If codigo1.Text.Length > 12 Then

MsgBox("Você chegou no limite do campo, se continuar o texto vai ultrapassar o campo da nota", MsgBoxStyle.Exclamation, "Atenção")

End If

End Sub

Private Sub codigo2_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles codigo2.TextChanged

If codigo2.Text.Length > 12 Then

MsgBox("Você chegou no limite do campo, se continuar o texto vai ultrapassar o campo da nota", MsgBoxStyle.Exclamation, "Atenção")

End If

End Sub

Private Sub codigo3_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles codigo3.TextChanged

If codigo3.Text.Length > 12 Then

MsgBox("Você chegou no limite do campo, se continuar o texto vai ultrapassar o campo da nota", MsgBoxStyle.Exclamation, "Atenção")

End If

End Sub

Private Sub codigo4_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles codigo4.TextChanged

If codigo4.Text.Length > 12 Then

MsgBox("Você chegou no limite do campo, se continuar o texto vai ultrapassar o campo da nota", MsgBoxStyle.Exclamation, "Atenção")

End If

End Sub

Private Sub codigo5_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles codigo5.TextChanged

If codigo5.Text.Length > 12 Then

MsgBox("Você chegou no limite do campo, se continuar o texto vai ultrapassar o campo da nota", MsgBoxStyle.Exclamation, "Atenção")

End If

End Sub

Private Sub codigo6_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles codigo6.TextChanged

If codigo6.Text.Length > 12 Then

MsgBox("Você chegou no limite do campo, se continuar o texto vai ultrapassar o campo da nota", MsgBoxStyle.Exclamation, "Atenção")

End If

End Sub

Private Sub codigo7_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles codigo7.TextChanged

If codigo7.Text.Length > 12 Then

MsgBox("Você chegou no limite do campo, se continuar o texto vai ultrapassar o campo da nota", MsgBoxStyle.Exclamation, "Atenção")

End If

End Sub

Private Sub codigo8_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles codigo8.TextChanged

If codigo8.Text.Length > 12 Then

MsgBox("Você chegou no limite do campo, se continuar o texto vai ultrapassar o campo da nota", MsgBoxStyle.Exclamation, "Atenção")

End If

End Sub

Private Sub codigo9_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles codigo9.TextChanged

If codigo9.Text.Length > 12 Then

MsgBox("Você chegou no limite do campo, se continuar o texto vai ultrapassar o campo da nota", MsgBoxStyle.Exclamation, "Atenção")

End If

End Sub

Private Sub codigo10_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles codigo10.TextChanged

If codigo10.Text.Length > 12 Then

MsgBox("Você chegou no limite do campo, se continuar o texto vai ultrapassar o campo da nota", MsgBoxStyle.Exclamation, "Atenção")

End If

End Sub

Private Sub descricao1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles descricao1.TextChanged

If descricao1.Text.Length > 51 Then

MsgBox("Você chegou no limite do campo, se continuar o texto vai ultrapassar o campo da nota", MsgBoxStyle.Exclamation, "Atenção")

End If

End Sub

Private Sub descricao2_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles descricao2.TextChanged

If descricao2.Text.Length > 51 Then

MsgBox("Você chegou no limite do campo, se continuar o texto vai ultrapassar o campo da nota", MsgBoxStyle.Exclamation, "Atenção")

End If

End Sub

Private Sub descricao3_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles descricao3.TextChanged

If descricao3.Text.Length > 51 Then

MsgBox("Você chegou no limite do campo, se continuar o texto vai ultrapassar o campo da nota", MsgBoxStyle.Exclamation, "Atenção")

End If

End Sub

Private Sub descricao4_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles descricao4.TextChanged

If descricao4.Text.Length > 51 Then

MsgBox("Você chegou no limite do campo, se continuar o texto vai ultrapassar o campo da nota", MsgBoxStyle.Exclamation, "Atenção")

End If

End Sub

Private Sub descricao5_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles descricao5.TextChanged

If descricao5.Text.Length > 51 Then

MsgBox("Você chegou no limite do campo, se continuar o texto vai ultrapassar o campo da nota", MsgBoxStyle.Exclamation, "Atenção")

End If

End Sub

Private Sub descricao6_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles descricao6.TextChanged

If descricao6.Text.Length > 51 Then

MsgBox("Você chegou no limite do campo, se continuar o texto vai ultrapassar o campo da nota", MsgBoxStyle.Exclamation, "Atenção")

End If

End Sub

Private Sub descricao7_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles descricao7.TextChanged

If descricao7.Text.Length > 51 Then

MsgBox("Você chegou no limite do campo, se continuar o texto vai ultrapassar o campo da nota", MsgBoxStyle.Exclamation, "Atenção")

End If

End Sub

Private Sub descricao8_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles descricao8.TextChanged

If descricao8.Text.Length > 51 Then

MsgBox("Você chegou no limite do campo, se continuar o texto vai ultrapassar o campo da nota", MsgBoxStyle.Exclamation, "Atenção")

End If

End Sub

Private Sub descricao9_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles descricao9.TextChanged

If descricao9.Text.Length > 51 Then

MsgBox("Você chegou no limite do campo, se continuar o texto vai ultrapassar o campo da nota", MsgBoxStyle.Exclamation, "Atenção")

End If

End Sub

Private Sub descricao10_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles descricao10.TextChanged

If descricao10.Text.Length > 51 Then

MsgBox("Você chegou no limite do campo, se continuar o texto vai ultrapassar o campo da nota", MsgBoxStyle.Exclamation, "Atenção")

End If

End Sub

Private Sub unidade1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles unidade1.TextChanged

If unidade1.Text.Length > 4 Then

MsgBox("Você chegou no limite do campo, se continuar o texto vai ultrapassar o campo da nota", MsgBoxStyle.Exclamation, "Atenção")

End If

End Sub

Private Sub unidade2_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles unidade2.TextChanged

If unidade2.Text.Length > 4 Then

MsgBox("Você chegou no limite do campo, se continuar o texto vai ultrapassar o campo da nota", MsgBoxStyle.Exclamation, "Atenção")

End If

End Sub

Private Sub unidade3_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles unidade3.TextChanged

If unidade3.Text.Length > 4 Then

MsgBox("Você chegou no limite do campo, se continuar o texto vai ultrapassar o campo da nota", MsgBoxStyle.Exclamation, "Atenção")

End If

End Sub

Private Sub unidade4_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles unidade4.TextChanged

If unidade4.Text.Length > 4 Then

MsgBox("Você chegou no limite do campo, se continuar o texto vai ultrapassar o campo da nota", MsgBoxStyle.Exclamation, "Atenção")

End If

End Sub

Private Sub unidade5_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles unidade5.TextChanged

If unidade5.Text.Length > 4 Then

MsgBox("Você chegou no limite do campo, se continuar o texto vai ultrapassar o campo da nota", MsgBoxStyle.Exclamation, "Atenção")

End If

End Sub

Private Sub unidade6_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles unidade6.TextChanged

If unidade6.Text.Length > 4 Then

MsgBox("Você chegou no limite do campo, se continuar o texto vai ultrapassar o campo da nota", MsgBoxStyle.Exclamation, "Atenção")

End If

End Sub

Private Sub unidade7_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles unidade7.TextChanged

If unidade7.Text.Length > 4 Then

MsgBox("Você chegou no limite do campo, se continuar o texto vai ultrapassar o campo da nota", MsgBoxStyle.Exclamation, "Atenção")

End If

End Sub

Private Sub unidade8_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles unidade8.TextChanged

If unidade8.Text.Length > 4 Then

MsgBox("Você chegou no limite do campo, se continuar o texto vai ultrapassar o campo da nota", MsgBoxStyle.Exclamation, "Atenção")

End If

End Sub

Private Sub unidade9_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles unidade9.TextChanged

If unidade9.Text.Length > 4 Then

MsgBox("Você chegou no li

Editado por alexandremanowar
Link para o comentário
Compartilhar em outros sites

1 resposta a esta questão

Posts Recomendados

  • 0

Eu já tinha procurado o erro muito e não tinha achado, poucos minutos depois de postar aqui eu achei rrsrs

Era o objeto de conexão que estava dando problemas, removi e recoloquei e ficou ok

valeu

Link para o comentário
Compartilhar em outros sites

Participe da discussão

Você pode postar agora e se registrar depois. Se você já tem uma conta, acesse agora para postar com sua conta.

Visitante
Responder esta pergunta...

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emoticons são permitidos.

×   Seu link foi incorporado automaticamente.   Exibir como um link em vez disso

×   Seu conteúdo anterior foi restaurado.   Limpar Editor

×   Você não pode colar imagens diretamente. Carregar ou inserir imagens do URL.



  • Estatísticas dos Fóruns

    • Tópicos
      152,2k
    • Posts
      651,9k
×
×
  • Criar Novo...