Answer Questions
The ZMan check valid path
Is there away to check a valid DOS path in c# ex: if the user types zzz:\test.txt and the path is invalid, return error message. using VS2003 .NET1.1 Thank you, Thank you, I will check it out. I found something, would like to share. another way can be checked if the path is valid or not, using try and catch: try { } catch (COMException cex){ Response.Write(cex.ErrorCode); if ( cex.ErrorCode == -2147166139 ) { //invalid path format. } } using File.Exists to check path validiy is a wrong idea and should never be used. It says MSDN here: http://msdn2.microsoft.com/en-us/library/system.io.file.exists.a ...Show All
rp666 Get System Information
Hello Everyone, Is there any way to get the System information on the applications installed, as like Microsoft Office or any other application from the about box you can pull all the system information... Can be of local machine or a remote computer on a network.... How can I do that using C#... Thanks, Harsimrat Harsimrat wrote: Hello Michael, Thanks for the response, really appreciate for your help...this gets me the screen resolution, If I need to know all the softwares installed, how can I find that out...... this code gives you all properly installed packages (the one that appear in Add/Remove Programs) static void GetInstalled() { string uninstal ...Show All
B M E Recommendation
Hi Guys Basicaly i am a MSCE and want to expand my horizons. so i decided i wanted to start programing and i have decided to start with C# it may not be the easist but i would like to start there. if anyone could give me advice were to start and which C# book would be the best for someone who has had little coding expeirence. Thanks Hi, Welcome to the C# world! This thread can help you: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=1221320&SiteID=1 Thank you ...Show All
Lei Jiang GQoS vs QoS2 vs qWAVE
I have some applications that make use of GQoS under XP and Server 2003 and I've heard a lot about QoS changing in Vista. I've been looking all over the MSDN web site, but I'm still a little confused. What's the difference, if any, between QOS2 and qWAVE The qWAVE documentation states that it's "mainly targeted for use by multimedia applications that require network streams on a home network". Does this mean I should still use GQoS for my enterprise applications under Vista and Longhorn Thanks Kevin O'Connor Interactive Intelligence, Inc. QOS2 is the api name (header file is qos2.h) for the qWAVE networking technology. You are correct that qWave is mostly targeted at multimedia application ...Show All
DonMartin Problem with System.Web.Mail
Hello Everyone, I am trying to write code in my c# windows program to send email. I found good tutorials online to get this done. Most of which use the System.Web.Mail namespace. When I come to write that in: using System.Web.Mail; I get this error: The type or namespace name 'Mail' does not exist in the class or namespace 'System.Web' (are you missing an assembly reference ) I even tried: using System.Web.Util;............but I pretty much got the same error message. When I come to look System.Web.Mail in the help files, I find it there, I just can not use it. Can someone please help me by pointing out what is wrong. I am using visual studio 2003 c# on windows xp home edition. ...Show All
mliesmons Maintaining an Activity Log over multiple classes
Hi all, i have a class called ActivityLog.cs and this basically creates a log of whats going on in my console app. i construct it like: ActivityLog Activity = new ActivityLog(); then you use it like activity.log("this is one entry"); and when the program is done you can mail out the log like activity.Email("me@me.com","me@you.com","the log file"); My program uses three different classes, right now the activity log only works with the first, well it will work with all three but only if i construct a new log file for each class, i was hoping someone could help me figure out a way to pass the log back and forth during the execution of the different classes. I am familiar with the ...Show All
Chris Jobson Error in calling a method
Dear all good day i ve 1 question, i make a function that open a form from another the method is as follows public static void DisplayForm( Form targetForm) { targetForm.Show(targetForm); } instead the classic way Form2 frm = new Form2(); frm.Show(); it have one parameter and it has from data type, when i call this function it fire the following error DisplayForm( Form2 ); 'Form2' is a 'type' but is used like a 'variable’ kindly instruct thanks all The error is correct. You COULD do this: DisplayForm(new Form2) but to be honest, I can't see any use in having this method at all. Apart from anything else, you call a method that just calls another method ...Show All
Farhan H Soomro read HTML content using c#.net
Dear all, I am trying to read HTMLcontent using C#.net, but its returning content as a unicode characters .so how can i read the characters form HTML. Thanks, Aya. Exactly, but if you want to get raw data and then analyze it byte by byte then better use DownloadData( http://www.google.com ). If you get odd looking characters, than can have something do to with the font you choose when you display the characters. hi, here its the best thing i can come up with i have tried 2 ways , 1. using webbrowser control and get text from its htmldocument 2. using bytes and decoder but i copy codepage(28596 iso-8859-6 Arabic (ISO)) from the webbrowser but how it was detect ...Show All
Liam404 Retreive local computer's acount password?
How can I retreive the local computer's accounts passwords Is there a way to search through all of the keyboard characters to determine the password characters one by one Thanks, (PS: I'm not trying to break into an account) At one time SysInternals had a brute force password cracker for WinNT. It could take days depending how secure a password you had, but it WILL eventually get it. Don't know if they still have it... http://www.sysinternals.com/ Is there a way to convert hash to string lol well creating an application won't help it. This is more of a TS question which should be posted here: http://www.microsoft.com/technet/community/newsgroups/dgbrowser/en-us/default.mspx dg=mi ...Show All
zwp while (true)... need help!!
I thought I knew quite a lot about programming but when I came accross a bit of code like: while (true) { ...do something... } I had no idea how this works... I know that it's a conditional loop and while it is true it loops through performing whatever tasks there are to do... BUT what is the (true) part how does that work if it loops while(true) what would make it false since it's not a local variable or anything and you cant say IsRunning = false; it just always is true... Does it mean that while app is still running or something... That's the only solution I can come up with is that it means while( app is running){...}... Am I right Can someone please take the time to explain this to me and maybe give me the proper name for referring ...Show All
PLMK Terminating a process using WMI
Hi, I have been told that this is possible but I can't seem to find any sample code anywhere. Anyone know how to do this Thanks. except your posting how to do it locally and sven is proposing a remote/local function. It is: Process.GetProcesses("remoteMachine") will give you a process collection of remoteMachine. Process.GetProcessByName("notepad", "remoteMachine") will give you a collection of processes named notepad on remoteMachine. Given that you have access rights on remoteMachine... -- SvenC you are aware that you can use the Process class to terminate a process right It would be cheaper also than using WMI, if its ...Show All
TheQuietShadow Project Idea
Hello every one, I have just recently started coding away with C# and decided that this would be a suitable language to produce third year project for my degree course for various different reasons. I am still researching couple of ideas, was wondering if any of you bright people would kindly give me some ideas which will not only be a fun project to work on but something i can learn from. p.s. I have a good understanding of OOP Thanks in advance How about writing a source-version-control-system "fun" and "web programming" in the same sentence, without using the prefix "not" Hmmm. If you dont go to the web route, you can have lot of fun with W ...Show All
Douglas H. Troy 2005 Standard Edition compatible with C# Express Projects??
I had C# Express Edition installed and thus have a bunch of projects that I did for school and work. I now have C# 2005 Standard Edition installed. When I try to run a project done in C# Express I get an error. Is this a known issue Thanks! David So you had a beta of Express and then installed the final version of VS Standard and are getting error... what error is that Worst case you may just have to build a new solution file and add the code files to it manually. C# 2005 Standard Edition There is no such thing... do you mean Visual C# Standard Edition Or maybe Visual Studio 2005 Standard Edition The project files created by one version of Visual Studio 2005 (from Express on up to Team Suite) is exactly the same an ...Show All
kangalert best way to read pipe delimited text file?
I am trying to read in a pipe delimited file and do certain processing for each field. I was just wondering what the best way to strip out each field is - is there anything built in .Net that will easily allow me to do this Or do I just loop through and remove each field myself Also, would it be best to strip each field out into a dataset first, and then do the processing Or, do the processing while I am separating each field Or does it not matter Thanks! Saeed ok - got it - thanks! :-) yes you would! so you can create the columns on the fly once by looking at the number of items split into the array. Example: //while loop & ...Show All
Drokker installer project error :This installation package could not be opened.
Hi every one.... I am having a problem in install the .msi file created by VS2005 using C#. I created a setup project for windows application by VS2005 using C#. When i click the mySetup.msi its installed successfully in the computer. i copied the mySetup.msi into another computer and try install it,its successfully installed. My problem is: I uploaded mySetup.msi into the application1 folder in my webserver. Then i download the mySetup.msi using following url: http://www.mysite.com/application1/mySetup.msi Its downloaded successfully then i try to install it it produce the following pop error : "This installation package could not be opened.Contact the application vendor to verify that this is a valid Windows Ins ...Show All
