Solved

Inherited NumericUpDown control intermittently creates errors.

Posted on 2008-10-28
2
387 Views
Last Modified: 2013-12-26
I have written a VB program in Visual Studio 2008 - for mobile devices.

The program required a NumericalUpDown control, which I found, but the compact framework version doesn't support the .Select method like the full framework does. Therefore, I found this work-around, which works absolutely fine: http://blog.markarteaga.com/CommentView,guid,85271d7d-14a1-41dd-8469-d230a4e609cf.aspx which basically inherits the control and PInvoke SendMessage in coredll.dll does the text select.

 The problem I have is that every so often, with no seaming pattern to it, Visual Studio puts:

CType(Me.txtIncrementValue, System.ComponentModel.ISupportInitialize).BeginInit()

at the beginning and:

CType(Me.txtIncrementValue, System.ComponentModel.ISupportInitialize).EndInit()

at the end of my form's InitializeComponent sub.

This causes a few different errors, but basically prevents the form/app from then loading. All I do is remove these lines or comment them out and then it's fine again for the next few compiles until it feels like messing me around again.

Any ideas either why it feels it need to puts these lines in, or how I can stop it falling over if they remain?

One of the errors I get is:

{"Message text unavailable.  Resource file 'Microsoft.VisualBasic resources' not found."}

Trace:
"   at EskiMobile.My.MyProject.MyForms.Create__Instance__[T](frmMain Instance)\r\n   at EskiMobile.My.MyProject.MyForms.get_frmMain()\r\n   at EskiMobile.frmMain.Main()\r\n"

Unfortunately the site no longer is accepting comments, so I cannot go back there to ask the question.
0
Comment
Question by:JedNebula
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 1

Author Comment

by:JedNebula
ID: 22848526
Here is a screenshot - in case it helps.
InvalidCast.jpg
0
 
LVL 1

Accepted Solution

by:
JedNebula earned 0 total points
ID: 22857687
Found the answer in the end. I had to Implement System.ComponentModel.ISupportInitialize
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

690 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question