Nothing you have to be ashamed for, everybody started once and had also "small" problems.
Don't understand that!
i 'm having a tab control with three tabpages.in page1,three text boxes are there for each subject marks.all details will be stored in a file that is displayed in 2nd page.third is result page.if any of the entered value is less than 100 then the result page should show the candidate failed. that shud be displayed on a textbox.(txtresult.Text)
it s the problem.
I understood the question also at the first time.
But I asked 3 questions and you answered 0 of them.
So with no more information about your code, we will not be able to help you!
1) i debugged the code.when running no error is coming,jus not displaying the result.
2)code placed in
private void Txtresult_TextChanged(object sender, EventArgs e)
So, I would assume that the code is not executed because you are not changing the code of the result textbox.
You actually whant to write the result to the textbox.
I would think, you should place a button on the page and on Click you execute the code.
3)double.TryParse is not working.error comins as:
"no over load for method tryparse takes 1 arguments"
As you said you have .Net 2.0 you could also use the int.TryParse, but here is the way I would do it in .Net 1.1
if(double.TryParse(label.Text,NumberStyles.Integer, CultureInfo.CurrentCulture, out d))
I have a web archive file which I need to send as an email. I need to embedd the content in the mail body instead of sending it as an attachment.
I tried using chilkat.mht's loadFromFile(*.eml), it worked well for some files and it failed for some files. When the file contains images, it is sending them as attachments with empy email body.
I tried something like that.
First I tried with CellBeginEdit and CellEndEdit but the ComboBox control didn't appear (just it's editable box). Then I used CellClick and CellValidating. It worked, but I had to solve the "reentrant call" problem - finally I find the solution on the net.
I explained it here: Dynamically change DataGridViewTextBoxCell to DataGridViewComboBoxCell
how can i convert mm/dd/yyyy hh:mm date format to current computer date format.
i have date and time as string in xml file like 7/4/2007 4:48 PM now i need to match it with cuurent time i.e System.Datetime.Now() if the current computer date time format it like mm-dd-yyy hh:mm(which i am not sure can in any format) so i want to convert my datetime to current computer date time format. How can i achieve it. i am using framework 1.1
if my date time format is mm/dd/yyyy i.e in xml file and current computer date time format is mm-dd-yyyy can i convert my datetime string to new date time or is it that i have to parse individually year month date hour and minute and then compare
If you know the input format, you can parse it manually to get the date, month and year. With this, you can construct a DateTime object and convert it to whatever format you please using the ToString() method and its overloads. Alternatively, you could just build the date string you need using the date, month and year that you've extracted.
A word of advice - if you're exchanging data between different apps, the ISO format (yyyy-MM-dd) is the only sane thing to use.
I'm using the RKLib component for exporting the data to excel for quite some time. It's perfectly working fine for me till this time.
Recently I have used the same in another application which contains a dataset(C# appln.) having less than 5000 rows. The issue here is it is taking 1 hr to write it to excel. The dataset contains 30 columns and majority of them are of string data type. Is there any workaround for this so that it will be reduced to maximum 3 minutes. For this application the no. of rows may increase in future. In such a case, I cannot use this component.
Do you mean this[^] RKLib? If so, then the source is there so you could go over it with a fine toothed comb to see if there is anything slowing it down design-wise or if there are any modifications you can make to improve it's speed efficiency.
I haven't used that package before so personally I can't speak to its quality. Usually I recommend using the COM Interop[^] capabilities of MS Office to do Excel reading/writing but I've found that it isn't the best performer when it comes to time either.
It seems that you might have to just face the facts here - you're exporting 15,000 strings to an Excel sheet and that's going to take some time no matter what tools you use to do it.
Look at it this way: it takes about an hour for your app to push that dataset into an Excel file, how long would it take to do it manually? If if your app takes an hour, you're still probably getting some pretty nice time savings
I'm developing a multi-player game in C#. Player A hosts a "game room" and creates a game object. Then players B and C gain remote access to that object over a TCP connection. (Assume everyone knows everyone else's IP address). My issue is that player C's UI needs to be updated when player B calls a function on the remote game object. When the program tries to register player C's handler onto the game object's event, I get an exception telling me that my security settings are too low for deserialization.
(Specifically: Type System.DelegateSerializationHolder and the types derived from it (such as System.DelegateSerializationHolder) are not permitted to be deserialized at this security level.)
The message suggests using security certificates to get around all this, but I don't know how this is done. Can someone instruct me on how to get this working? I would really rather not have the host player have to gain remote access to each other play so it can call some "updateUI" function on each player.
Hi there! I'm an amateur programmer doing a "for fun" project, and am looking for some helpful advice. I'm trying to make a terminal emulator that can emulate ANSI (ANSI X3.64, aka pretty colors in a telnet session) for the purpose of connecting to old BBS software and playing the games of my youth. I already have the Telnet part nailed thanks to a fine article from this site, but the ANSI emulation is starting to look pretty daunting.
My question: Is the best way to do this to use the TextBox component? Changing text color is no problem, but ANSI has escape sequences to move the cursor around, and most BBS software uses them heavily. For instance, if I encountered an ANSI sequence that means "move the cursor to row 3, col 10, and print the letter A", I'm not sure what the "right" way to do that in a TextBox would be. The best way I can think of is to pre-populate the TextBox.Text string with enough spaces to fill the screen, and then replace the character at position ((number of columns on the screen * 2) + 10) of the string, but that seems hideously inelegant.
Alternately, is there some other component that would be better suited to this? Should I be leveraging existing ANSI support from somewhere, like ANSI.SYS? Any suggestions are welcome, and thanks in advance.
I tend to use TextBox only for single-line or few-lines stuff.
For an editor or a terminal, I would choose between:
- a Panel, i.e. doing it all myself (data structures, paint handler, etc)
- a ListBox
although I admit you can do it with a TextBox too.
the advantages of ListBox are:
- treats lines as separate objects; this is both easy to use and fast (TextBox concatenates
all text lines to a single string)
- knows how to draw a line of text (but also supports user drawing)
- scrolling could mean: remove topmost text line, add new text line at bottom (so make
sure to never hold more than 25 lines)
- emulating terminal with buffer larger than display height is free: use vertical scrollbar
(keep the LB 25 lines high), and let it scroll when more lines have been added to it