Click here to Skip to main content
15,891,529 members
Articles / Programming Languages / Visual Basic

ByPass difficult Automation and add applications "as is" in your .NET application

Rate me:
Please Sign up or sign in to vote.
3.40/5 (29 votes)
28 Dec 2004CPOL4 min read 154.2K   3K   74  
Fed up with automation? Need to add components as is to your application? Try this out.
<VisualStudioProject>
    <VisualBasic
        ProjectType = "Local"
        ProductVersion = "7.10.3077"
        SchemaVersion = "2.0"
        ProjectGuid = "{DFCD5B32-1434-4508-B9C5-C97F1DB7A874}"
    >
        <Build>
            <Settings
                ApplicationIcon = ""
                AssemblyKeyContainerName = ""
                AssemblyName = "InteractWithApplications"
                AssemblyOriginatorKeyFile = ""
                AssemblyOriginatorKeyMode = "None"
                DefaultClientScript = "JScript"
                DefaultHTMLPageLayout = "Grid"
                DefaultTargetSchema = "IE50"
                DelaySign = "false"
                OutputType = "WinExe"
                OptionCompare = "Binary"
                OptionExplicit = "On"
                OptionStrict = "Off"
                RootNamespace = "InteractWithApplications"
                StartupObject = "InteractWithApplications.Calculator"
            >
                <Config
                    Name = "Debug"
                    BaseAddress = "285212672"
                    ConfigurationOverrideFile = ""
                    DefineConstants = ""
                    DefineDebug = "true"
                    DefineTrace = "true"
                    DebugSymbols = "true"
                    IncrementalBuild = "true"
                    Optimize = "false"
                    OutputPath = "bin\"
                    RegisterForComInterop = "false"
                    RemoveIntegerChecks = "false"
                    TreatWarningsAsErrors = "false"
                    WarningLevel = "1"
                />
                <Config
                    Name = "Release"
                    BaseAddress = "285212672"
                    ConfigurationOverrideFile = ""
                    DefineConstants = ""
                    DefineDebug = "false"
                    DefineTrace = "true"
                    DebugSymbols = "false"
                    IncrementalBuild = "false"
                    Optimize = "true"
                    OutputPath = "bin\"
                    RegisterForComInterop = "false"
                    RemoveIntegerChecks = "false"
                    TreatWarningsAsErrors = "false"
                    WarningLevel = "1"
                />
            </Settings>
            <References>
                <Reference
                    Name = "System"
                    AssemblyName = "System"
                />
                <Reference
                    Name = "System.Data"
                    AssemblyName = "System.Data"
                />
                <Reference
                    Name = "System.Drawing"
                    AssemblyName = "System.Drawing"
                />
                <Reference
                    Name = "System.Windows.Forms"
                    AssemblyName = "System.Windows.Forms"
                />
                <Reference
                    Name = "System.XML"
                    AssemblyName = "System.Xml"
                />
                <Reference
                    Name = "Interop.SHDocVw"
                    AssemblyName = "Interop.SHDocVw"
                    HintPath = "..\..\WindowsApplication1\bin\Debug\Interop.SHDocVw.dll"
                />
                <Reference
                    Name = "AxInterop.SHDocVw"
                    AssemblyName = "AxInterop.SHDocVw"
                    HintPath = "..\..\WindowsApplication1\bin\Debug\AxInterop.SHDocVw.dll"
                />
                <Reference
                    Name = "Microsoft.mshtml"
                    AssemblyName = "Microsoft.mshtml"
                    HintPath = "C:\Program Files\Microsoft.NET\Primary Interop Assemblies\Microsoft.mshtml.dll"
                    AssemblyFolderKey = "hklm\primary interop assemblies"
                />
            </References>
            <Imports>
                <Import Namespace = "Microsoft.VisualBasic" />
                <Import Namespace = "System" />
                <Import Namespace = "System.Collections" />
                <Import Namespace = "System.Data" />
                <Import Namespace = "System.Drawing" />
                <Import Namespace = "System.Diagnostics" />
                <Import Namespace = "System.Windows.Forms" />
            </Imports>
        </Build>
        <Files>
            <Include>
                <File
                    RelPath = "AssemblyInfo.vb"
                    SubType = "Code"
                    BuildAction = "Compile"
                />
                <File
                    RelPath = "Calculator.vb"
                    SubType = "Form"
                    BuildAction = "Compile"
                />
                <File
                    RelPath = "Calculator.resx"
                    DependentUpon = "Calculator.vb"
                    BuildAction = "EmbeddedResource"
                />
                <File
                    RelPath = "ExternalCalc.vb"
                    SubType = "Form"
                    BuildAction = "Compile"
                />
                <File
                    RelPath = "ExternalCalc.resx"
                    DependentUpon = "ExternalCalc.vb"
                    BuildAction = "EmbeddedResource"
                />
                <File
                    RelPath = "IEDom.vb"
                    SubType = "Code"
                    BuildAction = "Compile"
                />
                <File
                    RelPath = "Win32Functions.vb"
                    SubType = "Code"
                    BuildAction = "Compile"
                />
            </Include>
        </Files>
    </VisualBasic>
</VisualStudioProject>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Architect
Pakistan Pakistan
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions