|
I never thought about doing that and it worked perfectly, and was extremely simple. Thanks!!!
|
|
|
|
|
Try this.
using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;
namespace Assistant
{
class Program
{
static void Main(string[] args)
{
ArrayList al = new ArrayList(4);
al.Add("Val1");
al.Add("Val2");
al.Add("Val3");
al.Add("Val4");
int iListLen = al.Count;
for (int i = 0; iListLen > i; i++)
{
if (al[i].ToString() == "Val3")
{
al.RemoveAt(i);
break;
}
}
}
}
}
|
|
|
|
|
Thanks for your help too
|
|
|
|
|
How to read an exact character from text file
Example:line 2 char 15
I have Visual Studio 2003
sr.Read()[15]; is not the correct sollution
Vasildb
|
|
|
|
|
I would imagine you would have to parse the file to find the second line, then offset from the start of the second line to find the 15th character. Some text representations use multibyte character encoding so it may not be a 15 byte (or 30 byte) offset because each character can have a different length to the next one.
|
|
|
|
|
You, or somebody else already asked this question a couple of days before...
Is this homework?
V.
Stop smoking so you can: enjoy longer the money you save.
|
|
|
|
|
Not only is it most likely homework, but the other guy was on the ball, and asked immediately. This person seems to be a slacker that waits for the last minute.
|
|
|
|
|
i am using the progressbar control to show the progress of the sound file
how could i do that?
thank u
abdelhameed81
|
|
|
|
|
According to your first sentence, you already are!
|
|
|
|
|
Get the time that it will take for the sound file to complete - set the max value of the progress bar to this, and then every second (hint - use a timer), increment the counter.
Arthur Dent - "That would explain it. All my life I've had this strange feeling that there's something big and sinister going on in the world."
Slartibartfast - "No. That's perfectly normal paranoia. Everybody in the universe gets that."
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Hello all,
I started learing C# using the 2003 version and I've being playing with it to create some windows forms.
I decided to just stick with the windows applications and do some simple flat file readings.
In the meantime the fine folk of microsoft have come up with some server 2005 thing and some upgraded version of ASP.
Then from reading this site - there seems to be another upgrade.
Can anyone tell me how different these versions are to each other. Is it worth my getting my head around ye olde Asp + ado etc - or is it an idea to leap frog straight to the latest stuff ?
Sorry if this is a 'lounge' question by the way - wasn't sure.
Thanks
Mike
|
|
|
|
|
May as well be up-to-date. Learn C# 2.0 with VS 2005. You probably need to learn the latest (2.0) versions of all the things you mention but take it one step at a time.
Kevin
|
|
|
|
|
Kevin McFarlane wrote: May as well be up-to-date. Learn C# 2.0 with VS 2005.
Sounds like a good idea but I'm sitting with the problem now that I have to develop an application for a device that operates Windows CE.NET 4.2 (and consequently .NET Compact Framework 1.0) for which VS 2005 is useless it seems. I'd love to be proven wrong here.
It just doesn't make sense to me. So much for backwards compatibility. Or did Microsoft think that when they release VS 2005 all older terminals and devices will stop existing?
|
|
|
|
|
MS do have a tendency, especially these days, to force you to have the most up-to-date of everything. Or rather if you use one of their latest tools you generally have to update the complementary ones too.
Kevin
|
|
|
|
|
hi
would you please answer my question
How to display HTML Document within an application form ?
thank you
|
|
|
|
|
Easiest way, put a web browser control on your form. Otherwise, I guess you need to parse the HTML yourself.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Christian Graus wrote: I guess you need to parse the HTML yourself
I had to do that once. The code for it is not pretty, I can tell you. It wouldn't be so bad if html was always strict, but the transitional dtd's really cause problems.
Arthur Dent - "That would explain it. All my life I've had this strange feeling that there's something big and sinister going on in the world."
Slartibartfast - "No. That's perfectly normal paranoia. Everybody in the universe gets that."
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Thank you so much for your reply ...
Could be possible ... !!
The HTML document is a HTML file
What is the code to make the web browser control display the file ?
Thanks again
|
|
|
|
|
If you're using .NET 2 and the Web Browser control, there's a property called Url. Just set that to the URL you want.
Arthur Dent - "That would explain it. All my life I've had this strange feeling that there's something big and sinister going on in the world."
Slartibartfast - "No. That's perfectly normal paranoia. Everybody in the universe gets that."
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Thank you so much, i will try it
|
|
|
|
|
Use the WebBrowser control
|
|
|
|
|
my CustomWebControl has a property like:
string[] _size;<br />
[PersistenceMode(PersistenceMode.InnerProperty), DesignerSerializationVisibility(DesignerSerializationVisibility.Content)] public string[] StringCollection <br />
{ get{ return _size; } <br />
set{ _size = value; } <br />
}
It can be designed, but when I visit a aspx page which contain my customcontrol, it show errors, how can i do..? thanks
|
|
|
|
|
Hi,
When i run my app a listbox on the main form loads data from xml in the formload event.
when they want to edit a record they select a record in the listbox and click the edit button. then an editrecord modalform shows. after they made their changes and click save the form closes and gets back to Main form.
Now my question is how can i refresh the listbox after a record has been edited through the edit form?
mmm this may bee a dumm question but its weird i just dont know how lol.
Thanks
GermanD
|
|
|
|
|
The code to load your listbox is in the Onload ? Factor it out to a method, and call it again when your modal form closes.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Yip i as soon as the form loads the listbox get populated.
hmmm i dont fully understand how to do that i have never made a mthod out of an event before.
Could you please give me some hints on how to deal with this?
Thanks for your response
regards
|
|
|
|