Member Avatar

I'm not sure if this should go in this forum or not so please move it accordingly if necessary. I was wondering how difficult it would be to implement code highlighting. Personally I like to show the person where their errors might be or are without giving them a direct answer so that they can learn from what they did wrong or smile about the simplicity of it. Currently the only way I can accomplish this is to underline the section of code, this of course means I cannot use the code tags to wrap it up and make it …

Member Avatar
+0 forum 5
Member Avatar

Alright I was given a link ([url]http://support.microsoft.com/kb/195192[/url]) along with [b]InternetSetOption(0, INTERNET_OPTION_END_BROWSER_SESSION, 0, 0);[/b] and told it should force 2 browsers in the same application to use 2 different cookies. I ran it through the code translator and got the following. [code=c#] const int INTERNET_OPTION_END_BROWSER_SESSION = 42; [DllImport("wininet.dll", EntryPoint="InternetSetOptionA")] private static extern int InternetSetOption(long hInternet, long lOption, ref Any sBuffer, long lBufferLength); public int flushCredentials() { int h; h = InternetSetOption(0, INTERNET_OPTION_END_BROWSER_SESSION, 0, 0); return h; } [/code] Most of the time I will sit for hours or days screwing with the code until I have it figured out but as …

Member Avatar
+0 forum 2
Member Avatar

Alright so I want to force a new session but I'm not even sure how to use the code I was given to do just that. I have 2 web browser controls in one app that need 2 different sessions. Can this code do what I need it to? If so, how do I implement it? [code=c#] const int INTERNET_OPTION_END_BROWSER_SESSION = 42; [DllImport("wininet.dll", EntryPoint="InternetSetOptionA")] private static extern int InternetSetOption(long hInternet, long lOption, ref Any sBuffer, long lBufferLength); public int flushCredentials() { int h; h = InternetSetOption(0, INTERNET_OPTION_END_BROWSER_SESSION, 0, 0); return h; } [/code] Thanks in advance

+0 forum 0
Member Avatar

Is there a way to tell which browser the user has selected as default and then be able to "build" the useragent string based on the browser that is default? For example if that have Google Chrome set to default, how could I build [icode]Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0.375.127 Safari/533.4[/icode] or [icode]Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)[/icode]? Or is that possible? I hope this makes sense and thanks in advance.

+0 forum 0

The End.