473,387 Members | 1,597 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

conversion to vb fails

TJS
when converting this to VB, the result fails , can anyone help ?

C#

private void CreateDayEffects(object sender,
System.Web.UI.WebControls.DayRenderEventArgs e)
{
e.Cell.Attributes["onmouseover"] = "this.style.backgroundColor='pink';";
if (Calendar1.DayStyle.BackColor != Color.Empty)
e.Cell.Attributes["onmouseout"] = "this.style.backgroundColor='" +
Calendar1.DayStyle.BackColor.ToKnownColor() + "';";
else
e.Cell.Attributes["onmouseout"] = "this.style.backgroundColor='';";
}
VB Private Sub CreateDayEffects(sender As Object, e As
System.Web.UI.WebControls.DayRenderEventArgs)
e.Cell.Attributes("onmouseover") = "this.style.backgroundColor='pink';"
If myCalendar.DayStyle.BackColor <> Color.Empty Then
e.Cell.Attributes("onmouseout") = "this.style.backgroundColor='" +
myCalendar.DayStyle.BackColor.ToKnownColor() + "';" Else
e.Cell.Attributes("onmouseout") = "this.style.backgroundColor='';" End If
End Sub 'CreateDayEffectsERROR Compiler Error Message: BC30452: Operator
'<>' is not defined for types 'System.Drawing.Color' and
'System.Drawing.Color'.Source Error: Line 65: Private Sub
CreateDayEffects(sender As Object, e As
System.Web.UI.WebControls.DayRenderEventArgs)
Line 66: e.Cell.Attributes("onmouseover") =
"this.style.backgroundColor='pink';"
Line 67: If myCalendar.DayStyle.BackColor <> Color.Empty Then
Line 68: e.Cell.Attributes("onmouseout") =
"this.style.backgroundColor='" +
myCalendar.DayStyle.BackColor.ToKnownColor() + "';"
Line 69: Else
Nov 18 '05 #1
0 1026

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

Similar topics

30
by: Tim Johansson | last post by:
I'm new to C++, and tried to start making a script that will shuffle an array. Can someone please tell me what's wrong? #include <iostream.h> #include <string.h> int main () {...
2
by: Maurice | last post by:
Folks once again I look forward to your invaluable assistance. When converting an Access 2002 mdb back to Access 1997 using the Access 2002 inbuilt tools I receive the following error message...
31
by: Bjørn Augestad | last post by:
Below is a program which converts a double to an integer in two different ways, giving me two different values for the int. The basic expression is 1.0 / (1.0 * 365.0) which should be 365, but one...
5
by: Gareth Parris | last post by:
Anyone know what the VB.NET equivalent of this C# statement is... byte segBody = (byte ) sqlReader.GetSqlBinary(3); Tried as hard as I could to do it in VB.NET but I cannot seem to do it.
2
by: Robert Magnusson | last post by:
Hi all, I have a healthy class defined that happily serializes and deserializes from the underlying XML file. The problem I hit is that, as soon as I add an implicit conversion in any of the...
5
by: Hayato Iriumi | last post by:
When converting a type to another using CType and if the type conversion fails, it throw an exception. However, in C#, there is a keyword "as" which only makes the variable Nothing (null) without...
9
by: Codemonkey | last post by:
Hi, Sorry for a stupid question, but is it possible to do a narrowing conversion with an object array with Option Strict On in VB? E.g: ------------------ Dim aBase as Base() = {New...
2
by: Arvid Requate | last post by:
Hello, I'd like to understand why the following code does not compile. It looks like a strangeness in connection with overload resolution for the <complex> header: The conversion operator...
6
by: Peter Lee | last post by:
what's the correct behaver about the following code ? ( C++ standard ) I got a very strange result.... class MyClass { public: MyClass(const char* p) { printf("ctor p=%s\n", p);
8
by: Smithers | last post by:
Are there any important differences between the following two ways to convert to a type?... where 'important differences' means something more profound than a simple syntax preference of the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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...
0
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,...

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.