Search Results

Search found 2 results on 1 pages for 'holman716'.

Page 1/1 | 1 

  • Launching default browser with html from file, then jump to specific anchor

    - by Holman716
    I need to open an html file from the program root directory and have it jump to a specified anchor. I can open the file perfectly fine with a simple System.Diagnostics.Process.Start("site.html") but as soon as I try to add the anchor to the end it ceases to be able to find the file. I was able to put the anchor in there and still have it launch with string Anchor Anchor = "file:///" + Environment.CurrentDirectory.ToString().Replace("\", "/") + "/site.html#Anchor"; System.Diagnostics.Process.Start(Anchor); However as soon as the browser launches it drops the anchor. Any suggestions?

    Read the article

  • Check if class has been instantiated

    - by Holman716
    In my current program I have a main window and a secondary window that pops up when a button is pressed. If the secondary window is currently shown but doesn't have focus the button will instead bring it to focus. At this time I am creating a new instance of the secondary window as the main window loads and simply checking its status with SubWindow.IsDisposed and SubWindow.CanFocus I have found that if I do not create a new instance at the beginning SubWindow.IsDisposed throws an exception. As long as I'd previously created an instance of SubWindow the check runs fine. My question- The current version works fine but is there a better way of doing this? It is not a huge concern, but it feels like it'd be better to be able to check for existence without having to guarantee that it has existed at least once before.

    Read the article

1