SlideShare a Scribd company logo
1 of 7
Windows Controls in C#.Net
 SaveFileDialog Control
 ListBox Control
The ListBox Control
Methods Description
ClearSelected() Unselects all selected items of the ListBox.
FindString() Finds the first item in the ListBox that starts with the specified string.
The search starts at a specified index.
FindStringExact() Finds the first item in the ListBox that matches the specified string.
GetSelected() Tells whether the item in the specified index is selected.
SetSelected() Selects or deselects the item at the specified index.
 The ListBox control is used to show a list of strings which you can
select. By default, you can only select one item.
 The ListBox control is best used if you are trying to display a large
number of items. TEvent vName Description
ItemCheck
(CheckedListBox only) Occurs when the check state of one of the list
items changes
SelectedIndexChanged Occurs when the index of the selected item changes
Property Description
ColumnWidth Specifies the width of each column if MultiColumn is set to true.
DataSource Specifies the source of data that the ListBox will display.
Items Contains the items that the ListBox will display.
MultiColumn Tells whether the ListBox supports multiple columns.
SelectedIndex The zero-based index of the selected item.
SelectedIndices Contains the zero-based index of each selected item.
SelectedItem Returns the selected item as an object.
SelectedItems An object collection of the selected items.
SelectionMode Specifies the number of items you can select at the same time.
SelectionMode.None - you cannot select anything
SelectionMode.One - you can only select one item
SelectionMode.MultiSimple - you can select multiple items by
simply clicking them
SelectiomMode.MultiExtended - you can select multiple items by holding
ctrl, shift and arrow keys
ScrollAlwaysVisible Tells whether the scrollbars are always visible regardless of the number of items in the ListBox.
Sorted Tells whether to sort the items in the ListBox alphabetically or in ascending order.
Text If you set a string value, the first item that matches will be selected. This property returns the text of the first selected item.
Example of listbox
The SaveFileDialog Control
 The SaveFileDialog control
(System.Windows.Forms.SaveFileDialog) allows you
to save or write data to a specified file.Property Description
AddExtention Specifies whether to automatically add an extension when the user does not specify a file extension.
CheckFileExists Specifies whether to initiate a warning if the user types a file that does not exist.
CheckPathExists Specifies whether to initiate a warning if the user types a path that does not exist.
DefaultExt The default extensions to add when the user does not indicate a file extension.
FileName The file selected by the user. This can also be the default selected the file when the dialog shows up.
Filter Allows you to add a filter which are a special string indicating which types or files are only allowed to be opened by the user.
FilterIndex If multiple filters are present, this indicates which filter shows as the default starting with index 1.
InitialDirectory The initial directory that the OpenFileDialog will show.
OverwritePrompt Specifies whether the dialog will prompt you to overwrite a file when an existing file is already found.
RestoreDirectory Specifies whether to restore to default directory when the dialog closes.
Title The title of the dialog.
Windows controls in c

More Related Content

What's hot (16)

Module 8 : Implementing collections and generics
Module 8 : Implementing collections and genericsModule 8 : Implementing collections and generics
Module 8 : Implementing collections and generics
 
Array list(1)
Array list(1)Array list(1)
Array list(1)
 
Javase5generics
Javase5genericsJavase5generics
Javase5generics
 
Generic Programming & Collection
Generic Programming & CollectionGeneric Programming & Collection
Generic Programming & Collection
 
C# Directory class in c#
C# Directory class in c#C# Directory class in c#
C# Directory class in c#
 
Vp lecture 3 ararat
Vp lecture 3 araratVp lecture 3 ararat
Vp lecture 3 ararat
 
Generics
GenericsGenerics
Generics
 
Qtp day 3
Qtp day 3Qtp day 3
Qtp day 3
 
Method overloading
Method overloadingMethod overloading
Method overloading
 
Java Generics Introduction - Syntax Advantages and Pitfalls
Java Generics Introduction - Syntax Advantages and PitfallsJava Generics Introduction - Syntax Advantages and Pitfalls
Java Generics Introduction - Syntax Advantages and Pitfalls
 
CORE JAVA
CORE JAVACORE JAVA
CORE JAVA
 
Collections framework
Collections frameworkCollections framework
Collections framework
 
Java Basics
Java BasicsJava Basics
Java Basics
 
Java Inner Classes
Java Inner ClassesJava Inner Classes
Java Inner Classes
 
Android101 - Content Providers
Android101 - Content ProvidersAndroid101 - Content Providers
Android101 - Content Providers
 
Java Collections
Java  Collections Java  Collections
Java Collections
 

Viewers also liked

Open Web Camp: CSS3 Implementable Features
Open Web Camp: CSS3 Implementable FeaturesOpen Web Camp: CSS3 Implementable Features
Open Web Camp: CSS3 Implementable FeaturesEstelle Weyl
 
CSS3 Implementable Features
CSS3 Implementable FeaturesCSS3 Implementable Features
CSS3 Implementable FeaturesEstelle Weyl
 
New Elements & Features in CSS3
New Elements & Features in CSS3New Elements & Features in CSS3
New Elements & Features in CSS3Jamshid Hashimi
 
Notes windows form controls gui applications
Notes windows form controls   gui applicationsNotes windows form controls   gui applications
Notes windows form controls gui applicationsWilliam Olivier
 

Viewers also liked (7)

Open Web Camp: CSS3 Implementable Features
Open Web Camp: CSS3 Implementable FeaturesOpen Web Camp: CSS3 Implementable Features
Open Web Camp: CSS3 Implementable Features
 
CSS3 Implementable Features
CSS3 Implementable FeaturesCSS3 Implementable Features
CSS3 Implementable Features
 
Css2
Css2Css2
Css2
 
New Elements & Features in CSS3
New Elements & Features in CSS3New Elements & Features in CSS3
New Elements & Features in CSS3
 
Css2
Css2Css2
Css2
 
CSS 3 Overview
CSS 3 OverviewCSS 3 Overview
CSS 3 Overview
 
Notes windows form controls gui applications
Notes windows form controls   gui applicationsNotes windows form controls   gui applications
Notes windows form controls gui applications
 

Similar to Windows controls in c (20)

java-Unit4 chap2- awt controls and layout managers of applet
java-Unit4 chap2- awt controls and layout managers of appletjava-Unit4 chap2- awt controls and layout managers of applet
java-Unit4 chap2- awt controls and layout managers of applet
 
Basic controls in asp
Basic controls in aspBasic controls in asp
Basic controls in asp
 
COLLECTIONS.pptx
COLLECTIONS.pptxCOLLECTIONS.pptx
COLLECTIONS.pptx
 
Session 3 Bai 3 ve winform
Session 3 Bai 3 ve winformSession 3 Bai 3 ve winform
Session 3 Bai 3 ve winform
 
4. listbox
4. listbox4. listbox
4. listbox
 
Net framework session02
Net framework session02Net framework session02
Net framework session02
 
Java awt
Java awtJava awt
Java awt
 
C# Collection classes
C# Collection classesC# Collection classes
C# Collection classes
 
Generics collections
Generics collectionsGenerics collections
Generics collections
 
Unit5
Unit5Unit5
Unit5
 
Eo gaddis java_chapter_12_5e
Eo gaddis java_chapter_12_5eEo gaddis java_chapter_12_5e
Eo gaddis java_chapter_12_5e
 
Lists
ListsLists
Lists
 
Generics Collections
Generics CollectionsGenerics Collections
Generics Collections
 
Collections generic
Collections genericCollections generic
Collections generic
 
Collection Framework-1.pptx
Collection Framework-1.pptxCollection Framework-1.pptx
Collection Framework-1.pptx
 
F sharp lists & dictionary
F sharp   lists &  dictionaryF sharp   lists &  dictionary
F sharp lists & dictionary
 
Array list (java platform se 8 )
Array list (java platform se 8 )Array list (java platform se 8 )
Array list (java platform se 8 )
 
Midterm Winter 10
Midterm  Winter 10Midterm  Winter 10
Midterm Winter 10
 
CIS-166 Midterm
CIS-166 MidtermCIS-166 Midterm
CIS-166 Midterm
 
VISUAL CHEAT SHEET
VISUAL CHEAT SHEETVISUAL CHEAT SHEET
VISUAL CHEAT SHEET
 

Recently uploaded

What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 

Recently uploaded (20)

What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 

Windows controls in c

  • 3. The ListBox Control Methods Description ClearSelected() Unselects all selected items of the ListBox. FindString() Finds the first item in the ListBox that starts with the specified string. The search starts at a specified index. FindStringExact() Finds the first item in the ListBox that matches the specified string. GetSelected() Tells whether the item in the specified index is selected. SetSelected() Selects or deselects the item at the specified index.  The ListBox control is used to show a list of strings which you can select. By default, you can only select one item.  The ListBox control is best used if you are trying to display a large number of items. TEvent vName Description ItemCheck (CheckedListBox only) Occurs when the check state of one of the list items changes SelectedIndexChanged Occurs when the index of the selected item changes
  • 4. Property Description ColumnWidth Specifies the width of each column if MultiColumn is set to true. DataSource Specifies the source of data that the ListBox will display. Items Contains the items that the ListBox will display. MultiColumn Tells whether the ListBox supports multiple columns. SelectedIndex The zero-based index of the selected item. SelectedIndices Contains the zero-based index of each selected item. SelectedItem Returns the selected item as an object. SelectedItems An object collection of the selected items. SelectionMode Specifies the number of items you can select at the same time. SelectionMode.None - you cannot select anything SelectionMode.One - you can only select one item SelectionMode.MultiSimple - you can select multiple items by simply clicking them SelectiomMode.MultiExtended - you can select multiple items by holding ctrl, shift and arrow keys ScrollAlwaysVisible Tells whether the scrollbars are always visible regardless of the number of items in the ListBox. Sorted Tells whether to sort the items in the ListBox alphabetically or in ascending order. Text If you set a string value, the first item that matches will be selected. This property returns the text of the first selected item.
  • 6. The SaveFileDialog Control  The SaveFileDialog control (System.Windows.Forms.SaveFileDialog) allows you to save or write data to a specified file.Property Description AddExtention Specifies whether to automatically add an extension when the user does not specify a file extension. CheckFileExists Specifies whether to initiate a warning if the user types a file that does not exist. CheckPathExists Specifies whether to initiate a warning if the user types a path that does not exist. DefaultExt The default extensions to add when the user does not indicate a file extension. FileName The file selected by the user. This can also be the default selected the file when the dialog shows up. Filter Allows you to add a filter which are a special string indicating which types or files are only allowed to be opened by the user. FilterIndex If multiple filters are present, this indicates which filter shows as the default starting with index 1. InitialDirectory The initial directory that the OpenFileDialog will show. OverwritePrompt Specifies whether the dialog will prompt you to overwrite a file when an existing file is already found. RestoreDirectory Specifies whether to restore to default directory when the dialog closes. Title The title of the dialog.