|
To the original poster, don't forget the value of the documentation - it's where the people that answer your questions learn things. Read the documentation about the System.Diagnostics.Process class and see what else you can do, like provide command line arguments, redirect stdout, stderr, and stdin, and pass shell command verbs for non-executable files (like opening HTML documents with the user's default browser without knowing what their default browser is).
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
thank you very much for the code.
I think the MSDN help is great to learn how to use classes/components, but it doesn't explains which class has to be used for a certain purpose.
where can I find a handbook that can guide me on finding help on the msdn documentation?
I'm looking for help on finding help: weird,isn't it?
|
|
|
|
|
You simply have to review the documentation on MSDN. Get to know what classes there are. It's not like you have to memorize the whole library, just become familiar with what certain namespaces cover (ex, obviously System.IO is for input/output, which includes files and other streams) and you can always lookup stuff when you need to. API documentation is not to teach you how to do things - that's your job and what development is all about.
Besides, nothing says you have to use one class over another, or that you couldn't even write your own. Some classes may be better than others for particular uses, but your understanding of those classes and your imagination in how that functionality can be derived is what dictates which classes you should use.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
can there be same control for both windows and web if it is how can we develop it in c# please guide me
Thanks
|
|
|
|
|
NOP... coz windows controls are rendered by the windows engine... and while web controls are rendered into HTML and which in turn in, is rendered by a browser.
mE
---------------------
A gasp of breath,
A sudden death:
The tale begun.
A rustled page
Passes an age:
The tale is done.
|
|
|
|
|
You're wrong - I've done it countless times. To the original poster, see my article I'll be updating for CP on DevHood at http://www.devhood.com/Tutorials/tutorial_details.aspx?tutorial_id=388[^].
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
My apologies - Actually me too tried to do this with ActiveX controls. Your article seems great; I hope it would be very helpful.
Once again my apologies;
Heath, Keep up the good work;
mE
---------------------
A gasp of breath,
A sudden death:
The tale begun.
A rustled page
Passes an age:
The tale is done.
|
|
|
|
|
Hi,
Ive been looking around at various projects on gotdotnet and whatnot and most of the good applications seem to not sure the windows forms designer. I was wondering is this standard practice for a company that would sell a windows form application? Is there any books or web sites that describe the process of making a windows form application with out using the designer? Thanks in advance.
xarx
|
|
|
|
|
|
This is common practice. Good applications are written by good developers who don't need graphical agents. I rarely use the forms designer - especially when working with localized applications - because the designer assumes far too much and likes to initialize everything up front.
As a good example, try designing a simple test form. Set the Localized property in the prop grid to true , and watch the designer add every localizable property to your .cs and .resx files...and the size of your assembly double! Now try removing some of those and moving the ResourceManager instance off into the class as a private field or something to reuse elsewhere in the class...and watch the designer complain and break!
The most important thing to remember is that the designer doesn't use magic - everything you do in the designer is either serialized as code in the source file or is added to the ResX files (like images in an ImageList , which are simply base64-encoded).
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
Can you recommend any ways to learn this form of windows form programming? All the books I have or seen use the designer to make programs.
Thanks in advance
xarx
|
|
|
|
|
Forget the books - the best education is trial and experience. Read through the .NET Framework SDK. Scan the namespaces and the classes contained within. Start trying things. If you've just been using the designer and have never looked at the code - you're lost. The concepts are simple - you have a form. Instantiate it, put some controls on it, and show it. The biggest mistake so many people make is that they don't read the documentation. What do you think the books are written from? The documentation, trial, and experience. Don't waste the money.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
The first thing I catch when reading posts like these is the "I'm better than you 'cause I do it all in code" hard-ass attitude. What a bunch of bunk. If a tool is there and increases your productivity, use it.
Don't fall into that programmer elitism bull sh*t. Productivity takes first place to optimizing the assembly size hands down.
The graveyards are filled with indispensible men.
|
|
|
|
|
I have a TextBox on a Form and I want to implement autoscroll on the TextBox...any ideas of how to do that?
Thanks,
mweiss
|
|
|
|
|
I've spent some time looking around for wrapper classes etc which will enable me to build an MP3 player w/ .NET
For VS 6.0 there are plenty of controls out there to do this .. However, I have not been able to find any controls, dlls etc etc that will do this for .NET ..
I did try using the MM control(Interop) and it the MP3 didn't sound right.
What gives ?? Does anyone know of any good components for MP3 ?
|
|
|
|
|
|
|
|
Thread.Sleep(XX);
This is the simplest solution to making your thread pause. Unless you are required to have 100% time accuracy I don't see it worth your time to invest in alternatives.
Progress Bar delays:
This is common. There is alot that goes on in your application when you update the GUI. Even if they are in different threads it has to pause find the proper method to send data via and send the data. If there isn't many things going on this normally isn't visible however, when you are doing hundreds of thousands of microsecond loops those tiny delays do add up. Could you speed it up? Possibly but then again it is up to how much time you want to commit to it.
A simple quick fix for process bars updates is to only send update calls every X loops. Sometimes helps, sometimes hurts. Consider it the poor mans fix.
|
|
|
|
|
nice progress bar tip. i'll try it out.
thanks.
/\ |_ E X E GG
|
|
|
|
|
Hi,
I have a strange behavior when using an installer class to register a com+ server (Using the RegistrationHelper class). When the installer perform a new install there is no problem, the behavior appear when doing an upgrade, the old version is registered, not the new one (the Installer package is configured to remove the previous version before reinstalling a new one. "RemovePrevious Version=True").
Here is the symptom :
When installing a new version of the com+ server, the installer class first uninstall the previous version, remove the files and copy the new ones.
then, the following procedure is run :
public override void Install(System.Collections.IDictionary stateSaver)<br />
{<br />
base.Install(stateSaver);<br />
<br />
string appID = null;<br />
string typeLib = null;<br />
string assembly = GetType().Assembly.Location;<br />
<br />
RegistrationHelper regHelper = new RegistrationHelper ();<br />
regHelper.InstallAssembly (assembly, ref appID, ref typeLib,<br />
InstallationFlags.FindOrCreateTargetApplication);<br />
<br />
stateSaver.Add ("AppID", appID);<br />
stateSaver.Add ("Assembly", assembly);<br />
}
Theoritically the new com+ server must be reinstalled.
BUT, the version registered is the previous...
Because of that, the server can't provide com object access because of a mismatch in assembly effective version and declared version in registry.
I don't understand why because the assembly property refer to the new assembly with the correct version number !!!
Does anyone have an explanation for this problem or it is a bug ?
Pietro
|
|
|
|
|
Well, InstallationFlags.FindOrCreateTargetApplication tells the reg helper to install a previous version first - the installer is clearly not removing the previous version.
Look in your Add/Remove Programs control panel. Do you see two entries for your product there?
First, always make sure to NEVER change the UpgradeCode. Simply changing the installer version will prompt you to change the ProductCode and PackageCode (which is appropriate for Windows Installer, someting I've consulted on for several years).
The problem is that VS.NET's installer project sucks! It does almost everything wrong. If you choose to install the previous application on a per-machine basis (the default is per-user), the new install (remember, having the default set to per-user) won't see the prevoius version! This is because the Upgrade table is handled wrong.
If this is indeed causing the problems you are experiencing, you'll have to download the Platform SDK from MSDN for the Windows Installer SDK (the core is required). In that, there's an installer for a utility called Orca. Install that, open your .msi file and find the Property table. Add the property ALLUSERS with the value 1.
The VS.NET installer is also stupid because you can't do this before compiling the package (or much of anything else, for that matter).
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
Thank you for your answer,
looking in add/remove program show only one entrie after an upgrade, and as it was recommended, i never changed the upgrade code.
I don't think it is an upgrade detection problem. When I look at what is appening during the upgrade process, uninstall of the previous com+ application and deletion of previous file version occur correctly !
Finally, to workaround the problem, I have created a custom action wich call Regsvc.exe to make the registration. (It's not very nice looking but it works !)
Pietro
|
|
|
|
|
I've written a very small remoting app, a server that exposes one method from a dll, and a client that connects and calls that method. Most of the time this works fine. But if the client crashes, and I restart it, any subsequent connections to the server cause an exception. If I restart the server everything is fine. It seems to me that if the clients' connection to the server channel is disconnected improperly, the server is hosed. Is there any way to periodically check to see if a channel is 'stuck'? Otherwise I'll have to set up some kind of schedule of periodically unmarshalling/disconnecting and then re-marshalling/connecting, just in case the server is stuck. That just seems inelegant to me.
Thanks for any suggestions,
jt
|
|
|
|
|
What calling convention are you using for the remoting type? (i.e., client-activated / server-activated, single-call / singeton, etc.)
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|