█ حصرياً جميع الاقتباسات من أعمال المؤلِّف ❞ Michael Halvorson ❝ أقوال فقرات هامة مراجعات 2025 ❰ له مجموعة الإنجازات والمؤلفات أبرزها Learn Microsoft Visual Basic®2012 ❱
كتاب الدورة الشاملة بالصور و الاكواد و الامثلة بالتفصيل فى الفيجوال بيسك دوت نت 2012 Learn Microsoft Visual Basic®2012 Michael Halvorson Contents at a Glance Introduction xiii Chapter 1 Getting to Know Visual Basic 2012 1 Chapter 2 Creating Your First Windows 8 Application 35 Chapter 3 Using Controls 65 Chapter 4 Designing Windows 8 Applications with Blend for Visual Studio 97 Chapter 5 Working with XAML 125 Chapter 6 Visual Basic Language Elements 147 Chapter 7 Controlling Application Design, Layout, and Program Flow 175 Chapter 8 Using the .NET Framework 207 Chapter 9 Debugging Applications 233 Chapter 10 Managing Data with Arrays and LINQ 251 Chapter 11 Design Focus: Five Great Features for a Windows 8 Application 279 Chapter 12 Future Development Opportunities and the Windows Store 313 Index Contents n. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii Chapter 1 Getting to Know Visual Basic 2012 1 Development Opportunities for Visual Basic Programmers. . . . . . . . . . . . . 2 New Development Platforms. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Obtaining, Installing, and Starting Visual Studio Express 2012 for Windows 8. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Downloading the Product. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Installing Visual Studio Express 2012 for Windows 8. . . . . . . . . . . . . . 5 Starting Visual Studio Express 2012. . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 The Visual Studio Development Environment. . . . . . . . . . . . . . . . . . . . . . . . . 7 The Visual Studio Tools. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 The Designer Window. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 Running a Visual Basic Program. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 The Properties Window. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 Moving and Resizing the Programming Tools. . . . . . . . . . . . . . . . . . . . . . . . 22 Moving and Resizing Tool Windows. . . . . . . . . . . . . . . . . . . . . . . . . . . 24 Docking Tool Windows. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 Hiding Tool Windows. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 Switching among Open Files and Tools Using the IDE Navigator. . . . . . . 28 Opening a Web Browser Within Visual Studio. . . . . . . . . . . . . . . . . . . . . . . 29 Customizing IDE Settings to Match This Book’s Exercises. . . . . . . . . . . . . . 30 Checking Project and Compiler Settings. . . . . . . . . . . . . . . . . . . . . . . 30 Exiting Visual Studio. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .33 What do you think of this book? We want to hear from you! Microsoft is interested in hearing your feedback so we can continually improve our books and learning resources for you. To participate in a brief online survey, please visit: microsoft.com/learning/booksurvey viii Contents Chapter 2 Creating Your First Windows 8 Application 35 Web List: Your First Visual Basic Program. . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 Creating the User Interface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 Setting the Properties. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 Writing the Visual Basic Code. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 A Look at the Visual Basic Code-Behind File. . . . . . . . . . . . . . . . . . . . 55 Running Visual Basic Applications. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 Sample Projects on Disk. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 Building an Executable File and Deploying. . . . . . . . . . . . . . . . . . . . . . . . . . 59 Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .63 Chapter 3 Using Controls 65 Using the Ellipse and TextBlock Controls. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 Using the CheckBox and RadioButton Controls. . . . . . . . . . . . . . . . . . . . . . . 74 Using the MediaElement Control to Add Music and Video. . . . . . . . . . . . . 86 Thinking about Media Files. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .95 Chapter 4 Designing Windows 8 Applications with Blend for Visual Studio 97 Blend for Visual Studio. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98 Why Blend Is Useful for Visual Studio Developers. . . . . . . . . . . . . . . 98 Starting Blend. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99 Design Tools in the Blend IDE. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102 Using XAML Controls in Blend. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103 Creating a Storyboard to Add Basic Animation Effects. . . . . . . . . . . . . . . 108 Writing Event Handlers in Visual Studio. . . . . . . . . . . . . . . . . . . . . . . . . . . . 115 Using the OnNavigatedTo Event. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121 Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .124 Contents ix Chapter 5 Working with XAML 125 Understanding XAML Basics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126 What Is XAML?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126 XAML Is Related to XML and HTML. . . . . . . . . . . . . . . . . . . . . . . . . . 127 XAML Elements. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127 Examining XAML Project Files. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129 Creating XAML Objects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135 Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .146 Chapter 6 Visual Basic Language Elements 147 Understanding Visual Basic Program Statements. . . . . . . . . . . . . . . . . . . . 148 Using Variables to Store Information. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148 Setting Aside Space for Variables: The Dim Statement. . . . . . . . . . 149 Using Variables in an Event Handler. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150 Using a Variable to Store and Process Input. . . . . . . . . . . . . . . . . . . . . . . . 154 Working with Data Types. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158 Constants: Variables That Don’t Change. . . . . . . . . . . . . . . . . . . . . . . . . . . . 165 Working with Visual Basic Operators. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168 Basic Math: The +, –, *, and / Operators. . . . . . . . . . . . . . . . . . . . . . .168 Advanced Operators: , Mod, ^, and &. . . . . . . . . . . . . . . . . . . . . . . 170 Establishing Order of Precedence. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172 Using Parentheses in a Formula. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173 Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .173 Chapter 7 Controlling Application Design, Layout, and Program Flow 175 Creating a Tile-Based Layout for Windows Store Apps. . . . . . . . . . . . . . . 176 Designing Pages for User Input. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177 Evaluating Specific Conditions Using If...Then...Else Statements. . . . . . . . 187 Using the Day of the Week in an If...Then... Statement.