ERRO NO CLIENTE AO ABRIR O FORM

MAMONALTA 21/03/2012 23:01:29
#397911
Apenas em um cliente dá esse erro... e se ele clica em continuar, funciona sem problemas.

Alguém sabe o que pode representar esse erro?

obrigado


See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.ComponentModel.InvalidEnumArgumentException: The value of argument [ô]value[ô] (-1) is invalid for Enum type [ô]DataGridViewAutoSizeColumnMode[ô].
Parameter name: value
at System.Windows.Forms.DataGridViewColumn.set_AutoSizeMode(DataGridViewAutoSizeColumnMode value)
at Golden_Estoque.movimentacao.Carrega_datagrid()
at Golden_Estoque.movimentacao.movimentacao_Load(Object sender, EventArgs e)
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.1 (RTMRel.030319-0100)
CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
System
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.1 built by: RTMRel
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
Golden Estoque
Assembly Version: 1.0.0.19
Win32 Version: 1.0.0.19
CodeBase: file:///C:/Documents%20and%20Settings/nome/Configura%E7%F5es%20locais/Apps/2.0/ELWZA0X4.M8Q/0P62BW5B.X2H/gold..tion_3dc4a7584d487083_0001.0000_3e9beac13e878a4c/Golden%20Estoque.exe
----------------------------------------
Microsoft.VisualBasic
Assembly Version: 10.0.0.0
Win32 Version: 10.0.30319.1 built by: RTMRel
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualBasic/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
----------------------------------------
System.Core
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.1 built by: RTMRel
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Windows.Forms
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.1 built by: RTMRel
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.1 built by: RTMRel
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Runtime.Remoting
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.1 (RTMRel.030319-0100)
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Remoting/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll
----------------------------------------
System.Configuration
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.1 (RTMRel.030319-0100)
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.1 built by: RTMRel
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
MySql.Data
Assembly Version: 6.4.4.0
Win32 Version: 6.4.4.0
CodeBase: file:///C:/Documents%20and%20Settings/nome/Configura%E7%F5es%20locais/Apps/2.0/ELWZA0X4.M8Q/0P62BW5B.X2H/gold..tion_3dc4a7584d487083_0001.0000_3e9beac13e878a4c/MySql.Data.DLL
----------------------------------------
System.Data
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.1 (RTMRel.030319-0100)
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_32/System.Data/v4.0_4.0.0.0__b77a5c561934e089/System.Data.dll
----------------------------------------
System.Transactions
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.1 (RTMRel.030319-0100)
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_32/System.Transactions/v4.0_4.0.0.0__b77a5c561934e089/System.Transactions.dll
----------------------------------------
System.EnterpriseServices
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.1 (RTMRel.030319-0100)
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_32/System.EnterpriseServices/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.EnterpriseServices.dll
----------------------------------------
System.Numerics
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.1 built by: RTMRel
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Numerics/v4.0_4.0.0.0__b77a5c561934e089/System.Numerics.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
<system.windows.forms jitDebugging=[Ô]true[Ô] />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.
KERPLUNK 22/03/2012 01:03:15
#397914
No método Carrega_datagrid, em algum lugar você está tentando atribuir o valor [Ô]-1[Ô] para a propriedade AutoSize de alguma coluna e esse valor não é válido.
GUIMORAES 22/03/2012 09:43:12
#397922
no início da linha já aponta o erro.

System.ComponentModel.InvalidEnumArgumentException: The value of argument [ô]value[ô] (-1) is invalid for Enum type [ô]DataGridViewAutoSizeColumnMode[ô].
Parameter name: value
at System.Windows.Forms.DataGridViewColumn.set_AutoSizeMode(DataGridViewAutoSizeColumnMode value)
at Golden_Estoque.movimentacao.Carrega_datagrid()


Abraços
MAMONALTA 22/03/2012 10:38:40
#397926
Mas eu não tenho nada referenciando -1 no datagrid
A única coisa que faço é colocar um parametro para o autosize = true
e funciona normalmente. Só naquele computador apresenta esse erro e o estranho, ele clica em continue e funciona.
PEGUDO 22/03/2012 11:10:12
#397929
Já q funciona quando ele clica em Continue, coloca

[txt-color=#0000f0]Try[/txt-color]
[txt-color=#007100][ô]Seu código[/txt-color]
[txt-color=#0000f0]Catch[/txt-color] ex [txt-color=#0000f0]As Exception[/txt-color]
[txt-color=#007100][ô]Deixa em branco só para evitar erros[/txt-color]
[txt-color=#0000f0]End Try[/txt-color]
MAMONALTA 22/03/2012 14:41:55
#397950
Pegudo, Kerplunk e guimoraes

o código para carregar o grid é esse oh:

Private Sub Carrega_datagrid()
Dim conn As New MySqlConnection
Dim myCommand As New MySqlCommand
Dim myAdapter As New MySqlDataAdapter
Dim myData As New DataTable
Dim SQL As String

conn = New MySqlConnection

conn.ConnectionString = conexao

SQL = [Ô]SELECT tb_produto.nome, tb_movimentacao.tipo_movimento, tb_movimentacao.data, tb_movimentacao.qtd FROM tb_movimentacao, tb_produto where tb_produto.id = tb_movimentacao.id_tb_produto order by tb_movimentacao.id DESC limit 10[Ô]

Try
conn.Open()
Try
myCommand.Connection = conn
myCommand.CommandText = SQL
myAdapter.SelectCommand = myCommand
myAdapter.Fill(myData)
DataGridView1.DataSource = myData
DataGridView1.Columns.Item(0).HeaderText = [Ô]Produto[Ô]
DataGridView1.Columns.Item(1).HeaderText = [Ô]Movimento[Ô]
DataGridView1.Columns.Item(1).Width = 20
DataGridView1.Columns.Item(2).HeaderText = [Ô]Data[Ô]
DataGridView1.Columns.Item(3).HeaderText = [Ô]Quantidade[Ô]

DataGridView1.SelectionMode = DataGridViewSelectionMode.FullRowSelect
ToolStripStatusLabel1.Text = [Ô]Listagem carregada com sucesso[Ô]
Catch myerro As MySqlException
MsgBox([Ô]Erro de leitura no banco de dados : [Ô] & myerro.Message)
End Try
conn.Close()
Catch myerro As MySqlException
ToolStripStatusLabel1.Text = [Ô]Erro ao conectar com o Banco de dados : [Ô] & myerro.Message
Finally
conn.Dispose()
End Try
End Sub
MAMONALTA 23/03/2012 10:49:55
#398055
ninguém?
KERPLUNK 23/03/2012 11:25:10
#398071
Tente tirar a linha [Ô]DataGridView1.Columns.Item(1).Width = 20[Ô] e veja se o erro some.
Tópico encerrado , respostas não são mais permitidas