Solved

Inherited NumericUpDown control intermittently creates errors.

Posted on 2008-10-28
2
384 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
  • 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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Suggested Solutions

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

932 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now