Vbnet
Vbnet
o Descrip on: Provides instance methods for file opera ons and file proper es.
1. Window: o Example: fileInfo.Length
o Descrip on: The main container for an applica on's UI, typically with a tle bar, borders, and control bu ons 3. Directory:
(minimize, maximize, close). o Descrip on: Provides sta c methods for directory opera ons (create, delete, move).
2. Bu on: o Example: Directory.GetFiles(path)
o Descrip on: A clickable element that performs an ac on when clicked. 4. DirectoryInfo:
o Example: "OK", "Cancel" o Descrip on: Provides instance methods for directory opera ons and proper es.
3. TextBox: o Example: directoryInfo.GetFiles()
o Descrip on: A field where users can enter and edit text. 5. StreamReader:
o Example: Input forms o Descrip on: Reads characters from a byte stream in a par cular encoding.
4. Label: o Example: streamReader.ReadLine()
o Descrip on: Displays sta c text or informa on. 6. StreamWriter:
o Example: Descrip ons, instruc ons o Descrip on: Writes characters to a stream in a par cular encoding.
5. CheckBox: o Example: streamWriter.WriteLine("text")
o Descrip on: A box that can be checked or unchecked to represent a binary choice. 7. BinaryReader:
o Example: "Accept Terms and Condi ons" o Descrip on: Reads primi ve data types as binary values.
6. RadioBu on: o Example: binaryReader.ReadInt32()
o Descrip on: Allows users to select one op on from a group of choices. 8. BinaryWriter:
o Example: Selec ng gender o Descrip on: Writes primi ve data types in binary format.
7. ComboBox: o Example: binaryWriter.Write(123)
o Descrip on: A drop-down list that allows users to select one op on from a list. 9. Path:
o Example: Selec ng a country from a list o Descrip on: Performs opera ons on String instances that contain file or directory path informa on.
8. ListBox: o Example: Path.Combine(path1, path2)
o Descrip on: Displays a list of items from which the user can select one or more. A dialog box in VB.NET is a small window that prompts the user to perform an ac on or provides informa on. It
o Example: File selec on dialog usually requires the user to interact with it before returning to the main applica on.
9. Menu: Types of Dialog Boxes in VB.NET
o Descrip on: A set of commands or op ons presented in a drop-down list. 1. MessageBox:
o Example: File, Edit, View menus o Purpose: Displays a message to the user.
10. ToolBar: o Example: MessageBox.Show("Hello, world!")
o Descrip on: A set of bu ons or icons for quick access to commonly used func ons. 2. InputBox:
o Example: Save, Open, Print icons o Purpose: Prompts the user to enter text.
11. StatusBar: o Example: Dim userInput As String = InputBox("Enter your name:")
o Descrip on: Displays status informa on about the applica on or current opera on. 3. OpenFileDialog:
o Example: "Ready", "Loading" o Purpose: Allows the user to select a file to open.
12. ScrollBar: o Example:
o Descrip on: Allows the user to scroll content ver cally or horizontally. vb
o Example: Scrolling through a document Copy code
13. Panel: Dim openFileDialog As New OpenFileDialog()
o Descrip on: A container that can hold other UI elements, allowing for complex layouts. If openFileDialog.ShowDialog() = DialogResult.OK Then
o Example: Grouping related controls Dim filePath As String = openFileDialog.FileName
14. TabControl: End If
o Descrip on: A control that contains mul ple tabs, each with its own set of controls. 4. SaveFileDialog:
o Example: Tabbed se ngs dialogs o Purpose: Allows the user to select a file loca on to save.
15. ProgressBar: o Example:
o Descrip on: Visual representa on of a task's progress. vb
o Example: File download progress Copy code
FileStream is a class in the System.IO namespace used to read from and write to files. It provides a way to work with Dim saveFileDialog As New SaveFileDialog()
file contents at a low level, offering both synchronous and asynchronous methods for file opera ons. If saveFileDialog.ShowDialog() = DialogResult.OK Then
Commonly Used System.IO Classes Dim filePath As String = saveFileDialog.FileName
1. File: End If
o Descrip on: Provides sta c methods for file opera ons (create, copy, delete, move, open). 5. FolderBrowserDialog:
o Example: File.ReadAllText(path) o Purpose: Allows the user to select a folder.
2. FileInfo: o Example: