?
Solved

Inherited NumericUpDown control intermittently creates errors.

Posted on 2008-10-28
2
Medium Priority
?
388 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…
Suggested Courses
Course of the Month9 days, 1 hour left to enroll

764 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