|
Before you can set properties on a nullable rectangle you have to initialise it. It is also best practice to test the HasValue property before setting properties of the value, though not needed at this point.
Rectangle? m_RectangleShape = new Rectangle?();
m_RectangleShape.Value.X = ValueType;
If you have knowledge, let others light their candles at it.
Margaret Fuller (1810 - 1850)
www.JacksonSoft.co.uk
|
|
|
|
|
I have drawn a graph where at the moment the X points for the bars (drawn using boxes) is draw using numbers, but I now need to draw it using time. Im drawing boxes using a class. It is written in C# opengl.
public void DrawBox(float p_X1, float p_X2, float p_Y1, float p_Y2, float p_R, float p_G, float p_B)
{
X1 = p_X1;
X2 = p_X2;
Y1 = p_Y1;
Y2 = p_Y2;
R = p_R;
G = p_G;
B = p_B;
//Take the values passed in by the constructor
Gl.glBegin(Gl.GL_POLYGON);
Gl.glColor3f(R, G, B);
Gl.glVertex2f(X1, Y1);
Gl.glVertex2f(X2, Y1);
Gl.glVertex2f(X2, Y2);
Gl.glVertex2f(X1, Y2);
Gl.glEnd();
}
Thanks
|
|
|
|
|
Hi there,
Im working a web browser automation project. There is an ajax controlled dropdown list in a web site.
It was like this;
<option value="test1">test1</option>
<option value="test2">test2</option>
<option value="test3">test3</option>
<option value="test4">test4</option>
<option value="test5">test5</option>
When i was selected test2 ajax is working and its giving another div. (I need this div)
I use this codes;
webbrowser1.Document.GetElementsByTagName("select")[0].Document.GetElementsByTagName("option")[1].SetAttribute("selected", "selected");
Its only changing attribute and for this reason it doesnt working ajax.
How can i select option 1?
Thanks.
|
|
|
|
|
Try this:
webbrowser1.Document.GetElementsByTagName("select")[0].InvokeMember("index", 0);
|
|
|
|
|
Sorry, it doesnt working.
I can try a lot of thing but i cant work it.
|
|
|
|
|
And this one:
Object[] args = new Object[1];
args[0] = (Object)"0";
HtmlElement elem = webbrowser1.Document.GetElementsByTagName("select")[0];
elem.InvokeMember("index", args);
|
|
|
|
|
Thank for your replies. But i cant run your codes.
You can be try yours method in this pages (http://fatihunal.somee.com/default.aspx) via a web browser object.
Please click test3 from option box via a web browser object. In this way you will see the problem.
Thanks.
|
|
|
|
|
Yes, at last end i have done it.
webbrowser1.Document.GetElementsByTagName("select")[0].Document.GetElementsByTagName("option")[2].SetAttribute("selected", "selected");
webbrowser1.Document.InvokeScript("__doPostBack");
Its working perfectly.
Thanks for all.
|
|
|
|
|
Hi everyone
I developed a software but somehow (by mistake to be honest) in the beginning I used MS SQL Compact Edition
the system works fine, but I know that compact edition is very limited than Sql Server 2005
According to my algorithm, every entered record creates several tables.
This works good.
But I'm a bit nervous about latter stages
Does this Compact Edition has a table cap?
for example, after 5000. table created, does the DB gives an error like "DB table quantity limit reached" or sth like that?
I know it sounds ridicilous but I've encountered numerous ridicilous errors since I started this project
modified on Monday, November 16, 2009 8:00 AM
|
|
|
|
|
|
Hi,
I've been googling a long time about this, so I thought you peeps might have an answer for me.
I have a application which has been written in .net1.1 a long time ago. I ported that application to .net2.0 (one step at a time ) and left the code the same as much as I could. Everything works, except one thing which I cannot figure out why not.
I have this service, which is listening on a port on the same server as the client runs on. My client in this case is a configuration editor with some basic functionality like getting the time the last synchronisation ran etc.
The service is called the StatusPublisher.
I initialize the the publisher object for use with this call:
*****.IStatusPublisher publisher =
(*****.IStatusPublisher)Activator.GetObject(typeof(*****.IStatusPublisher),
string.Format("tcp://localhost:{0}/StatusPublisher", servicePort));
This is the call which works in .net1.1 but fails in .net2.0:
string returnValue = publisher.NextRun (serviceId);
This call locks up the complete config-tool, kinda forever (killed it after 50 minutes). I had a logging step between every code block, but the logger before the publisher.NextRun() logged fine, everything after was a complete lock up.
Any idea why I can instantiate the publisher object but cannot call a method from it?
The consumer isn't a moron; she is your wife.
modified on Monday, November 16, 2009 7:41 AM
|
|
|
|
|
I can't help you there. I Have search on MSDN and can't find any info on IStatusPublisher. I only can presume that it is not shipped with .Net Framework. If you or your own company is author, then investigate, or contact a technical support on official forum or to author/company
|
|
|
|
|
It's one of our own clases which is an class implementing MarshalByRefObject. It's actually quite the same as MarshalByRefObject only adding some methods.
internal class StatusPublisher : MarshalByRefObject, *****.IStatusPublisher
{
public string NextRun(string serviceId)
{
}
}
Thing is, I can load this class, but I cannot call the methods on it. So it must go wrong higher up the chain, which is .Net code I think.
The consumer isn't a moron; she is your wife.
|
|
|
|
|
have you tried removing Internal keyword?
Or tried add public in front of class?
Is this class a DLL?
Helfdane wrote: Thing is, I can load this class, but I cannot call the methods on it
When you set your debugger, in Quick watch can you use method or what kind of error will throw?
|
|
|
|
|
hw to display context menu on clicking datagrid cell?
|
|
|
|
|
Add a context menu to your form and set the ContactMenu property of the grid to point to your menu.
If you have knowledge, let others light their candles at it.
Margaret Fuller (1810 - 1850)
www.JacksonSoft.co.uk
|
|
|
|
|
ContactMenu or ContextMenu ?
|
|
|
|
|
i have a problem with the part that recharges and rating when calling of the pay phone.i 'll appreciate your contribution in c# or nedbeans . please help!!! the project is due 27 November 2009. please...
|
|
|
|
|
You need to explain what it is you are trying to do, and what your problem is.
No one will write it for you, but if you have specific problems people will be happy to guide you to the answers.
Post some details of the bit you are stuck on.
Simon
|
|
|
|
|
i do not know c# but i know c++. we are given this project to challenge the we as students. so i need to find the code that recharge the pay phone when you enter the pin voucher then show you the amount you have been charge with
. and as you enter the phone number should establish the connection. i mean just like the mobile phone.
|
|
|
|
|
Bokang Selialia wrote: so i need to find the code that recharge the pay phone when you enter the pin voucher
Sorry, like I said, no one can help you without a proper description of of the problem, and no one is going to just write all the code for you.
Try and do it yourself and the ask specific questions when you get stuck.
Simon
|
|
|
|
|
Bokang Selialia wrote: i do not know c# but i know c++.
Then this should be very easy.
Bokang Selialia wrote: and as you enter the phone number should establish the connection
So you need to write code to actually recharge a real phone and make real phone calls ? Or do you mean a simulation ? If the latter, you can't know C++ very well if you can't do it. Either way, you're refusing to post code, which means we can't really help you with it.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Bokang Selialia wrote: phone.i 'll appreciate your contribution in c# or nedbeans . please help!!! the project is due 27 November 2009. please...
Some observations
1 - if you think we can correct your code without seeing it, you give us too much credit
2 - we don't care when your homework is due. That's your problem. You've been given the resources needed to do it, and it sounds like a trivial task. If you were to post code and a specific question, someone might decide to help if it seems like you need a little bit of advice. But what you posted is utterly worthless, because we're not going to do your homework for you, and we can't correct code we can't see.
What sort of course lets you choose between C# and 'nedbeans' ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Bokang Selialia wrote: the project is due 27 November 200
11 days and ticking, if your teacher has any regard for comments, organization, proper coding I'd say you're as close to failing as you're going to be, well, you know, not including the point at which you actually fail.
|
|
|
|
|
So you have a choice between C#, which is a language, and nedbeans which is an IDE. Not very clever. C# or Java then maybe.
Bet you get the same enthusiasm to help from a Java forum.
Eleven days to go is a poor show when you are still undecided what language to use. Better get cracking if you still care about passing.
When you decide and hit a code problem I'm sure many people will be far happier to assist.
If you have knowledge, let others light their candles at it.
Margaret Fuller (1810 - 1850)
www.JacksonSoft.co.uk
|
|
|
|