Solved

Inherited NumericUpDown control intermittently creates errors.

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

747 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