|
I want multiple equation in any Textbox like plus ,minus , multiply, Subdivision
Example: 4+9-5*12/3=32, How it possible ?
|
|
|
|
|
You need an Eval-function.
Have a look at this article:
C# Eval Function[^]
You can also write an eval function on your own, this will include parsing, buildung a syntax tree etc.
Regards
Sebastian
|
|
|
|
|
you mean that you need to generate the result of your equation in your text box after you type "=" sign???
Have a Happy Coding.....
|
|
|
|
|
I add different controls like RadioButtons, CheckBoxes, text boxes, labels, in the controls collection of a windows form at run time to render different Question and their options to generate a Questionare. now i want to read these controls one by one to store data from selected controls(radiobuttons, checkbox). but iam failed to do so.
PLZ help me how i read these controls at run tome, in windows application.
|
|
|
|
|
when you create and add the controls to the form you should be giving them a name...
TextBox1.Name = "TextBoxQuestion1";
then you can access if with...
Form1.Controls["TextBoxQuestion1"].Text;
or...
TextBox tbq1 = (TextBox)Form1.Controls["TextBoxQuestion1"];
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
Hi,
How can i create a folder in ftp from windows application?
Thankyou
YPKI
|
|
|
|
|
|
Hi
I would like to save System.Windows.Control.Image to a .bmp file.Any solutions please?
Thanks in advance
Bharti
|
|
|
|
|
You can't. You'd need a Bitmap for that ( which you can use as an Image, it's derived from the Image class ), then you can use the Save method.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
Hi Cristian,
I agree with you that we need a bitmap, , but to that I need System.Drawing.Image to pass to the constructor, and not System.Windows.Control.Image .
I was not able to typecast as well. Any suggestions pls.
Thanks
Bharti
|
|
|
|
|
obj is type of "System.Windows.Controls.Image"
System.Windows.Controls.Image myImage = ((Image)obj);
System.Windows.Media.Imaging.BitmapImage bitmapImage = new System.Windows.Media.Imaging.BitmapImage();
bitmapImage = ((System.Windows.Media.Imaging.BitmapImage)myImage.Source);
System.Windows.Media.Imaging.PngBitmapEncoder pngBitmapEncoder = new System.Windows.Media.Imaging.PngBitmapEncoder.PngBitmapEncoder();
System.IO.FileStream stream = new System.IO.FileStream(@"C:\newImage.png", FileMode.Create);
pngBitmapEncoder.Interlace = PngInterlaceOption.On;
pngBitmapEncoder.Frames.Add(System.Windows.Media.Imaging.BitmapFrame.Create(bitmapImage));
pngBitmapEncoder.Save(stream);
stream.Flush();
stream.Close();
Have fun
|
|
|
|
|
Hi,
I am using String Array i split one and i got the result but now i am trying to split it again for more requirements as i spited again i got two line only, I need every single word,
Now tell me please what should i do for that once i spited it and got my result but second time it is displaying only two lines not every single word.
|
|
|
|
|
can u b a little more specific, wat is that u require,Is that u need all the words from a string
Eg:if string is "India is my country", u need result in an array with values {India,is,my,country}.
Is this ur need
|
|
|
|
|
Yes, but I am trying to make it more specific
Suppose I have data of A to Z letters which i split it and got one letter like S from A to Z....
Now as i got S then I did split it again and i got two line only which is S on 0 line and remaining are on line 1.
Now i want to split only line which contains all letters without S.
I think this description will make it easy to understand.
This is what i am trying to do if you are get my points then do replay please...
|
|
|
|
|
Sajjad Leo wrote: I think this description will make it easy to understand.
Hmm, not really. Could you provide a sample?
|
|
|
|
|
I have one mother arraylist which contains no. of arraylist whose count is dynamic.
All childArrayList contains string values. I have to get all unique combinations for all the values in all arraylist.
If motherArrayList contains 4 arraylist, then length of combination string should be 4.
modified on Wednesday, April 1, 2009 2:59 AM
|
|
|
|
|
Use a random number generator to generate positions out of the number of elements remaining, and hten each time, pull out that one value and put it in your new, random list.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
Hello Friends and Programmers,
thanx for taking interest in my question. Actually, I want to edit the Windows Registry using C# Console application. But, I know that I have to take the System namespace as System.Win32, but what is the other piece of code. I am likely to change the ValueData from default 400 to 100 of MenuShowDelay under the following registry path : HKEY_CURRENT_USER/Control Panel/Desktop/MenuShowDelay. This edit will speed up the up the Listing of menu in the System. Please help me!
Hope to hear from u guys soon,
Rajdeep.NET
|
|
|
|
|
Registry.CurrentUser.CreateSubKey("Control Panel\\Desktop\\MenuShowDelay").SetValue("Value1", "Value2");
Enjoy.
var question = (_2b || !(_2b));
|
|
|
|
|
|
As a followup, remember value2 is of type object, so it does not have to be a string.
With some settings, as you mentioned, you might need to use integers, floats, booleans or other object types.
var question = (_2b || !(_2b));
|
|
|
|
|
Hi friends,
i have a txt file containing email id's like
test.txt
asdf@gmail.com
qwer@gmail.com
zxcv@gmail.com
when user imports test.txt file i want to get the all email id's by comma seperated value... using c#
asdf@gmail.com,qwer@gmail.com,zxcv@gmail.com ....
like this
how can i??
help me plzzz...
icanmakeiteasy
|
|
|
|
|
string[] emails = File.ReadAllLines(@"test.txt");<br />
StringBuilder stringBuilder = new StringBuilder();<br />
foreach(string email in emails)<br />
{<br />
stringBuilder.Append(email);<br />
stringBuilder.Append(",");<br />
}<br />
File.WriteAllText(@"newtext.txt", stringBuilder.ToString());
|
|
|
|
|
thank you... its working
and if the mails are separated by space like this
test.txt
asdf@gmail.com qwer@gmail.com zxcv@gmail.com
now can i get them by comma separated mails...
thank you
icanmakeiteasy
|
|
|
|
|
just change "," with " ".
|
|
|
|