|
I've worked around my problem for now with a well placed thread.sleep for now.
Thread affinity looks like the right path to take though. Thanks for the advice.
|
|
|
|
|
Tune us all in if you find anything good
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Hello everybody ,
Is there a way to avoid using the standard OpenFileDialog control in Visual Studio.NET 2005 and still be able to produce the same information using C#? I mean, if I wish to create a different user interface yet display the same information regarding drive lists, directory lists and the list of files under various folders. How can I achieve this ?
Thanks and regards.
Milkyway.Andromeda@indiatimes.com
|
|
|
|
|
You can use the classes in the System.IO namespace to get information about drives, directories and files.
The DriveInfo.GetDrives method, for example, returns an array of DriveInfo objects that represent the available logical drives in the system.
---
single minded; short sighted; long gone;
|
|
|
|
|
Hi,
Thanks a lot for the guidance. . I got the idea as well as where to look for.
As a matter of fact, I was thinking if there might be some classes available that can be used. Thank you once again.
Milkyway.Andromeda@indiatimes.com
|
|
|
|
|
Make your own dialog. Just look up "directory browser" in the search bar of this website, there are plenty of good examples.
Mark.
Find a job you like and you will never have to work a day in your life. -
|
|
|
|
|
Thank you very much . Making my own dialog was what I was thinking.
Good wishes to you all.
Milkyway.Andromeda@indiatimes.com
|
|
|
|
|
Hello everyone,
I have created an Windows Application using .NET Framework2 and everything works fine under WIndows XP Operating System. When I run the Windows Application under Windows Vista, there are some issue and it doesn't work as good as it should. The main problem comes from the part that the Windows Application needs to connect to a remote database and populate DataTable on the Windows Application with data from remote database.
This is the code that I am using to populate the DataTable by data from remote database after the connection has been stablished.
OdbcCom = new System.Data.Odbc.OdbcCommand("USE MyDatabaseName;", OdbcCon);<br />
OdbcCom.ExecuteNonQuery();<br />
<br />
OdbcAd = new System.Data.Odbc.OdbcDataAdapter("SELECT * FROM " + MyTableName + ";", OdbcCon);<br />
<br />
myds = new DataSet();<br />
<br />
OdbcAd.Fill(myds, MyTableName);<br />
<br />
myTable = new DataTable();<br />
<br />
myTable = myds.Tables[MyTableName];
I was wondering if anyone have faced the same problem or if anyone knows anything about it.
Thank you very much and have a great day.
Khoramdin
|
|
|
|
|
I had a similar problem with Windows XP 64 bits.
Then I discovered that XP 64 bits has no support for ODBC.
It may be your case.
Charles.
|
|
|
|
|
Hi!
Is there a function that handles duplicate characters such as 2 spaces in a word, the one who transform:
yyyy tttt
to:
yyyy tttt
Or do i need to create it?
Thanks
|
|
|
|
|
|
Did you mean the join function?
I am sorry, but i could not find something like this.
Can you please help?
|
|
|
|
|
So you didn't see the method called Replace?
The one for replacing one thing with another? Like replacing two spaces with one?
|
|
|
|
|
I did see it, but the 2 spaces was an example, what about 3,,5,7,9,23,45,49,76,78.
This is what i ment when asking if there is a function, or i need to write my own algorithm for that.
Thanks for your help
|
|
|
|
|
ytubis wrote: yyyy tttt
to:
yyyy tttt
I dont see any difference
As for white space trimming, you can handle it as follows
string strVar = "Your text goes here";
string TrimmedString = strVar.Trim();
Smile: A curve that can set a lot of things straight!
(\ /)
(O.o)
(><)
|
|
|
|
|
Maybe i should have be more specific in my example, but i ment:
yyy tttt
to:
yyy ttt
|
|
|
|
|
Hello,
Do you want the second part of the string as long (same Char count) as the first?
And is there allways one whitespace in between?
All the best,
Martin
|
|
|
|
|
you can do this:
string s="yyyy tttt";
if(s.Length>2)
string subStr=s.SubString(1,s.length-2);// this is what u want!
Ak Hon From the Middle Asia
|
|
|
|
|
How to open , new and save using file dialog box in windows application of c#?
vikas da
|
|
|
|
|
Use a more descriptive subject line next time. Just putting c# in the subject line in a C# forum doesn't really help much.
Look up using the FileOpenDialog control...
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
how to use FileDialog boxes...
vikas da
|
|
|
|
|
tasumisra wrote: how to use FileDialog boxes...
Doesn't tell me much.
Be more precise about what you want to do...If you have the control dragged from the toolbox to your form, use the ShowDialog() method to show it. You might want to get a book on C# and read up.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Sam's Publishing Chapter Except[^] might get you off the ground a little bit....
Google using the keywords using FileDialog in C# has many good results to look at
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Reading the question I think he actually expects the dialog to perform the save function for him as well as allow the user to pick a file location.
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
"I wouldn't say boo to a goose. I'm not a coward, I just realise that it would be largely pointless."
My website
|
|
|
|
|
In that case a snippet like the following might be more helpful
OpenFileDialog dlg = new OpenFileDialog();
DialogResult result = dlg.ShowDialog();
if(result == DialogResult.OK) {
using(FileStream stream = File.OpenRead(dlg.FileName)) {
StreamReader reader = new StreamReader(stream);
string fileContents = reader.ReadToEnd();
//Do something with the content
}
}
Ooh and I totally agree on the title being very unclear. I do hope however this helps a bit.
WM.
What about weapons of mass-construction?
"What? Its an Apple MacBook Pro. They are sexy!" - Paul Watson
My blog
|
|
|
|