|
nice. you got 5 from me.
Hessam Jalali wrote: There is always the way to do it, but I don't know
haha. cool name..
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
Do you have any ideas on going further than this get the print job to print legal size. I have a varation of this code and I have tried setting the paper source and paper size to be the correct tray and paper kind but Adobe Reader appears to override and still print on letter size all of the time.
GG
|
|
|
|
|
Is it possible to link any dll file with a c# program without knowing any details about it and to get details of the data and functions of it.I tried with explicit linking but i could not.If any could please...
Thanks in advance
kandy
|
|
|
|
|
Do you mean .NET dll or Native one? I guess the answer is yes in both cases but solutions are very different.
|
|
|
|
|
ya..Native dll's.Mostly the driver dlls created by different vendors
|
|
|
|
|
Then you need to use PInvoke with late binding. Search for the keywords.
P.S. If you don't know about the functions that reside in that dll it can be impossible or quite difficult. Why would you need to invoke function from a dll about which you have no information?
|
|
|
|
|
HI,
Use Object Browser for getting the schema definition of the dll file.
Naresh Patel
|
|
|
|
|
Which works if it's a .Net DLL
You could also try dumpbin, but that will only give you the name of the function, not the parameters (unless it exports decorated names, then you can use 'undname' to undecorate the names to retrieve the parameters)
-- modified at 1:29 Wednesday 15th August, 2007
I have no blog...
|
|
|
|
|
Sorry for the delay answering. Actually I was trying for .Net Dlls.
It worked fine.
Let me tell you a scenario where in the user has to choose any kind of dll he wants, rather be .Net Dll or Native Dll for a connection to his server.
In that he knows the function to Invoke.
I need to write a common user interface to invoke any kind of dll, based on the choice of the user. Is that possible ?. If so help me regarding the stratergy that i have to use or any examples of such accomplishment.
FYI
I know one software which is doing to most of the Dll's.
Thanks in Advance
|
|
|
|
|
I am using 400 text box in my Form. Updating Text property of all the 400 Text boxes in the Form takes more than 30 milliseconds. Is there any way to reduce this time in c# .net.
//Sample code
//t2 is the array of 400 Text boxes.
DateTime dt = DateTime.Now;
for (int i = 0; i < 400; i++)
t2[i].Text = i.ToString();
MessageBox.Show(((TimeSpan)(DateTime.Now - dt)).Milliseconds.ToString());
Nanda
|
|
|
|
|
Stop the visual update of the components using the BeginUpdate(), EndUpdate() methods. More importantly though, why do you have so many textboxes on a form? This doesn't sound like a good design to me.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
There is no BeginUpdate() and EndUpdate() methods associated with either the Form or the TextBox.
Thanks for the reply
Nanda
|
|
|
|
|
Hello,
I think Pete meant,
SuspendLayout();
ResumeLayout();
All the best,
Martin
|
|
|
|
|
I have tried those SuspendLayout() and ResumeLayout(). But no improvement.
Thanks for reply
Nanda
|
|
|
|
|
Yes,
I also don't think that the graphic refresh is the bottleneck here.
I don't think there is a bottleneck at all.
I would go with Pete, as he suggested to think of a redesign!
All the best,
Martin
|
|
|
|
|
I did. It's a shame that my only involvement with coding at the moment is writing a design in Word. When you get to my age, the old memory goes and you forget thi..... What was I saying?
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Pete O`Hanlon wrote: When you get to my age,
Just wanted to look it up at your profile, but it seems that you also forgot it.
All the best,
Martin
|
|
|
|
|
try this:
Application.DoEvents();
When you get mad...THINK twice that the only advice
Tamimi - Code
|
|
|
|
|
Hello,
Tamimi - Code wrote: Application.DoEvents();
Why?
I think this will make it even worse!
All the best,
Martin
|
|
|
|
|
I tried all the options you people have told. Still no improvement.
The scenario is like this,
The application requires updation of 400 - 500 controls. This application is visualization of the hardware circuit(say with 100s of resistors, capacitors and sensors), updation of the values with millisecond accuracy is required. So I don't have any other ways of designing. If any of you can suggest a way to do then it will be helpful.
Thanks in advance
Nanda
|
|
|
|
|
So updating 400 textboxes takes 30 milliseconds.... well lets see... thats more than 13 textboxes updated in 1 thousandth of a second. I'd say that was pretty reasonable performance wouldn't you?
|
|
|
|
|
I know a language labVIEW doing this operation less than a millisecond. The reason am going for .Net is its multilingual capability.
I tried updating 400 textboxes without adding them to the Form.Controls. The same operation takes less than a millisecond. So I suspect the updation of the UI is causing the delay.
Thanks in advance
Nanda
|
|
|
|
|
Is there any possibility that you can replace the textboxes with a Datagrid?
You may use an array list or dataset as an datasource,
Updating the dataset or array list will automatically refresh the data within the grid...
|
|
|
|
|
You're updating every millisecond? You physically won't be able to see those changes so it is much more reasonable to expect your design to refresh every n milliseconds (you determine n), and log the data to an external source.
A better design though, would be to have each item exposed as a bindable object, and have a check on your property to say (effectively) if my new value is different from my old value, then update my new value and raise a PropertyChanged event on that property. This way, only those values that change get updated. Take a look at INotifyPropertyChanged for guidance on how to do this.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
getnanda@gmail.com wrote: updation of the values with millisecond accuracy is required
Are you planning to update the monitors too because a typical monitor will refresh the screen only one and three quarter times in the current time it takes to update all the text boxes.
If you update textboxes every millisecond the monitor will only have got 6% the way through a refresh before the thing is updated.
I really think some pragmatism is required here.
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
|
|
|
|