Click here to Skip to main content
15,895,011 members
Articles / Desktop Programming / Windows Forms

Image Viewer UserControl

Rate me:
Please Sign up or sign in to vote.
4.97/5 (110 votes)
12 Sep 2011CPOL10 min read 375.6K   26.7K   297  
The article is about a UserControl I wrote. Opposed to PictureBoxes and other methods of displaying images on your forms, this one provides a totally different approach.
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    <ProductVersion>9.0.30729</ProductVersion>
    <SchemaVersion>2.0</SchemaVersion>
    <ProjectGuid>{68D11DDD-0081-4037-99D4-69B3AFCBDD8D}</ProjectGuid>
    <OutputType>Library</OutputType>
    <AppDesignerFolder>Properties</AppDesignerFolder>
    <RootNamespace>KaiwaProjects</RootNamespace>
    <AssemblyName>KP-ImageViewerV2</AssemblyName>
    <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
    <FileAlignment>512</FileAlignment>
    <FileUpgradeFlags>
    </FileUpgradeFlags>
    <OldToolsVersion>3.5</OldToolsVersion>
    <UpgradeBackupLocation />
    <PublishUrl>publish\</PublishUrl>
    <Install>true</Install>
    <InstallFrom>Disk</InstallFrom>
    <UpdateEnabled>false</UpdateEnabled>
    <UpdateMode>Foreground</UpdateMode>
    <UpdateInterval>7</UpdateInterval>
    <UpdateIntervalUnits>Days</UpdateIntervalUnits>
    <UpdatePeriodically>false</UpdatePeriodically>
    <UpdateRequired>false</UpdateRequired>
    <MapFileExtensions>true</MapFileExtensions>
    <ApplicationRevision>0</ApplicationRevision>
    <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
    <IsWebBootstrapper>false</IsWebBootstrapper>
    <UseApplicationTrust>false</UseApplicationTrust>
    <BootstrapperEnabled>true</BootstrapperEnabled>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <DebugSymbols>true</DebugSymbols>
    <DebugType>full</DebugType>
    <Optimize>false</Optimize>
    <OutputPath>bin\Debug\</OutputPath>
    <DefineConstants>DEBUG;TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
    <DebugType>pdbonly</DebugType>
    <Optimize>true</Optimize>
    <OutputPath>bin\Release\</OutputPath>
    <DefineConstants>TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
  </PropertyGroup>
  <ItemGroup>
    <Reference Include="System" />
    <Reference Include="System.Data" />
    <Reference Include="System.Drawing" />
    <Reference Include="System.Windows.Forms" />
    <Reference Include="System.Xml" />
  </ItemGroup>
  <ItemGroup>
    <Compile Include="KP-DrawEngine.cs" />
    <Compile Include="KP-DrawObject.cs" />
    <Compile Include="KP-ImageViewerV2.cs">
      <SubType>UserControl</SubType>
    </Compile>
    <Compile Include="KP-ImageViewerV2.Designer.cs">
      <DependentUpon>KP-ImageViewerV2.cs</DependentUpon>
    </Compile>
    <Compile Include="MultiPageImage.cs" />
    <Compile Include="PanelDoubleBuffered.cs">
      <SubType>Component</SubType>
    </Compile>
    <Compile Include="Properties\AssemblyInfo.cs" />
    <Compile Include="Properties\Resources.Designer.cs">
      <AutoGen>True</AutoGen>
      <DesignTime>True</DesignTime>
      <DependentUpon>Resources.resx</DependentUpon>
    </Compile>
    <Service Include="{94E38DFF-614B-4cbd-B67C-F211BB35CE8B}" />
  </ItemGroup>
  <ItemGroup>
    <EmbeddedResource Include="KP-ImageViewerV2.resx">
      <DependentUpon>KP-ImageViewerV2.cs</DependentUpon>
    </EmbeddedResource>
    <EmbeddedResource Include="Properties\Resources.resx">
      <Generator>ResXFileCodeGenerator</Generator>
      <LastGenOutput>Resources.Designer.cs</LastGenOutput>
      <SubType>Designer</SubType>
    </EmbeddedResource>
  </ItemGroup>
  <ItemGroup>
    <BootstrapperPackage Include="Microsoft.Net.Client.3.5">
      <Visible>False</Visible>
      <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
      <Install>false</Install>
    </BootstrapperPackage>
    <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
      <Visible>False</Visible>
      <ProductName>.NET Framework 3.5 SP1</ProductName>
      <Install>true</Install>
    </BootstrapperPackage>
    <BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
      <Visible>False</Visible>
      <ProductName>Windows Installer 3.1</ProductName>
      <Install>true</Install>
    </BootstrapperPackage>
  </ItemGroup>
  <ItemGroup>
    <EmbeddedResource Include="Resources\Drag.cur" />
  </ItemGroup>
  <ItemGroup>
    <EmbeddedResource Include="Resources\Grab.cur" />
  </ItemGroup>
  <ItemGroup>
    <None Include="Resources\btnZoomIn.png" />
  </ItemGroup>
  <ItemGroup>
    <None Include="Resources\btnZoomOut.png" />
  </ItemGroup>
  <ItemGroup>
    <None Include="Resources\btnFitToScreen.png" />
  </ItemGroup>
  <ItemGroup>
    <None Include="Resources\btnRotate270.png" />
  </ItemGroup>
  <ItemGroup>
    <None Include="Resources\btnRotate90.png" />
  </ItemGroup>
  <ItemGroup>
    <None Include="Resources\btnDrag.png" />
  </ItemGroup>
  <ItemGroup>
    <None Include="Resources\btnSelect.png" />
  </ItemGroup>
  <ItemGroup>
    <None Include="Resources\btnOpen.png" />
  </ItemGroup>
  <ItemGroup>
    <None Include="Resources\btnPreview.png" />
  </ItemGroup>
  <ItemGroup>
    <None Include="Resources\btnBack.png" />
  </ItemGroup>
  <ItemGroup>
    <None Include="Resources\btnNext.png" />
  </ItemGroup>
  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
       Other similar extension points exist, see Microsoft.Common.targets.
  <Target Name="BeforeBuild">
  </Target>
  <Target Name="AfterBuild">
  </Target>
  -->
</Project>

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
Software Developer Kaiwa-Projects
Netherlands Netherlands
Currently a student in Application Development. Is currently working towards the Game-Development business to program 3D applications.

Comments and Discussions