|
Hmm, drive J:, a network drive. If so, Windows is taking its time looking for all the pretty icons for the files in the FileDialogBox seriously! Try to set to list or details view...
I never had problems with that though...
Give them a chance! Do it for the kittens, dear God, the kittens!
|
|
|
|
|
Thanks Leppie, but the 3 second differential is after it closes, not while it's loading the icons. Also tried it on the local drive.
Now get this!! OpenFileDialog seems to be keeping the file that you selected busy for 3 seconds or so after you click 'ok'!!
EFTS.EftsFile pEftsFile = EftsVerification.LoadEftsFile( @"J:\Aware\Specs\EFTS\6.2\samples\10_subs\car2.eft" );
Here I manually override the Load to load a specific file. If I select a different file car3 , then we're back to one second. If I select the 'same' file car2 , then it's back to 4 seconds again.
|
|
|
|
|
if( pFileOpen.ShowDialog( ) != DialogResult.OK )
return;
Stream myStream = pFileOpen.OpenFile( );
if( myStream != null )
myStream.Close( );
EFTS.EftsFile pEftsFile = EftsVerification.LoadEftsFile( pFileOpen.FileName );
GRRrrrr!!! I tried this on a hunch. Once I select my file, then I open it up and immediately close it. The time is EXACTLY the same, but just in different order. The OpenFile/Close takes about 2-1/2 seconds and my LoadEftsFile is back to normal again.
Is OpenFileDialog trying to open up my file?!
|
|
|
|
|
psdavis wrote:
If I select a different file car3, then we're back to one second. If I select the 'same' file car2, then it's back to 4 seconds again.
So its file related? How does the size differ?
CheckFileExists Overridden. Gets or sets a value indicating whether the dialog box displays a warning if the user specifies a file name that does not exist.
CheckPathExists (inherited from FileDialog) Gets or sets a value indicating whether the dialog box displays a warning if the user specifies a path that does not exist.
Try disabling both these... This about as much as I can help Brain is starved now.
Give them a chance! Do it for the kittens, dear God, the kittens!
|
|
|
|
|
> So its file related? How does the size differ?
Copy of the original file.
> CheckFileExists & CheckPathExists
Way ahead of you bro. No change.
I guess I'm going to have to recreate the OpenFileDialog until they fix the bug. Unfortunately, they don't even have any problems reported with OpenFileDialog reported on their knowledgebase, nor do I have a couple of hundred bucks burning a hole in my pocket to report it.
Anyone know of a OpenFileDialog replacement control?
|
|
|
|
|
It definitely has something to do with it being on a networked drive.
If I move the entire directory over to my local drive, the 5 second load now becomes 1/4 second.
I'd say that it was only a problem with my network, if I couldn't replace OpenFileDialog with my own dialog and reduce the time so greatly. OpenFileDialog must be trying to verify something about the file by opening it, and with my slow network, I'm really seeing the effects of it.
|
|
|
|
|
Or.....
Maybe that file you are opening needs reources from the network drive and that is taking so long....
Give them a chance! Do it for the kittens, dear God, the kittens!
As seen on MS File Transfer: Please enter an integer between 1 and 2.
|
|
|
|
|
You know... application settings in ini/registry.
IOW I heed something like in MFC GetProfileString etc.
|
|
|
|
|
I think RegistryKey class is what you want.
Mazy
"If I go crazy then will you still
Call me Superman
If I’m alive and well, will you be
There holding my hand
I’ll keep you by my side with
My superhuman might
Kryptonite"Kryptonite-3 Doors Down
|
|
|
|
|
Yeah but that's too complicated, compared to GetProfileString(MFC) or GetSetting(VB). I was lazy to dig into RegistryKey.
|
|
|
|
|
inner wrote:
but that's too complicated, compared to GetProfileString(MFC) or GetSetting(VB).
Oh man,its really easier than MFC way I think.
Mazy
"If I go crazy then will you still
Call me Superman
If I’m alive and well, will you be
There holding my hand
I’ll keep you by my side with
My superhuman might
Kryptonite"Kryptonite-3 Doors Down
|
|
|
|
|
I wonder if someone has solved this little problem:
Situation:
1) A data grid is bound to a dataset containing one datatable. There is no backend database connection, the datatable is populated programmatically.
2) At runtime, the user highlights a row in the grid and presses the delete key, intending to delete the row of data.
Now the problem, of course, is that the data isn't really gone. It's still in the datatable. But how do I update the table? A seemingly simple answer is to add a OnRowChangedEvent hander and call AcceptChanges()
protected void OnRowChanged(object sender, DataRowChangeEventArgs args)<br />
{<br />
dataTable1.AcceptChanges();<br />
}
but this generates a stack overflow. Does anyone have an idea what I should really be doing?
Thanks!
|
|
|
|
|
Doug Brower wrote:
At runtime, the user highlights a row in the grid and presses the delete key, intending to delete the row of data.
Now the problem, of course, is that the data isn't really gone. It's still in the datatable. But how do I update the table? A seemingly simple answer is to add a OnRowChangedEvent hander and call AcceptChanges()
protected void OnRowChanged(object sender, DataRowChangeEventArgs args)
{
dataTable1.AcceptChanges();
}
Hi
Override the OnRowDeleted function, and remember to call base.OnRowDeleted(sender, args) after calling your functions. Also have a look at DataTable.GetChanges().
Hope this helps
Give them a chance! Do it for the kittens, dear God, the kittens!
|
|
|
|
|
Thanks for the suggestion, and quick response!!
|
|
|
|
|
Hi,
I am looking for a good book or reference about multithrad programming (Thread.Pool...) in C#. Your help is appreciated!
|
|
|
|
|
Hi
Have a look at the following.
http://www.gotdotnet.com/userfiles/toub/ManagedThreadPool.zip[^]
From the readme.txt:
Stephen Toub
stoub@microsoft.com
ManagedThreadPool.cs
August 27th, 2002
v1.0.1
Thread pool class written in C#. Mimics the core functionality of
the System.Threading.ThreadPool class. Useful when using System.Net
functionality in callback delegates.
I must say this guy has written some of the best code I have seen in C#. Although I havent looked at the above library, expect the code to be of high standard
Hope this helps
Give them a chance! Do it for the kittens, dear God, the kittens!
|
|
|
|
|
Thank you, Leppie.
|
|
|
|
|
What is the best way to specify the application path in C#? In VB we could use App.Path . I am trying to specify the following connection string and it is drawing a line underneath it so I know it doesn't like the way I have declared it.
string myConnString = "Provider=SQLOLEDB;Data Source="C:\Documents and Settings\User\Desktop\phonebook\phonebook.mdb";" +
"Initial Catalog=phonebook;Integrated Security=SSPI;" +
"Connect Timeout=30";
I have also tried
string myConnString = "Provider=SQLOLEDB;Data Source=@"C:\Documents and Settings\User\Desktop\phonebook\phonebook.mdb";" +
"Initial Catalog=phonebook;Integrated Security=SSPI;" +
"Connect Timeout=30";
Nick Parker
The goal of Computer Science is to build something that will last at least until we've finished building it. - Unknown
|
|
|
|
|
Hi Nick, note the escapes, else the string will end You can AFIAK substitute "\" for "/" in paths. I ussually find it easier to drop a DBConnection on the form, then setup connection string via wizard. Then just copy and paste it to a const string.
string myConnString = "Provider=SQLOLEDB;Data Source=\"C:/Documents and Settings/User/Desktop/phonebook/phonebook.mdb\";" +
"Initial Catalog=phonebook;Integrated Security=SSPI;" +
"Connect Timeout=30";
Hope this helps
Give them a chance! Do it for the kittens, dear God, the kittens!
|
|
|
|
|
Thanks leppie,
I actually ended up using the quoted string literal (i.e. - @ ) so it was a little cleaner, however I had the snytax a little messed up this morning. It now looks like this:
string myConnString = "Provider=Microsoft.Jet.OLEDB.4.0;" +
"Data Source=" + @"C:\Documents and Settings\User\Desktop\phonebook\phonebook.mdb";
Thanks
Nick Parker
The goal of Computer Science is to build something that will last at least until we've finished building it. - Unknown
|
|
|
|
|
I would like to know how i can play a wave file through TAPI. My requirement is to hook up to a telephone number through a Modem and when the connection is successful, the application should play a wave file.
There is no adequate support provided in .NET frame work for Telephonic applications.
Can some one help please.....
Harihara Subramanian
|
|
|
|
|
|
This example is an excellent one, however how do i play a *.wav file after the connection is hooked up, also is there any event that specifies that the receiver has picked the phone up.
Harihara Subramanian
|
|
|
|
|
Harihara Subramanian wrote:
also is there any event that specifies that the receiver has picked the phone up.
It sounds to me like you have not done a lot of Tapi programming before Don't worry.. we all had to start someplace... Modems are notoriously (sp) bad for detecting remote connection (and in some cases remote disconnection as well).
Take a look at the following URL for some (a bunch) of answers to common Tapi related issues. Even though this stuff is written for Tapi 2.1, it should fo rthe most part apply for V3+ as well. Not much has changed in the world of Tapi support for modems...
http://home.attbi.com/~bpennypacker/tapifaq/[^]
http://home.paralynx.com/~mike_dunn/faq.htm[^]
Bottom line is that if yuo want to get decent performance from Tapi for an IVR or a voice mail or something like that then you should use a Telephony card like from Inetl/Dialogic or something like that. They were made to work as a voice device where Modems were made to be mainly data devices.
|
|
|
|
|
I have tree view control.I overriden AfterSelect event.I want to get index of primary nodes,not sub nodes selected.I mean when I select oe of sub nodes I found out the index of its parent.
Mazy
"If I go crazy then will you still
Call me Superman
If I’m alive and well, will you be
There holding my hand
I’ll keep you by my side with
My superhuman might
Kryptonite"Kryptonite-3 Doors Down
|
|
|
|