Click here to Skip to main content
15,909,898 members
Home / Discussions / C#
   

C#

 
GeneralRe: Local IP number? Thanks! Pin
Jay Shankar23-Dec-04 21:03
Jay Shankar23-Dec-04 21:03 
AnswerRe: Local IP number? Pin
leppie23-Dec-04 20:33
leppie23-Dec-04 20:33 
Generalsingleton Pin
lcarriere23-Dec-04 18:14
lcarriere23-Dec-04 18:14 
GeneralRe: singleton Pin
Heath Stewart23-Dec-04 20:20
protectorHeath Stewart23-Dec-04 20:20 
GeneralRe: singleton Pin
lcarriere24-Dec-04 4:06
lcarriere24-Dec-04 4:06 
GeneralRe: singleton Pin
Heath Stewart27-Dec-04 10:17
protectorHeath Stewart27-Dec-04 10:17 
GeneralRe: singleton Pin
lcarriere27-Dec-04 11:29
lcarriere27-Dec-04 11:29 
Generalsuspending layout, useragents, and creating shortcuts... Pin
dkarlton23-Dec-04 15:36
dkarlton23-Dec-04 15:36 
I posted to this board almost a month ago, and no one had a response for any of my questions. Can anyone offer any comments on these topics?

Thanks much.

***********************************

(from 1 December 2004)

I'm a total newbie in the land of C#, Visual Studio, .NET, and all-things-Microsoft. I'm trying to do a number of things with a C# application that has a builtin web browser (AxSHDocVw.AxWebBrowser). Most of the code I've inherited from someone else who knew a lot more about this stuff than I do, so I'm barely treading water at the moment.

If anyone can help shed some light on the following things, I'd be very grateful.

1) Is there a way to control the browser to not display until DocumentComplete has been called (i.e. READYSTATE_COMPLETE)? I want the page to *not* show anything until it's fully loaded, and can't figure out how to do this.

2) Is there a way to modify the UserAgent sent by the browser? Some of the docs have suggested (at least in C++ land) that in the Navigate() method I can postpend to the header argument to add things, such as the user agent. However, I'm not sure that a) this works, or b) what the appropriate syntax is in calling this from C#. I've tried just throwing in a string argument, but am not 100% sure of the syntax, nor did it seem to affect anything.

I've also seen:

http://support.microsoft.com/kb/q183412/

but don't know how I can do something similar in my project.

3) I've tried, unsuccessfully, to make a call to create a desktop shortcut using IWshRuntimeLibrary. Here's my code:

WshShell shell = new WshShell();
IWshShortcut link = (IWshShortcut)shell.CreateShortcut(title);
link.TargetPath = url;
link.Save();

This always throws an exception, even when the app is being run by an administrator account. It's a System.Runtime.InteropServices.COMException, and the message is just "Exception occurred." I took this code directly from:

http://www.codeproject.com/dotnet/shelllink.asp

Any idea what might be going wrong here?

Thanks much. Sorry if these questions are too broad. Let me know if I can be more specific.
GeneralRe: suspending layout, useragents, and creating shortcuts... Pin
Heath Stewart23-Dec-04 20:48
protectorHeath Stewart23-Dec-04 20:48 
GeneralRe: suspending layout, useragents, and creating shortcuts... Pin
dkarlton27-Dec-04 14:32
dkarlton27-Dec-04 14:32 
GeneralRe: suspending layout, useragents, and creating shortcuts... Pin
Heath Stewart27-Dec-04 19:19
protectorHeath Stewart27-Dec-04 19:19 
GeneralRe: suspending layout, useragents, and creating shortcuts... Pin
Heath Stewart28-Dec-04 5:09
protectorHeath Stewart28-Dec-04 5:09 
GeneralRe: suspending layout, useragents, and creating shortcuts... Pin
dkarlton28-Dec-04 8:28
dkarlton28-Dec-04 8:28 
GeneralRe: suspending layout, useragents, and creating shortcuts... Pin
Heath Stewart28-Dec-04 8:43
protectorHeath Stewart28-Dec-04 8:43 
GeneralRe: suspending layout, useragents, and creating shortcuts... Pin
dkarlton14-Jan-05 14:44
dkarlton14-Jan-05 14:44 
GeneralRe: suspending layout, useragents, and creating shortcuts... Pin
dkarlton29-Mar-05 5:14
dkarlton29-Mar-05 5:14 
GeneralNo ToolBarButton images in runtime Pin
Skynyrd23-Dec-04 13:30
Skynyrd23-Dec-04 13:30 
GeneralRe: No ToolBarButton images in runtime Pin
Heath Stewart23-Dec-04 20:49
protectorHeath Stewart23-Dec-04 20:49 
GeneralRe: No ToolBarButton images in runtime Pin
Skynyrd24-Dec-04 0:54
Skynyrd24-Dec-04 0:54 
GeneralSendMessage issue Pin
Aviv Halperin23-Dec-04 10:32
Aviv Halperin23-Dec-04 10:32 
GeneralRe: SendMessage issue Pin
Matt Gerrans23-Dec-04 11:30
Matt Gerrans23-Dec-04 11:30 
GeneralRe: SendMessage issue Pin
Aviv Halperin23-Dec-04 13:12
Aviv Halperin23-Dec-04 13:12 
GeneralRe: SendMessage issue Pin
Heath Stewart23-Dec-04 20:57
protectorHeath Stewart23-Dec-04 20:57 
GeneralRe: SendMessage issue Pin
Aviv Halperin24-Dec-04 4:02
Aviv Halperin24-Dec-04 4:02 
GeneralRe: SendMessage issue Pin
Heath Stewart27-Dec-04 10:12
protectorHeath Stewart27-Dec-04 10:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.