473,666 Members | 2,165 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

System.InvalidC astException Error when running code

In the below code exact line If _graphicScreenS hots(intloop) =
"Summary" Then....... I get an error message

Overload resolution failed because no Public '=' can be called with
these arguments:
'Public Shared Operator =(a As String, b As String) As Boolean':
Argument matching parameter 'a' cannot convert from 'Bitmap'
to 'String'.
Code:

//
*************** *************** *************** *************** *************** *************** *************** *************
Private Sub AddSummaryInfor mation()
If _graphicScreenS hots.Count 0 Then
Dim intloop As Integer
For intloop = 0 To _graphicScreenS hots.Count - 1
If _graphicScreenS hots(intloop) = "Summary" Then

Dim transaction As
System.Componen tModel.Design.D esignerTransact ion =
host.CreateTran saction("Drop Field")
Try
Dim report As
DevExpress.Xtra Reports.UI.Xtra Report = reportDesigner. RootReport
Dim tmpPicBox As
DevExpress.Xtra Reports.UI.XRCo ntrol =
DevExpress.Xtra Reports.Design. FieldDragHandle r.CreateXRContr ol(GetType(XRPi ctureBox),
reportDesigner. RootReport.Band s(DevExpress.Xt raReports.UI.Ba ndKind.Detail),
New System.Drawing. Point(0, 0), Nothing, reportDesigner. SnapToGrid,
reportDesigner. GridSize)

With CType(tmpPicBox , XRPictureBox)
.Image = _graphicScreenS hots(intloop + 1)
.Sizing =
DevExpress.Xtra Printing.ImageS izeMode.Stretch Image
.Tag = "Summary Graphic"
End With

myNC.ControlNam e = "picSummary "
AddToContainer( host, tmpPicBox)
Catch ex As Exception
_TListener.AddM ethodError(ex)
Finally
transaction.Com mit()
End Try

Exit For
End If
Next
End If
End Sub

May 30 '07 #1
1 3448

Hi,

Presumably _graphicScreenS hots is an array of bitmaps? You can't compare a
bitmap to "string".

Robin
May 31 '07 #2

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

Similar topics

4
4913
by: Ram | last post by:
I am running a test web site on my own Win2k professional computer. I have a VB6 COM component (running on COM+) on a seperate application runnint as "Server". When running an ASP.NET page calling this component, it works fine, but When I try and debug the Com+ process using the VB6.0 IDE, I get the following error: "Exception Details: System.InvalidCastException: QueryInterface for interface MyObject._MyCls failed." When I the same...
3
8227
by: karunakar | last post by:
Hi All Here iam getting this Error "Specified cast is not valid." My Project has Onc solution diffrent class libarary In that solution DALfactory solution iam getting this error I was calling this function in DALFactory class library(this library generate the DAL.dll) Another class library has this function public SecurityInfo Login(string username, string password) {
1
4881
by: Hifni Shahzard | last post by:
Hi, I got a stored procedure, where it returns a value. But if I execute it. It gives an error as "Invalid cast from System.Int32 to System.Byte.". To make clear how do I execute this, below I'm specifiying my code: The Code used in Visual Studio: Function GetRank(ByVal ID As Integer, ByVal Comp As String, ByVal Sec As String, ByVal iDate As Date) As String 'Dim Ret As Integer
4
2654
by: DOTNET | last post by:
Hi, Anybody help me regarding this error: I am assigning the values to the session variables when the button is clicked and passing these session variables to the next page and when I am printing these session variables they are printing. After that I am assigning these things in hidden object and in the form submit action I am receiving these hidden values like the following:
2
4721
by: Michael | last post by:
Hello all and thanks in advance, I'm running a vb.net program and part of it copies files from one server to another. It generally works fine but once in a while I get this error: System.InvalidCastException: QueryInterface for interface Scripting.IFileSystem3 failed.
1
18170
by: Marc | last post by:
Hi! I'm working with a C# client that calls a php web service. I've created a wrapper to call the service using .NET wsdl tool (adding a web reference). The call to the server works fine, it is serialized correctly, and the server returns a response (I've captured the response and it's correct!) but when the .NET deserialize this response, it throws the exception "System.InvalidOperationException: There is an error in XML
8
5759
by: =?Utf-8?B?YXVsZGg=?= | last post by:
i trying to collect windows services. i'm getting inconsistencies. the collection works every time locally. but remote collection yields different result depending on my lab environment. 1) in the same domain i start the collection on the remote machine i can get some 19 services without a problem then it will fail with: 'wmiService.ClassPath' threw an exception of type 'System.InvalidCastException'
4
1842
by: rsdev | last post by:
Hi, I have an InvalidCastException which is completely puzzling me. I have checked all the members in the stored procedure against my data provider and seems to be ok. Also in the stack trace it says ProcessRequestMain... +3742?? Here's the error; Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in...
6
4969
by: dgleeson3 | last post by:
Hello All I have VB code (.Net 2005) reading from an SQL server 2005 database. Im getting InvalidCastException when doing reader.GetInt32(0) Im simply reading an int from a simple database. It has two columns, User and Tel number. User is filled with 1,2,3 and tel number has 3 telephone numbers. The User data column is specified as (PK, int, not null) in MS SQL
2
2500
by: thithi | last post by:
Server Error in '/Assignment' Application. -------------------------------------------------------------------------------- Specified cast is not valid. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.InvalidCastException: Specified cast is not valid. Source...
0
8878
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
8785
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...
0
8644
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7389
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6200
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5671
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();...
1
2776
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
2
2012
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1778
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.