Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit bd1b7d1

Browse files
DevExpressExampleBotDevExpressExampleBot
DevExpressExampleBot
authored and
DevExpressExampleBot
committed
Source auto update [skip ci]
1 parent 3f88e6c commit bd1b7d1

File tree

3 files changed

+30
-55
lines changed

3 files changed

+30
-55
lines changed

‎VB/AddFormFieldsToNewDocument/AddFormFieldsToNewDocument.vbproj

Lines changed: 11 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,39 +2,38 @@
22
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
44
<PropertyGroup>
5+
<OptionInfer>On</OptionInfer>
56
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
67
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
78
<ProjectGuid>{610C6980-EC91-4C1A-849F-6F6A53391D83}</ProjectGuid>
89
<OutputType>Exe</OutputType>
9-
<RootNamespace></RootNamespace>
10+
<AppDesignerFolder>Properties</AppDesignerFolder>
11+
<RootNamespace>
12+
</RootNamespace>
1013
<AssemblyName>AddFormFieldsToNewDocument</AssemblyName>
1114
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
1215
<FileAlignment>512</FileAlignment>
1316
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
14-
<OptionExplicit>On</OptionExplicit>
15-
<OptionCompare>Binary</OptionCompare>
16-
<OptionStrict>Off</OptionStrict>
17-
<OptionInfer>On</OptionInfer>
1817
</PropertyGroup>
1918
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
2019
<PlatformTarget>AnyCPU</PlatformTarget>
2120
<DebugSymbols>true</DebugSymbols>
2221
<DebugType>full</DebugType>
2322
<Optimize>false</Optimize>
2423
<OutputPath>bin\Debug\</OutputPath>
25-
<DefineDebug>true</DefineDebug>
26-
<DefineTrace>true</DefineTrace>
24+
<DefineConstants>DEBUG,TRACE</DefineConstants>
2725
<ErrorReport>prompt</ErrorReport>
28-
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
26+
<WarningLevel>4</WarningLevel>
27+
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
2928
</PropertyGroup>
3029
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
3130
<PlatformTarget>AnyCPU</PlatformTarget>
3231
<DebugType>pdbonly</DebugType>
3332
<Optimize>true</Optimize>
3433
<OutputPath>bin\Release\</OutputPath>
35-
<DefineDebug>false</DefineDebug>
36-
<DefineTrace>true</DefineTrace>
34+
<DefineConstants>TRACE</DefineConstants>
3735
<ErrorReport>prompt</ErrorReport>
36+
<WarningLevel>4</WarningLevel>
3837
</PropertyGroup>
3938
<ItemGroup>
4039
<Reference Include="DevExpress.Docs.v17.1, Version=17.1.17.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
@@ -50,26 +49,15 @@
5049
<Reference Include="System.Net.Http" />
5150
<Reference Include="System.Xml" />
5251
</ItemGroup>
53-
<ItemGroup>
54-
<Import Include="Microsoft.VisualBasic" />
55-
<Import Include="System.Collections.Generic" />
56-
<Import Include="System.Collections" />
57-
<Import Include="System.Diagnostics" />
58-
<Import Include="System.Linq" />
59-
<Import Include="System.Xml.Linq" />
60-
<Import Include="System.Data" />
61-
<Import Include="System.Drawing" />
62-
<Import Include="System" />
63-
</ItemGroup>
6452
<ItemGroup>
6553
<Compile Include="Program.vb" />
66-
<Compile Include="My Project\AssemblyInfo.vb" />
54+
<Compile Include="Properties\AssemblyInfo.vb" />
6755
</ItemGroup>
6856
<ItemGroup>
6957
<None Include="App.config" />
7058
</ItemGroup>
7159
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
72-
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
60+
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
7361
Other similar extension points exist, see Microsoft.Common.targets.
7462
<Target Name="BeforeBuild">
7563
</Target>

‎VB/AddFormFieldsToNewDocument/Program.vb

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,41 @@
1-
Imports DevExpress.Pdf
1+
Imports DevExpress.Pdf
22
Imports System.Drawing
33

44
Namespace AddFormFieldsToNewDocument
5+
56
Friend Class Program
6-
Shared Sub Main(ByVal args() As String)
7-
Using processor As New PdfDocumentProcessor()
87

8+
Shared Sub Main(ByVal args As String())
9+
Using processor As PdfDocumentProcessor = New PdfDocumentProcessor()
910
' Create an empty document.
1011
processor.CreateEmptyDocument("..\..\Result.pdf")
11-
1212
' Create graphics and draw form fields.
1313
Using graphics As PdfGraphics = processor.CreateGraphics()
1414
DrawFormFields(graphics)
15-
1615
' Render a page with graphics.
1716
processor.RenderNewPage(PdfPaperSize.Letter, graphics)
1817
End Using
1918
End Using
2019
End Sub
2120

2221
Private Shared Sub DrawFormFields(ByVal graphics As PdfGraphics)
23-
2422
' Create a text box field and specify its location on the page.
25-
Dim textBox As New PdfGraphicsAcroFormTextBoxField("text box", New RectangleF(30, 10, 200, 30))
26-
23+
Dim textBox As PdfGraphicsAcroFormTextBoxField = New PdfGraphicsAcroFormTextBoxField("text box", New RectangleF(30, 10, 200, 30))
2724
' Specify text box text, and appearance.
2825
textBox.Text = "Text Box"
2926
textBox.Appearance.FontSize = 12
3027
textBox.Appearance.BackgroundColor = Color.AliceBlue
31-
3228
' Add the text box field to graphics.
3329
graphics.AddFormField(textBox)
34-
3530
' Create a radio group field.
36-
Dim radioGroup As New PdfGraphicsAcroFormRadioGroupField("First Group")
37-
31+
Dim radioGroup As PdfGraphicsAcroFormRadioGroupField = New PdfGraphicsAcroFormRadioGroupField("First Group")
3832
' Add the first radio button to the group and specify its location using a RectangleF object.
3933
radioGroup.AddButton("button1", New RectangleF(30, 60, 20, 20))
40-
4134
' Add the second radio button to the group.
4235
radioGroup.AddButton("button2", New RectangleF(30, 90, 20, 20))
43-
4436
' Specify radio group selected index, and appearance.
4537
radioGroup.SelectedIndex = 0
4638
radioGroup.Appearance.BorderAppearance = New PdfGraphicsAcroFormBorderAppearance() With {.Color = Color.Red, .Width = 3}
47-
4839
' Add the radio group field to graphics.
4940
graphics.AddFormField(radioGroup)
5041
End Sub
Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,23 @@
1-
Imports System.Reflection
2-
Imports System.Runtime.CompilerServices
1+
Imports System.Reflection
32
Imports System.Runtime.InteropServices
43

54
' General Information about an assembly is controlled through the following
65
' set of attributes. Change these attribute values to modify the information
76
' associated with an assembly.
8-
<Assembly: AssemblyTitle("AddFormFieldsToNewDocument")>
9-
<Assembly: AssemblyDescription("")>
10-
<Assembly: AssemblyConfiguration("")>
11-
<Assembly: AssemblyCompany("")>
12-
<Assembly: AssemblyProduct("AddFormFieldsToNewDocument")>
13-
<Assembly: AssemblyCopyright("Copyright © 2017")>
14-
<Assembly: AssemblyTrademark("")>
15-
<Assembly: AssemblyCulture("")>
16-
7+
<Assembly:AssemblyTitle("AddFormFieldsToNewDocument")>
8+
<Assembly:AssemblyDescription("")>
9+
<Assembly:AssemblyConfiguration("")>
10+
<Assembly:AssemblyCompany("")>
11+
<Assembly:AssemblyProduct("AddFormFieldsToNewDocument")>
12+
<Assembly:AssemblyCopyright("Copyright © 2017")>
13+
<Assembly:AssemblyTrademark("")>
14+
<Assembly:AssemblyCulture("")>
1715
' Setting ComVisible to false makes the types in this assembly not visible
1816
' to COM components. If you need to access a type in this assembly from
1917
' COM, set the ComVisible attribute to true on that type.
20-
<Assembly: ComVisible(False)>
21-
18+
<Assembly:ComVisible(False)>
2219
' The following GUID is for the ID of the typelib if this project is exposed to COM
23-
<Assembly: Guid("610c6980-ec91-4c1a-849f-6f6a53391d83")>
24-
20+
<Assembly:Guid("610c6980-ec91-4c1a-849f-6f6a53391d83")>
2521
' Version information for an assembly consists of the following four values:
2622
'
2723
' Major Version
@@ -32,5 +28,5 @@ Imports System.Runtime.InteropServices
3228
' You can specify all the values or you can default the Build and Revision Numbers
3329
' by using the '*' as shown below:
3430
' [assembly: AssemblyVersion("1.0.*")]
35-
<Assembly:AssemblyVersion("1.0.0.0")>
36-
<Assembly:AssemblyFileVersion("1.0.0.0")>
31+
<Assembly:AssemblyVersion("1.0.0.0")>
32+
<Assembly:AssemblyFileVersion("1.0.0.0")>

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /