|
That's in VB and I'm using C#, could you point me to something which is written in C#?
|
|
|
|
|
Read here about ComboBox using.
Best regards, Alexey.
|
|
|
|
|
|
Look here.
Enjoy !
Best regards, Alexey.
|
|
|
|
|
Hmm... The problem is that that is a regular ComboBox, and mine is a ToolStripComboBox, I think that's the problem. Because when I try to override the DrawItem method it says 'No suitable method found to override', even though I have defined my own.
|
|
|
|
|
There doesn't seem to exist a DrawItem event in a ToolStripComboBox. That means that there is no way to do what I want to.
|
|
|
|
|
|
i have serial jpeg codes, how to convert to bmp file?
And display bmp file?
|
|
|
|
|
Load them into a Bitmap object and then use the Save method. Yes it is as simple as that.
--------------------------------------------------------
My development blog
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
I don't understand that how to load jpeg code into a bimap object.
can you instantiate?;P
|
|
|
|
|
Everything you need is inside the Bitmap class.
Look it up on MSDN to see what methods are there for you.
--------------------------------------------------------
My development blog
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
using System.Drawing;
using System.Drawing.Imaging;
Image img=Image.FromFile(@"C:\image.jpeg");
img.Save(@"C:\image.bmp",ImageFormat.Bmp);
Graham
|
|
|
|
|
Can you convert this c# asp.net 2.0 html source code to vb.net please?
CssClass='<%# Eval("DepartmentID").ToString() == Request.QueryString["DepartmentID"] ? "DepartmentSelected" : "DepartmentUnselected" %>'>
|
|
|
|
|
it should be pretty similar
CssClass='<%# (DepartmentID.ToString() == Request.QueryString["DepartmentID"]) ? "DepartmentSelected" : "DepartmentUnselected" %>'>
Current blacklist
svmilky - Extremely rude | FeRtoll - Rude personal emails | ironstrike1 - Rude & Obnoxious behaviour
|
|
|
|
|
This does not work in vb.net.
May be there should be iif
|
|
|
|
|
Sorry, my bad I misread your post and thought you asked for this to be converted from VB to C# - i now see you wanted th other way round.
So maybe it should use iif which is does like:
iif(condition,trueResult,falseResult);
try:
CssClass='<%# iif(DepartmentID.ToString() == Request.QueryString["DepartmentID"],"DepartmentSelected","DepartmentUnselected") %>'>
Current blacklist
svmilky - Extremely rude | FeRtoll - Rude personal emails | ironstrike1 - Rude & Obnoxious behaviour
-- modified at 6:50 Friday 28th April, 2006
|
|
|
|
|
Yes, I am aware of the iif , but can not get the c# code to convert to vb.net
Thanks
|
|
|
|
|
VB uses = instead of ==.
---
b { font-weight: normal; }
|
|
|
|
|
is this ok?
CssClass='<%# (DepartmentID.ToString() = Request.QueryString["DepartmentID"]),"DepartmentSelected" : "DepartmentUnselected" %>'>
|
|
|
|
|
Where did iif go?
---
b { font-weight: normal; }
|
|
|
|
|
yes, I meant:
CssClass='<%# iif((DepartmentID.ToString() = Request.QueryString["DepartmentID"]),"DepartmentSelected" : "DepartmentUnselected") %>'>
Thanks
|
|
|
|
|
You never you colon to separate parameters for other functions. Why would you use it here?
---
b { font-weight: normal; }
|
|
|
|
|
May be it is best if you correct the whole code please.
Thanks
|
|
|
|
|
Did the extemely complicated change from a colon to a comma. Changed the brackets for Querystring to parentheses, as VB uses those.
CssClass='<%# iif((DepartmentID.ToString() = Request.QueryString("DepartmentID")), "DepartmentSelected", "DepartmentUnselected") %>'>
---
b { font-weight: normal; }
|
|
|
|
|
too late guffa posted the answer
Weve both given you different bits of this solution, but there comes a line where you must understand what you are writing, so that you learn. Its part of the learning curve that is learning how to program!
I'll give you another pointer, but i wont write the code for you this time.
The method you are trying to use is called iif . It takes three parameters. 1) The boolean condition to evaluate 2) the required return value if condition evaluates true 3) the required return value if condition evaluates false. These parameters are separated by a comma like this
iif(condition,trueValue,falseValue) .
The last code you posted had a incorrect character used to separate one of these parameters.
Now, that was a hell of alot of typing when i could have just given you the answer in 1 line... i hope you appreciate that!
Current blacklist
svmilky - Extremely rude | FeRtoll - Rude personal emails | ironstrike1 - Rude & Obnoxious behaviour
-- modified at 9:29 Friday 28th April, 2006
|
|
|
|