|
im looking too add some features to a simple console app that runs with my program via the command line's -console command. Im trying to find a easy way to make key words i.e echo,consolesave to change color when they are typed. i have a vague idea on how to do this. i also want any text with the "qoutation marks" to change color as well. Does anyone have any easy way of doing this? thanks alot
Jesse M
The Code Project Is Your Friend...
|
|
|
|
|
What happened to the RichTextBox?
MyDUMeter: a .NET DUMeter clone "Thats like saying "hahahaha he doesnt know the difference between a cyberneticradioactivenuclothermolopticdimswitch and a biocontainingspherogramotron", but with words you have really never heard of."
|
|
|
|
|
i figured it out... i just used a string array...and such !!
jesse m
The Code Project Is Your Friend...
|
|
|
|
|
ERROR : "The type or namespace name 'Net' does not exist in the class or namespace 'System' (are you missing an assembly reference?)"
I get this error on 'using System.Net;' and I'm obviously not understanding something quite important. I've been doing console-apps in C# for a while now and I have never bumped into this assembly-stuff before. I've searched the net and MSDN without figuring this out. Please help me
Edit: I figured it out at last!! (At least I think so)
Sprudling
|
|
|
|
|
I am looking for sample code where someone has used the Navigate2 method of the IWebControl2 object in C#.
Can anyone help me?
Thanks in advance for helping me out!
d
Darryl Borden
Principal IT Analyst
darryl.borden@elpaso.com
|
|
|
|
|
s.rod. has covered this many times here on the CP - look around.
|
|
|
|
|
Okay,
I've got two apps.
1) in C++ using WinInet.
2) in C# using WebRequest
When requesting the same URL in each I get a diffenent page of HTML returned.
The C++ version is fine, but the C# version is not.
It seems to stem from the fact that the site is saying its and unsuported browser from the C# app!!!! I get the same undisired result in the browser Opera.
So, does anyone know what provides the same functionality as WinInet from .NET?
I was thinking maybe I should not be using Webrequest, but Webclient, but I get the same result. I'm guessing that something in the header of the .NET implementation is not there, or disimmilar to Internet Explorer.
|
|
|
|
|
Use System.Net.HttpWebRequest instead and set your UserAgent string to match your PC's browser.
MyDUMeter: a .NET DUMeter clone "Thats like saying "hahahaha he doesnt know the difference between a cyberneticradioactivenuclothermolopticdimswitch and a biocontainingspherogramotron", but with words you have really never heard of."
|
|
|
|
|
Thanks. I'll give it a try.
You don't know what IE6's UserAgent string is like to you?
I know its somthing like - Mozilla4.0(compatible, IE6) bla bla bla.
Thanks,
Giles
Quote from a clever bloke :
"I know not with what weapons World War III will be fought, but World War IV will be fought with sticks and stones." - Albert Einstein
|
|
|
|
|
No still not having it. The CHttpConnection set of classes in MFC work fine for the url, but HttpWebRequest is not working even why I apply the User-Agent to the header.
Quote from a clever bloke :
"I know not with what weapons World War III will be fought, but World War IV will be fought with sticks and stones." - Albert Einstein
|
|
|
|
|
Giles wrote:
No still not having it.
What the URL, I can try it?
MyDUMeter: a .NET DUMeter clone "Thats like saying "hahahaha he doesnt know the difference between a cyberneticradioactivenuclothermolopticdimswitch and a biocontainingspherogramotron", but with words you have really never heard of."
|
|
|
|
|
Here it is:
http://www.gsgdirectory.co.uk/CGI-BIN/GSGDir.exe?SDETAILSPAGE&NUMGSG=124383[^]
The .NET classes return a different page, to IE.
As I said the WinInet library returns the same page as IE. If you want to test it quickly Chris has built page grabber class in this article : http://www.codeproject.com/internet/webgrab.asp[^]
It uses the MFC http classes which I'm right in thinking use WinInet. Also the VB Internet Transfer control correctly pulls down the page.
Thanks,
Giles
Quote from a clever bloke :
"I know not with what weapons World War III will be fought, but World War IV will be fought with sticks and stones." - Albert Einstein
|
|
|
|
|
Giles wrote:
Here it is:
http://www.gsgdirectory.co.uk/CGI-BIN/GSGDir.exe?SDETAILSPAGE&NUMGSG=124383[^]
The .NET classes return a different page, to IE.
This appears to be happening because of a javascript redirect within the HTML. I'm not sure how WinInet or the VB transfer control handles that. Both HttpWebRequest and WebClient gave the same results. Not the one you are looking for though It could be a frames issue as well.
MyDUMeter: a .NET DUMeter clone "Thats like saying "hahahaha he doesnt know the difference between a cyberneticradioactivenuclothermolopticdimswitch and a biocontainingspherogramotron", but with words you have really never heard of."
|
|
|
|
|
I don't think its the Java script, as what it redirect to is the same. It could be the frames, but I don't see what its trying to pull out.
Quote from a clever bloke :
"I know not with what weapons World War III will be fought, but World War IV will be fought with sticks and stones." - Albert Einstein
|
|
|
|
|
I need to enumerate all the files in a folder, but I can't see how to do this in C#.
In C++ I would just use FindFirstFile(), but I can't find any functions that does that in C#, only a sample about interop/marshalling that shpws how to use the FindFirstFile API.
Is it really true that there is'nt any functions/classes to do that in the .NET framework/C#?
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
Take a look at the System.IO.Directory & DirectoryInfo.
Also there is File and FileInfo.
I think you make use of the members of the xInfo class.
e.g.
DirectoryInfo dir = new DirectoryInfo(Directory.GetCurrentDirectory());
Console.WriteLine(dir.FullName);
foreach(FileInfo f in dir.GetFiles())
{
Console.WriteLine("{0} - {1}", f.Name, f.Length)
}
This seems like a pain, but you get used to it.
For a seriously handy class look at System.IO.Path and its static members. Evrey thing you ever needed for manipulation a file path.
|
|
|
|
|
Thanks a lot
Giles wrote:
For a seriously handy class look at System.IO.Path and its static members
Yea, it looks quite nice.
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
System.Runtime.Remoting.Channels.Tcp
Compiler flags an error about namespace not found , C#
please help
it gives no error on System.Runtime.Remoting.Channels
|
|
|
|
|
Ayyaz wrote:
System.Runtime.Remoting.Channels.Tcp
I dont know where you get that from...? I dont have it.
MyDUMeter: a .NET DUMeter clone "Thats like saying "hahahaha he doesnt know the difference between a cyberneticradioactivenuclothermolopticdimswitch and a biocontainingspherogramotron", but with words you have really never heard of."
|
|
|
|
|
Add a reference to System.Runtime.Remoting.dll
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
|
|
|
|
|
O yes
MyDUMeter: a .NET DUMeter clone "Thats like saying "hahahaha he doesnt know the difference between a cyberneticradioactivenuclothermolopticdimswitch and a biocontainingspherogramotron", but with words you have really never heard of."
|
|
|
|
|
I use System.Runtime.Remoting.Channels.Http. It's not listed either, but it seems to work. I've never heard of Tcp, but I bet it is there.
Me, wrong!?! Nah, you just need to change your thinking to make me right.
|
|
|
|
|
hi am making a program for a net acfe and i made it already but 2 problems left:
1- can not make client main form to not be affected when the user press(ctrl+alt+delete) i mean make him unable to c it.
2- how to make a .bat file for sql server database application to be included in the final setupproject.. i ca not find the way for creatin this .bat file.
i'll appriciate any help
DODy
|
|
|
|
|
Try distributing it as a MSI file, so that managing on the remote system would be easy.
You can create a MSI file from within VS.NET.
Deepak Kumar Vasudevan
http://deepak.portland.co.uk/
|
|
|
|
|