473,607 Members | 2,703 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Object type cannot be converted to target type

I got this error "Object type cannot be converted to target type" in my VB
Winforms application. When I click on it, it goes no where, how do I
troubleshoot this? Thank you.
Nov 21 '05 #1
3 3122
You'll have to post some code.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.

"news.microsoft .com" <As******@hotma il.com> wrote in message
news:e0******** *****@TK2MSFTNG P15.phx.gbl...
I got this error "Object type cannot be converted to target type" in my VB
Winforms application. When I click on it, it goes no where, how do I
troubleshoot this? Thank you.

Nov 21 '05 #2
I don't know where the problem is since it does not point there, instead it
point to the 1st line of the .vb file, the file is 2k long which I don't
think anyone want to read it.

"Bob Powell [MVP]" <bob@_spamkille r_bobpowell.net > wrote in message
news:%2******** ********@tk2msf tngp13.phx.gbl. ..
You'll have to post some code.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.

"news.microsoft .com" <As******@hotma il.com> wrote in message
news:e0******** *****@TK2MSFTNG P15.phx.gbl...
I got this error "Object type cannot be converted to target type" in my VB
Winforms application. When I click on it, it goes no where, how do I
troubleshoo t this? Thank you.


Nov 21 '05 #3
try changing the exception handling behviour to see if you can localize
the problem

CTRL+ALT+E to show the exceptions screen

select the, 'Common Language Runtime Exceptions'

Change the, 'When the exception is thrown' setting to, 'Break into the
debugger'

This should bring you to where it is occurring. Hopefully.

If you are getting lots of exceptions (this will break even on handled
exceptions) then try to change the setting just before you invoke the
functionality that causes the error.

Alan.

Nov 21 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
25403
by: sneill | last post by:
How is it possible to take the value of a variable (in this case, MODE_CREATE, MODE_UPDATE, etc) and use that as an object property name? In the following example I want 'oIcon' object to have the properties: mode1, mode2, and mode3. This seems simple but I can't quite figure it out... Any ideas anyone?
3
1525
by: Michael Stahl | last post by:
What I want to do: I want to have a class which is reading an .ini file and manipulate the application with the data from the ini file. What I have now: An ini file: Text=Hallo Dock=none
2
5324
by: Paul Tomlinson | last post by:
I am trying to call a delegate on my parent from a child thread, this is my code, however i'm getting an exception "Object type cannot be converted to target type." which I can't understand. The prototype for my delegate is: public delegate void ExceptionDelegate( object o ); // called from all child threads This is the offending code. Can anyone shed any light please? if( myParent.InvokeRequired )
0
1561
by: Dica | last post by:
i'm getting an error when trying set my dataAdapter's selectCommand. the sqlStatement is a storedProc which takes parameters, so it's constructed as: sqlSelectCommand1.CommandText = ""; sqlSelectCommand1.CommandType = System.Data.CommandType.StoredProcedure; sqlSelectCommand1.Connection = sqlConnection1; sqlSelectCommand1.Parameters.Add(new
4
4171
by: Barry | last post by:
object type cannot be converted to target type - i am getting this error message occuring numerous times in my task list, my project compiles and runs ok but it is a nuisance, I think Ihva eheard of this before but I cannot remember the solution, anybody got any help?
5
2135
by: Martin Robins | last post by:
I know that this has been asked before; and not only that, I know that it has been answered (successfully) as I myself have previously resolved the problem (with help) - however, I cannot for the life of me remember what the solution was. I am trying to send an email from an ASP.net application. If I send the email with the MailMessage.BodyFormat = MailFormat.Text then it sends fine; if I set MailMessage.BodyFormat = MailFormat.Html then I...
16
2887
by: anonymous.user0 | last post by:
The way I understand it, if I have an object Listener that has registered as a listener for some event Event that's produced by an object Emitter, as long as Emitter is still allocated Listener will stay alive. Is this correct? If this is correct, I've got a problem. Let's say I've got an object Customer that has an PurchaseList (Collection) of Purchase objects. Now, these Purchase objects were pulled from a datasource Datasource. The...
2
1856
by: Dabbler | last post by:
I'm getting the following error when I try and insert a row using FormView, ObjectDataSource and stored procedure. The form has 40+ columns on it and I'm not sure how to diagnose where the problem is, the data object class, the business class etc? Object of type 'System.Int32' cannot be converted to type 'System.String'. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack...
0
1275
by: Pablo.Mazaeda | last post by:
Hello, I am getting the following error when opening a form with customs controls objects in Visual Studio 2005 environment. I assume it is a version problem or something. Any solution? Object of type 'AMOSReplicationClient.InstStatus' cannot be converted to type 'AMOSReplicationClient.InstStatus'.
0
8049
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
7985
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8469
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8463
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8128
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
5471
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3953
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2461
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1574
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.