|
Dagnabit! Now I have to add a Nullity property to my Rational class.
|
|
|
|
|
Thanks Simon,
So, the conclusion is since float has infinity value, there is no exception, but since int does not have infinity value (only has max/min value), exception will occur?
regards,
George
|
|
|
|
|
Thanks Guffa,
I think your reply makes senses. Int only has max and min value, no infinite value, but float has, right?
regards,
George
|
|
|
|
|
Only Chuck Norris can divide by zero.
cheers,
Chris Maunder
CodeProject.com : C++ MVP
|
|
|
|
|
[chuckle] Chris himself making CN jokes in the programming forums.
Cheers,
Vikram.
The hands that help are holier than the lips that pray.
|
|
|
|
|
Hi
iam in windows application using c#.
my database is "FireBird Database".
Database path is :
string dsRelativePath = "database\\absolutemedia.fdb";
string dsAbsolutePath = Path.GetFullPath(dsRelativePath);
string ConnectionString = "ServerType=1;User=SYSDBA;Password=masterkey;Database=" +dsAbsolutePath;
//Code for upload image
OpenFileDialog opn = new OpenFileDialog();
opn.Filter = "JPEG|*.jpg|GIF|*.gif";
opn.ShowDialog();
if (opn.FileName.Length > 0)
{
this.IMG = Image.FromFile(opn.FileName);
browsetext.Text = opn.FileName;
this.resizeHeight = 240;
this.resizeWidth = 320;
IMG = this.resizeImage(IMG, new Size(resizeWidth, resizeHeight));
imagebox.Image = IMG;
}
This path is working fine upto now..
but in my application, i have an option to upload images from local drives..iam browisng an image thru "OpenFileDialog".. after selecting an image .when iam going to save ,
database path i,e dsAbsolutePath is changed to image path.it's giving error in database connection...
Error---"I/O error for file CreateFile (open) "C:\Documents and Settings\All Users\Documents\My Pictures\Sample Pictures\database\absolutemedia.fdb"
please reply where the problem is ?
how can i rectify this .
murali krishna
|
|
|
|
|
Dear all
using Visual C# how could i making function running every 2 minutes in background of specified form by itself and must be in asynchronous mode
like checking the price of currencies or doing something inside database
thanks for all
MFC programmer
|
|
|
|
|
Use a Timer.
But remember the timer elapsed events get triggered on a different thread, so you'll need to do an Invoke call if you want to work with any GUI objects.
Simon
|
|
|
|
|
thank u sir
i have done manythings like:
using the background control to operate database processes
and used timer whith specific time interval to run the background asynchronously
best regards
modified on Thursday, April 24, 2008 5:52 AM
|
|
|
|
|
I was wondering...
There's a SendKeys function to send keys...
What about a SendClick(x, y); function?
Does one exist, that I just don't know about?
(I'm trying to avoid messy DllImports )
|
|
|
|
|
Not sure if it's exactly what you want, but my guess is you wanna click a particular button. Is myButton.PerformClick(); what you're looking for?
He who makes a beast out of himself gets rid of the pain of being a man
|
|
|
|
|
Oh Cool!
Was more looking for MouseClick(x, y); for automation purposes, but WOW! That's useful!!!
Just wondering why it works in normal windows forms, but not with ASP.NET Buttons :p
|
|
|
|
|
I got this script for reading session values using Javascript
code>var color='<%= Session("color").ToString() %>'
But my requirement is to store Session values using Javascript.Can any one plz tell me how to do it ?
Thanks in Advance
|
|
|
|
|
I think u cannot assign a session using javascript that's coz session is set at server side for particular client..however u can retrieve the value from session which u have done...
Also u have posted in the wrong forum javascript in C# ?????
.....
|
|
|
|
|
Oke i feel like an major idiot for asking but i'll ask it anyway,
I've for an multible forms,
and i want when i press an key it switches to another form i created,
i was looking over the coding and i tought
Application.ActiveForm would do the trick but it doens't
So what does??
thanks in advance
Ben
|
|
|
|
|
are you looking on form.show()?
|
|
|
|
|
Exually what i have are 6 forms,
and 6 buttons
what i'm looking for is :
button 1 > form 2 + backbutton
button 2 > form 3 + backbutton
button 3 > form 4 + backbutton
button 4 > form 5 + backbutton
button 5 > form 6 + backbutton
button 6 > form 7 + backbutton
button 1 when pressed opens form 2 ect.
that works with form.hide(); ? and form.show(); ?
|
|
|
|
|
I tryed to use
Form.ActiveForm.Hide();
Form2.ActiveForm.Show();
but that trows System.NullReferenceException was unhandled
|
|
|
|
|
You need to create an instance of the form you wish to show/hide, that's the exception you're seeing.
He who makes a beast out of himself gets rid of the pain of being a man
|
|
|
|
|
so i need to create 6 instanses, cause i got 6 forms?
|
|
|
|
|
yes. example,
form1 f1 = new form1()
f1.show();
hope this help you
|
|
|
|
|
it does thanks
|
|
|
|
|
Alternatively you could create user controls, one for each form you need, and populate them with the components that you need for each form and then use just one form in which you show one of the user controls and then switch it for another. This way the user controls works like different views in the same form.
/Ruben
RJJournal
|
|
|
|
|
For a project which I soon have to be involved in, we are looking to implement a graphic intensive application, but balk at using either MDX 1.1 or XNA to access the DirectX libraries. However, the development platform has to be C#. Is there any way to get to the DirectX libraries (and how on earth do use them) directly, through unmanaged calls?
|
|
|
|
|
Extrakun wrote: through unmanaged calls?
You could do, but then you'd only be doing what MDX does anyway.
Unless you are an expert at unmanged DirectX don't use it; it'll take you longer to write, be less managable, and won't really be much quicker. From personal experience it took me getting on for 100 lines of code to get keyboard input in unmanaged DirectX and 3 in managed.
On a final note, the extra cost of development will more than offset the cost of a new graphics card for the whole company if it's of any real complexity.
|
|
|
|