|
Use DataTable.Select .
C isn't that hard: void (*(*f[])())() defines f as an array of unspecified size, of pointers to functions that return pointers to functions that return void
"Always program as if the person who will be maintaining your program is a violent psychopath that knows where you live." - Martin Golding
|
|
|
|
|
See this
http://www.codeproject.com/KB/cs/N-Tier22.aspx[^]
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/SQL7/2000/2005/2008
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@its.co.za
|
|
|
|
|
Hi all,
Actually I was trying to read a word document line by line in a simple way using Filestream and streamreader and storing in a string and creating a new document with the same. But i am unable to that document in a proper way. while debugging i have noticed that the contents in the word document are coming in a format like "ÐÏࡱá\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0>\0\0þÿ\t\0\0\0\0\0\0".
when I try to open the new document i prompts me to "select the encoding format that makes the documnent readable".. The partial code is below for refernece...
FileStream fs = new FileStream(txtDoc.Text, FileMode.Open, FileAccess.Read);
StreamReader srText1 = null;
srText1 = new StreamReader(fs,System.Text.Encoding.Default);
string s;
s== srText1.ReadLine()
here txtDoc.Text contains the path of the word document...
|
|
|
|
|
I don't know what to say. Word documents are in Word format. .NET doesn't know how to read those, it's going to try to turn them into strings, as you're seeing. You need Word on the target machine and to control it from .NEt to open word files.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
i've a form and when it loads lt creates a new thread(connectedThrd) with a listening socket and when a client requests the connection , a new thread(chldthrd) is create and the connected socket is passed to it. the problem is when i close the form it terminates the form , but the the taskmgr show a process is still running with the name of the application.with in the connectedThrd i aborted the chldthrd, at formclosing event i aboted the connectedThrd.what might be the problem .
|
|
|
|
|
prasadbuddhika wrote: but the the taskmgr show a process is still running with the name of the application.with in the connectedThrd i aborted the chldthrd, at formclosing event i aboted the connectedThrd.what might be the problem .
Your thread is not aborting properly. This makes the application to run until all threads finishes. You need to re-work on your thread abort code and make sure it aborts correctly when application ends.
Run the new thread as background. This will abort the thread when main thread ends. You set IsBackground property of thread to make it as background.
Thread t = new Thread(..);
t.IsBackground = true; You can also use a ThreadPool instead of creating your own thread. ThreadPool threads are background thread by default.
|
|
|
|
|
Hello All,
Can i use Binary Searlization to pass a dataset over web service or i need to use only xml searlization for this? Please advice...Thanks!!
|
|
|
|
|
You don't need to worry about serialization in web services. Serialization will happen internally when web services are used. It uses SoapFormatter to do the serialization.
|
|
|
|
|
Dipty900 wrote: Can i use Binary Searlization to pass a dataset over web service
Webservices uses only XML Serialization.Whih id done internally as Navneeth says.
AFIK,We don't have any option to change the formatter.
Cheers!!
Brij
|
|
|
|
|
Hi,
I can retrieve the text inside each value tag from within the xml below...
How can I find out if and what the repeated values are?
<securitytype>
<value>hello
<value>you
<value>again
<value>you
hello
RESULT:
hello
you
Thank you
|
|
|
|
|
Use SelectNodes instead of SelectSingleNode. If you get more than one, it's repeated. Also, we can't read your XML b/c you didn't check 'Ignore HTML tags'. You can also copy your XML and paste it back into the site, it sometimes will auto encode it for you.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Hi,
Here is the xml:
<securitytypes>
<value>hello</value>
<value>you</value>
<value>again</value>
<value>you</value>
<value>hello</value>
</securitytypes>
|
|
|
|
|
OK, so you can do exactly what I said, load it into an XMLDocument and use SelectNodes to see how many nodes have the same value.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
|
How can i create Windows Forms in C# that look like the windows in Vista (e.g. Only Title bar is partially transparent with a background image)?
I found here one article 'VistaButton' by Xasthom. But i don't know how to do that with Windows Forms.
Thanks
Rakib
|
|
|
|
|
The guy below you is asking the same thing. The answer is, you need to owner draw EVERYTHING that the system usually draws, or find a library that does that for you.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Hello
I created a windows App invista using C# caled VS Payroll 2008 (you can check it out on download.com) however I noticed when it is opened in XP it looks like junk. How can I make it look better like in vista?
-Will
|
|
|
|
|
By downloading or writing controls that mimic the look of Vista instead of letting Vista do it. But, I don't think XP look apps look like 'junk', unless there's something specific to your app that you need to clean up.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
yes, all the forms and colors are useing "system" becuse it looked great in vista but the "system" settings give it a VERY grayed out and low tech look. How should I go about downloading the controls that mimic vista to depoly to xp users?
|
|
|
|
|
willpv2 wrote: How should I go about downloading the controls that mimic vista to depoly to xp users?
Gee. Um... google ? I'd search this site first, then do a general web search.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Hello All
i am trying to add label controls into a listbox control in the runtime
i am using this code
private void button1_Click(object sender, EventArgs e)
{
Label l = new Label();
l.AutoSize = true;
l.Font=listBox1.Font;
Random R=new Random();
int r=R.Next(0,255);
int g=R.Next(0,255);
int b=R.Next(0,255);
l.ForeColor = Color.FromArgb(r, g, b);
l.TextAlign = ContentAlignment.MiddleCenter;
l.Text = "Experement";
listBox1.Items.Add(l);
label1.Text = listBox1.Items.Count.ToString();
listBox1.Invalidate();
}
i think it have no problems, but i cant see anything added to the listbox items.
any help?
|
|
|
|
|
Why are you adding Labels to a ListBox? What are you trying to achieve with this?? i can't think of any good reason to do this.
|
|
|
|
|
You spelled "Experiment" wrong.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
I am surprised that this builds and runs. A list box Items collection is a collection of ListBoxItems, I'd have thought.
This is winforms, it's not WPF.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
You wouldn't think it was the season of goodwill, given the responses from the first few people, would you?
OK - your problem is that, while ListBox items are a collection of Objects, it has no idea how to display a label - so you get nothing.
Your code will show (in label1) that the items are added to the collection - if you want to draw each in a different colour, then you will have to help the listbox by drawing each item yourself.
See here[^] for a quick and dirty example - it should give you the idea to work on anyway.
And to the other responders - why the -ve attitude, guys? Time to pull some heads out of some arses, I say!
If I knew then what I know today, then I'd know the same now as I did then - then what would be the point?
.\\axxx
(That's an 'M')
|
|
|
|