|
| |||||||||
| Tags: exception, invalid operation, windows xp |
![]() |
| | Thread Tools | Search this Thread |
|
#1
| ||||
| ||||
| System.InvalidOperationException on form.show()
Hello, I have a piece of code that load up a form: - Quote:
Please help. |
|
#2
| |||
| |||
| Re: System.InvalidOperationException on form.show()
Try to Compile the program in the other VB.net editor then check for debug build and try running it from the bin folder again. Or else When you get the exception error there should be an option to debug the application. The Visual Studio IDE allows to open and break where the error occurred. You should be able to examine the values of the different variables at this point. |
|
#3
| |||
| |||
| Re: System.InvalidOperationException on form.show()
I will provide you some trick to handle the exception use try...catch blocks: Code: try
your code here
catch ex as exception
MsgBox(ex.Message & " - " & ex.StackTrace)
end try |
|
#4
| |||
| |||
| Re: System.InvalidOperationException on form.show()
Are you able to load the form in the designer? If it loads fine then you should be able to set a breakpoint in the Form_Load event just as you did with VB6 and determine which control is not loading the second element. Depending on the version of Visual Basic you're using this is either in the .Designer.vb file (show all files from the solution explorer to see it) or it's in the collapsed Windows Form Designer generated code region of the form file. If you remove the attribute (<System.Diagnostics.DebuggerStepThrough()>) on the IntializeComponents sub routine you should be able to debug this routine it as well. You should be able to just inspect this routine and make sure all of your control arrays are loading the 2 element. The code you’re looking for would be similar to the following example: Me.Command1.SetIndex(_Command1_2, CType(2, Short)) |
|
#5
| |||
| |||
| Re: System.InvalidOperationException on form.show()
I had this kind of problem, and I solved it reasigning the icon on some forms on my application, in Vista and W7, you can display an icon with 256x256, but in WinXP does not work, and worse, does not gives you a clue, my solution was change the icon's forms to a smaller one. |
|
#6
| ||||
| ||||
| Re: System.InvalidOperationException on form.show()
Looking at the situation that you have presented here I think that the possible reason for this issue can be when you use a Microsoft Visual Studio .NET 2003 client application against a Microsoft SQL Server 2005 native Web service. The reason for the occurrence for this is because the System.Data.DataSet object that Visual Studio .NET 2003 uses does not support the XML Schema definition language (XSD) schemas that SQL Server 2005 generates. In order to overcome the issue I would suggest you to use the simple Web Services Description Language (WSDL) instead of the default WSDL. If you want to have a reference then you can use the following or the similar URL:http://<server>/<endpoint>?wsdlsimple. Hope that you will find this useful. |
|
#7
| |||
| |||
| Re: System.InvalidOperationException on form.show() Quote:
I started yanking out references and commenting out code but nothing helped. I reinstalled .NET on the target machine. Everything I could think of. Just when I had about hit rock bottom and totally given up, I found that post and realized "Hey! I got a 256x256 icon as my form icon! I wonder..." I replaced it and everything worked! It seems like it's fine to have a large-format icon for your PROGRAM icon and any shortcuts in your setup program, but you MUST make a standard (64x64 max frame size) .ICO file for your Windows Forms icon. |
![]() |
|
| Thread Tools | Search this Thread |
| |
Similar Threads for: "System.InvalidOperationException on form.show()" | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to access the windows music file form the Linux dual boot system. | Ighun55 | Operating Systems | 4 | 26-12-2010 09:07 AM |
| Desktop icons disappear when system out form Sleep in Windows 7 | Flacos | Operating Systems | 5 | 11-08-2010 02:46 AM |
| Under system it wont show me if its 32 or 64 bit | Aramax | Operating Systems | 3 | 29-06-2009 07:24 PM |
| Show Your Name In the System Clock | Cadmus | Tips & Tweaks | 2 | 09-01-2009 12:39 AM |
| How do you show percent complete on the task form? | Phil | Microsoft Project | 1 | 17-09-2008 04:18 AM |