Skip to content

Fixes miscellaneous issues in Visual Basic content #1268

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 22, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions docs/visual-basic/developing-apps/accessing-data.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: "Accessing Data in Visual Basic Applications | Microsoft Docs"
title: "Accessing data in Visual Basic applications | Microsoft Docs"
ms.custom: ""
ms.date: "2015-07-20"
ms.prod: "visual-studio-dev14"
Expand Down Expand Up @@ -34,10 +34,10 @@ translation.priority.ht:
- "zh-cn"
- "zh-tw"
---
# Accessing Data in Visual Basic Applications
[!INCLUDE[vbprvb](../../csharp/programming-guide/concepts/linq/includes/vbprvb_md.md)] includes several new features to assist in developing applications that access data. Data-bound forms for Windows applications are created by dragging items from the [Data Sources Window](/visualstudio/data-tools/bind-controls-to-data-in-visual-studio) onto the form. You bind controls to data by dragging items from the **Data Sources Window** onto existing controls.
# Accessing data in Visual Basic applications
[!INCLUDE[vbprvb](../../csharp/programming-guide/concepts/linq/includes/vbprvb_md.md)] includes several new features to assist in developing applications that access data.

## Related Sections
## Related sections
[Creating Data Applications](/visualstudio/data-tools/creating-data-applications)
Provides links to pages that discuss incorporating data access functionality into your applications.

Expand Down Expand Up @@ -76,6 +76,4 @@ translation.priority.ht:

[ADO.NET](https://msdn.microsoft.com/library/e80y5yhx.aspx)
Describes the ADO.NET classes, which expose data-access services to the .NET Framework programmer.

[Data in Office Solutions](/office-dev/office-dev/data-in-office-solutions)
Contains links to pages that explain how data works in Office solutions, including information about schema-oriented programming, data caching, and server-side data access.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: "Packaging and Deploying Custom My Extensions (Visual Basic) | Microsoft Docs"
title: "Packaging and deploying custom My extensions (Visual Basic) | Microsoft Docs"
ms.custom: ""
ms.date: "2015-07-20"
ms.prod: "visual-studio-dev14"
Expand Down Expand Up @@ -35,7 +35,7 @@ translation.priority.ht:
- "zh-cn"
- "zh-tw"
---
# Packaging and Deploying Custom My Extensions (Visual Basic)
# Packaging and deploying custom My extensions (Visual Basic)
Visual Basic provides an easy way for you to deploy your custom `My` namespace extensions by using Visual Studio templates. If you are creating a project template for which your `My` extensions are an integral part of the new project type, you can just include your custom `My` extension code with the project when you export the template. For more information about exporting project templates, see [How to: Create Project Templates](http://msdn.microsoft.com/library/a1a6999d-a34c-48a8-b1cf-027eb5c76398).

If your custom `My` extension is in a single code file, you can export the file as an item template that users can add to any type of Visual Basic project. You can then customize the item template to enable additional capabilities and behavior for your custom `My` extension in a Visual Basic project. Those capabilities include the following:
Expand All @@ -48,19 +48,19 @@ Visual Basic provides an easy way for you to deploy your custom `My` namespace e

This topic discusses how to package a custom `My` extension as a hidden item template that can be managed from the **My Extensions** page of the Visual Basic Project Designer. The custom `My` extension can also be added automatically when a reference to a specified assembly is added to a project.

## Create a My Namespace Extension
## Create a My namespace extension
The first step in creating a deployment package for a custom `My` extension is to create the extension as a single code file. For details and guidance about how to create a custom `My` extension, see [Extending the My Namespace in Visual Basic](../../../visual-basic/developing-apps/customizing-extending-my/extending-the-my-namespace.md).

## Export a My Namespace Extension as an Item Template
## Export a My namespace extension as an item template
After you have a code file that includes your `My` namespace extension, you can export the code file as a Visual Studio item template. For instructions on how to export a file as a Visual Studio item template, see [How to: Create Item Templates](http://msdn.microsoft.com/library/77bc53d4-d607-4820-a032-7e3b365891b5).

> [!NOTE]
> If your `My` namespace extension has a dependency on a particular assembly, you can customize your item template to automatically install your `My` namespace extension when a reference to that assembly is added. As a result, you will want to exclude that assembly reference when you export the code file as a Visual Studio item template.

## Customize the Item Template
## Customize the item template
You can enable your item template to be managed from the **My Extensions** page of the Visual Basic Project Designer. You can also enable the item template to be added automatically when a reference to a specified assembly is added to a project. To enable these customizations, you will add a new file, called the CustomData file, to your template, and then add a new element to the XML in your .vstemplate file.

### Add the CustomData File
### Add the CustomData file
The CustomData file is a text file that has a file name extension of .CustomData (the file name can be set to any value meaningful to your template) and that contains XML. The XML in the CustomData file instructs Visual Basic to include your `My` extension when users use the **My Extensions** page of the Visual Basic Project Designer. You can optionally add the <`AssemblyFullName>` attribute to your CustomData file XML. This instructs Visual Basic to automatically install your custom `My` extension when a reference to a particular assembly is added to the project. You can use any text editor or XML editor to create the CustomData file, and then add it to your item template's compressed folder (.zip file).

For example, the following XML shows the contents of a CustomData file that will add the template item to the My Extensions folder of a Visual Basic project when a reference to the Microsoft.VisualBasic.PowerPacks.Vs.dll assembly is added to the project.
Expand All @@ -81,7 +81,7 @@ Visual Basic provides an easy way for you to deploy your custom `My` namespace e
|`Version`|Required. A version number for the item template.|
|`AssemblyFullName`|Optional. An assembly name. When a reference to this assembly is added to the project, the user will be prompted to add the `My` extension from this item template.|

### Add the \<CustomDataSignature> Element to the .vstemplate File
### Add the \<CustomDataSignature> element to the .vstemplate file
To identify your Visual Studio item template as a `My` namespace extension, you must also modify the .vstemplate file for your item template. You must add a `<CustomDataSignature>` element to the `<TemplateData>` element. The `<CustomDataSignature>` element must contain the text `Microsoft.VisualBasic.MyExtension`, as shown in the following example.

```
Expand Down Expand Up @@ -113,10 +113,10 @@ Visual Basic provides an easy way for you to deploy your custom `My` namespace e
</VSTemplate>
```

## Install the Template
To install the template, you can copy the compressed folder (.zip file) to the Visual Basic item templates folder (for example, My Documents\Visual Studio 2008\Templates\Item Templates\Visual Basic). Alternatively, you can publish the template as a Visual Studio Installer (.vsi) file. For information about publishing your template as a Visual Studio Installer file, see [NIB: How to: Publish Project Templates](http://msdn.microsoft.com/en-us/b9087f58-64e9-4767-bf54-e3bf40d63b20).
## Install the template
To install the template, you can copy the compressed folder (.zip file) to the Visual Basic item templates folder (for example, My Documents\Visual Studio 2008\Templates\Item Templates\Visual Basic). Alternatively, you can publish the template as a Visual Studio Installer (.vsi) file.

## See Also
## See also
[Extending the My Namespace in Visual Basic](../../../visual-basic/developing-apps/customizing-extending-my/extending-the-my-namespace.md)
[Extending the Visual Basic Application Model](../../../visual-basic/developing-apps/customizing-extending-my/extending-the-visual-basic-application-model.md)
[Customizing Which Objects are Available in My](../../../visual-basic/developing-apps/customizing-extending-my/customizing-which-objects-are-available-in-my.md)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: "Deploying Applications That Reference the PrintForm Component (Visual Basic) | Microsoft Docs"
title: "Deploying applications that reference the PrintForm component (Visual Basic) | Microsoft Docs"
ms.custom: ""
ms.date: "2015-07-20"
ms.prod: "visual-studio-dev14"
Expand Down Expand Up @@ -34,12 +34,12 @@ translation.priority.mt:
- "pt-br"
- "tr-tr"
---
# Deploying Applications That Reference the PrintForm Component (Visual Basic)
# Deploying applications that reference the PrintForm component (Visual Basic)
If you want to deploy an application that references the <xref:Microsoft.VisualBasic.PowerPacks.Printing.PrintForm> component, the component must be installed on the destination computer.

The PowerPack controls are no longer included in Visual Studio, but you can download them from the [Download Center](http://www.microsoft.com/en-us/download/details.aspx?id=25169).

## Installing the PrintForm as a Prerequisite
## Installing the PrintForm as a prerequisite
To successfully deploy an application, you must also deploy all components that are referenced by the application. The process of installing prerequisite components is known as *bootstrapping*.

When the <xref:Microsoft.VisualBasic.PowerPacks.Printing.PrintForm> component is installed on your development computer, a Microsoft Visual Basic Power Packs bootstrapper package is added to the [!INCLUDE[vsprvs](../../../csharp/includes/vsprvs_md.md)] bootstrapper directory. This package is then available when you follow the procedures for adding prerequisites for either [!INCLUDE[ndptecclick](../../../visual-basic/developing-apps/printing/includes/ndptecclick_md.md)] or Windows Installer deployment.
Expand All @@ -53,7 +53,6 @@ If you want to deploy an application that references the <xref:Microsoft.VisualB

As an alternative to bootstrapping, you can pre-deploy the <xref:Microsoft.VisualBasic.PowerPacks.Printing.PrintForm> component by using an electronic software distribution system like Microsoft Systems Management Server.

## See Also
## See also
[How to: Install Prerequisites with a ClickOnce Application](http://msdn.microsoft.com/library/e964fca5-fdfd-47cf-a1c9-7fb96b1c88b5)
[Not in Build: Choosing a Deployment Strategy](http://msdn.microsoft.com/en-us/ecd632d8-063c-4028-b785-81bba045107b)
[PrintForm Component](../../../visual-basic/developing-apps/printing/printform-component.md)
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: "Accessing Application Settings (Visual Basic) | Microsoft Docs"
title: "Accessing application settings (Visual Basic) | Microsoft Docs"
ms.custom: ""
ms.date: "2015-07-20"
ms.prod: "visual-studio-dev14"
Expand Down Expand Up @@ -34,7 +34,7 @@ translation.priority.ht:
- "zh-cn"
- "zh-tw"
---
# Accessing Application Settings (Visual Basic)
# Accessing application settings (Visual Basic)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might this be better as "Accessing application settings in Visual Basic"?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might, but most of the topics in MSDN use this convention. It would be a major work item to change all of them; the purpose of this PR is simply to fix the links.

This section contains topics describing the `My.Settings` object and the tasks it enables you to accomplish.

## My.Settings
Expand All @@ -52,9 +52,6 @@ This section contains topics describing the `My.Settings` object and the tasks i
|Save updated user setting values|[How to: Persist User Settings in Visual Basic](../../../../visual-basic/developing-apps/programming/app-settings/how-to-persist-user-settings.md)|
|Determine the values of user settings|[How to: Read Application Settings in Visual Basic](../../../../visual-basic/developing-apps/programming/app-settings/how-to-read-application-settings.md)|

## See Also
[Managing Application Settings (.NET)](/visualstudio/ide/managing-application-settings-dotnet)
[How To: Read Settings at Run Time With C#](http://msdn.microsoft.com/library/dbe8bf09-5e1c-49da-9192-154033d7240b)
[How To: Write User Settings at Run Time with C#](http://msdn.microsoft.com/library/9d061c7d-b33b-470f-a36d-edccb1d6f9a3)
## See also
[Managing Application Settings (.NET)](/visualstudio/ide/managing-application-settings-dotnet)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this one works. did you want to take it out?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It wasn't working when I checked it - I'll add it back

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good. I've been planning to send an email to the team on the cross-repo links. Check your inbox and send me your thoughts!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Turns out that I had removed this link then added it back in the previous commit. No further changes, so I'm going to merge.

[My.Settings Object](../../../../visual-basic/language-reference/objects/my-settings-object.md)
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: "Storing Data to and Reading from the Clipboard (Visual Basic) | Microsoft Docs"
title: "Storing data to and reading from the Clipboard (Visual Basic) | Microsoft Docs"
ms.custom: ""
ms.date: "2015-07-20"
ms.prod: "visual-studio-dev14"
Expand Down Expand Up @@ -38,7 +38,7 @@ translation.priority.ht:
- "zh-cn"
- "zh-tw"
---
# Storing Data to and Reading from the Clipboard (Visual Basic)
# Storing data to and reading from the Clipboard (Visual Basic)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here again, perhaps "Storing data....with Visual Basic."

The Clipboard can be used to store data, such as text and images. Because the Clipboard is shared by all active processes, it can be used to transfer data between them. The `My.Computer.Clipboard` object allows you to easily access the Clipboard and to read from and write to it.

## Reading from the Clipboard
Expand Down Expand Up @@ -90,9 +90,9 @@ The Clipboard can be used to store data, such as text and images. Because the Cl
> [!IMPORTANT]
> Because the Clipboard can be accessed by other users, do not use it to store sensitive information, such as passwords or confidential data.

## See Also
## See also
<xref:Microsoft.VisualBasic.MyServices.ClipboardProxy>
<xref:Microsoft.VisualBasic.MyServices.ClipboardProxy.GetAudioStream%2A>
<xref:Microsoft.VisualBasic.MyServices.ClipboardProxy.SetDataObject%2A>
[How to: Read Object Data from an XML File](http://msdn.microsoft.com/library/7e677b93-7526-4f22-9de7-9dffa4c62ef3)
[How to: Write Object Data to an XML File](http://msdn.microsoft.com/library/279c232a-cee5-4e3c-9710-3696875c8ee4)
[How to: Read Object Data from an XML File](../../../programming-guide/concepts/serialization/how-to-read-object-data-from-an-xml-file.md)
[How to: Write Object Data to an XML File](../../../programming-guide/concepts/serialization/how-to-write-object-data-to-an-xml-file.md)
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: "How to: Read From Comma-Delimited Text Files in Visual Basic | Microsoft Docs"
title: "How to: read from comma-delimited text files in Visual Basic | Microsoft Docs"
ms.custom: ""
ms.date: "2015-07-20"
ms.prod: "visual-studio-dev14"
Expand Down Expand Up @@ -36,7 +36,7 @@ translation.priority.ht:
- "zh-cn"
- "zh-tw"
---
# How to: Read From Comma-Delimited Text Files in Visual Basic
# How to: read from comma-delimited text files in Visual Basic
The `TextFieldParser` object provides a way to easily and efficiently parse structured text files, such as logs. The `TextFieldType` property defines whether it is a delimited file or one with fixed-width fields of text.

### To parse a comma delimited text file
Expand All @@ -62,7 +62,7 @@ The `TextFieldParser` object provides a way to easily and efficiently parse stru

[!code-vb[VbFileIORead#19](../../../../visual-basic/developing-apps/programming/drives-directories-files/codesnippet/VisualBasic/how-to-read-from-comma-delimited-text-files_5.vb)]

## Robust Programming
## Robust programming
The following conditions may cause an exception:

- A row cannot be parsed using the specified format (<xref:Microsoft.VisualBasic.FileIO.MalformedLineException>). The exception message specifies the line causing the exception, while the <xref:Microsoft.VisualBasic.FileIO.TextFieldParser.ErrorLine%2A> property is assigned the text contained in the line.
Expand All @@ -75,11 +75,10 @@ The `TextFieldParser` object provides a way to easily and efficiently parse stru

- The user does not have sufficient permissions to access the file (<xref:System.UnauthorizedAccessException>).

## See Also
## See also
<xref:Microsoft.VisualBasic.FileIO.TextFieldParser?displayProperty=fullName>
[How to: Read From Fixed-width Text Files](../../../../visual-basic/developing-apps/programming/drives-directories-files/how-to-read-from-fixed-width-text-files.md)
[How to: Read From Text Files with Multiple Formats](../../../../visual-basic/developing-apps/programming/drives-directories-files/how-to-read-from-text-files-with-multiple-formats.md)
[Parsing Text Files with the TextFieldParser Object](../../../../visual-basic/developing-apps/programming/drives-directories-files/parsing-text-files-with-the-textfieldparser-object.md)
[Walkthrough: Manipulating Files and Directories in Visual Basic](../../../../visual-basic/developing-apps/programming/drives-directories-files/walkthrough-manipulating-files-and-directories.md)
[Troubleshooting: Reading from and Writing to Text Files](../../../../visual-basic/developing-apps/programming/drives-directories-files/troubleshooting-reading-from-and-writing-to-text-files.md)
[Troubleshooting Exceptions: Microsoft.VisualBasic.FileIO.TextFieldParser.MalformedLineException](http://msdn.microsoft.com/library/d780b8cc-c3f1-45ed-8f8e-3f8728a4b770)
[Troubleshooting: Reading from and Writing to Text Files](../../../../visual-basic/developing-apps/programming/drives-directories-files/troubleshooting-reading-from-and-writing-to-text-files.md)
Loading