VB6.0 دىن VB.NET گىچە دەسلەپكى ئۈگەنگۈچىلەر ئۈچۈن ئاپتورى:چاشق ان رەتلىگۈچى:چا شقان لايىھەلىگۈچى: چاشقان.

Slides:



Advertisements
Similar presentations
Integrated Business Applications with Databases (D3) Jenny Pedler
Advertisements

Introduction to Visual Basic for Applications programming in Excel.
AE6382 VBA - Excel l VBA is Visual Basic for Applications l The goal is to demonstrate how VBA can be used to leverage the power of Excel u VBA syntax.
Proyek Queri-queri Lanjut dan Sub-subqueri. Variables dan Data.
Basics of ASP.NET. 2 © UW Business School, University of Washington 2004 Outline Installing ASP.NET and Web Matrix Data Types Branching Structure Procedures.
Control Statements Making Decision in Your Program.
Arrays. What is the output of: Private Sub cmdButton_Click() Dim i As Integer, a(1 To 4) As integer Open "DATA.TXT" For Input As #1 For i = 1 To 4 Input.
CSI 101 Spring 2009 Review and Recap of Visual Basic Wednesday, April 29 th.
Windows Core OS Services JavaScript (Chakra) C C++ C# VB Metro style apps Communication & Data Application Model Devices & Printing WinRT APIs Graphics.
Beautiful Sites and Apps Easy-to-build, Touch-First Interactivity Engaging Page Layouts Better Client/Server Data Transfer Powerful Local Data and Offline.
Mr C Johnston ICT Teacher BTEC IT Unit 06 - Lesson 05 Learning To Program.
COMPUTER PROGRAMMING I Objective 7.04 Apply Built-in String Functions (3%)
Chapter 7 Code Tables. VB Code Box 7-1 Event Procedure for Compute Button Private Sub hsbExemptions_Change() txtExemptions.Text =Str(hsbExemptions.Value)
Manipulation Masterclass By the VB Gods. In this masterclass, we will learn how to use some of the string manipulation function such as Len, Right, Left,
Language Elements 1. Data Types 2 Floating Point (real) Single Precision Double Precision Decimal Fixed Point (integer) Byte Short Integer Long Numerical.
Jeff From 5 to 8 building Windows 8 Apps with HTML5 and JavaScript.
VB Core II Conditional statements Exception handling Loops Arrays Debugging.
Windows 8 Apps Guy Burstein Technical Evangelist, Microsoft
1 Κατανεμημένες Διαδικτυακές Εφαρμογές Πολυμέσων Γιάννης Πετράκης.
1 Κατανεμημένες Διαδικτυακές Εφαρμογές Πολυμέσων Γιάννης Πετράκης.
Windows Core OS Services JavaScript (Chakra) C C++ C# VB Metro style apps Communication & Data Application Model Devices & Printing WinRT APIs Graphics.
Windows Runtime Deep Dive Brendan Forster Senior Developer, ASP.NET/IIS DEV317.
Reference: Lecturer Lecturer Reham O. Al-Abdul Jabba lectures for cap211 Files and Streams- I.
MS Visual Basic Applications Walter Milner. Event-driven programming Standard approach for GUIs Contrast with old character interfaces – program determines.
Introduction to MIS1 Copyright © by Jerry Post Introduction to MIS Appendix 12 Visual Basic.
Visual Basic IITG to be expanded. What is Visual Basic? Object Oriented Programming Language (OOP) Graphical User Interface (GUI) Event Driven – Write.
1 COMP3100e Developing Microsoft.Net Applications for Windows (Visual Basic.Net) Class 6 COMP3100E.
Visual Basic Programming Making Decisions: Loops & Decision Structures ©Copyright by Ronald P. Kessler, Ph.D.
Build advanced touch apps in Windows 8
Chapter 16: Programming Structures Spreadsheet-Based Decision Support Systems Prof. Name Position (123) University Name.
1 Chapter 10 Additional Control Structures and Exceptions.
Overview of VBA Programming & Syntax. Programming With Objects u Objects –Properties: attributes or characteristics of an object (e.g., font size, color,
Chapter 16: Programming Structures Spreadsheet-Based Decision Support Systems Prof. Name Position (123) University Name.
CS 101 Test 2 Study Guide Acronyms RAD - Rapid Application Development IDE - Integrated Development Environment GUI - Graphical User Interface VB - Visual.
‘Tirgul’ # 2 Enterprise Development Using Visual Basic 6.0 Autumn 2002 Tirgul #2.
Using Text Files in Excel File I/O Methods. Working With Text Files A file can be accessed in any of three ways: –Sequential access: By far the most common.
Two Forms Please use speaker notes for additional information!
Copyright © 2001 by Wiley. All rights reserved. Chapter 6: Using Arrays Control Arrays List Arrays Finding Items in Arrays Multiple Forms 2-Dimensional.
6-1 Chapter 6 Working with Arrays in VB.NET. 6-2 Learning Objectives Understand the use of list and table arrays in VB.NET projects and the difference.
1 Scripting Languages VBScript - Recognized mainly by Internet Explorer only - Netscape does have a plug-in JavaScript - Recognized by Internet Explorer.
CompMathBSc, English 5 October 2006 Programming basics — continued  Arrays  Cycle Statements: Loops  Control Structures vs Conditions  Subs: Procedures.
Building Windows Runtime Components in C++ Harry Pierson Program Manager, Windows Runtime Experience Team Microsoft Corporation.
CSC 298 Streams and files.
CECS 5020 Computers in Education Visual Basic Variables and Constants.
BACS 287 File-Based Programming. BACS 287 Data Hierarchy  Database - Collection of files, relationships, integrity information, etc  Files - All records.
1 Microsoft® Visual Basic®.NET Language # 2. 2 Flow-Control Statements If … End If Select Case … End Select For… Next Do … Loop Exit.
Visual Basic.net Functions. Function (Defined) A procedure that returns a value when called.
DATA TYPES, VARIABLES AND CONSTANTS. LEARNING OBJECTIVES  Be able to identify and explain the difference between data and information  Be able to identify,
Visual Basic Review LBS 126. VB programming Project Form 1Form 2Form 3 Text boxButton Picture box Objects Text box Button Objects.
Flow chart of the program Start Input a password Is it greater than 6 characters No Is it greater than 6 characters Is it greater than 12 characters yes.
Creation of Variables with Numeric, alphanumeric, date, picture, memo data types Constant - A quantity that does not change during the execution of a program.
CIS 338: VB Variables Dr. Ralph D. Westfall April, 2011.
Metro Style Applications Metro style design and Inspirations.
1 VB-06-String Manipulation Mar 03, 2002 String Function VISUAL BASIC.
Communication & Data Devices & Printing WinRT APIs DirectX & Media Windows 8 Desktop Apps C C++ Win32 C# VB. NET SL HTML JavaScrip t Internet Explorer.
What is the Windows Runtime? Devices Sensor s Geolocation Portabl e NFC Communications & Data Contracts XML Web SMS Networking Notifications Local.
Visual BASIC Programming For CCS 301 course Dr. Ahmad ABDELHAY.
Data Types. Visual Basic provides data type Single for storing single-precision floating-point numbers. Data type Double requires more memory to store.
Introduction to Programming Lecture 2
VBA - Excel VBA is Visual Basic for Applications
VBA - Excel VBA is Visual Basic for Applications
CIS3931 – Intro to JAVA Lecture Note Set 2 17-May-05.
50 Performance Tricks to Make your HTML5 apps and sites Faster
VB Math All of your favorite mathematical operators are available in VB: + Addition - Subtraction * Multiplication / Division \ Integer Division Mod Modulo.
للمزيد زورونا على موقعنا الإلكتروني:
Using the Windows Runtime from JavaScript
Windows Runtime internals: understanding "Hello World"
Platform for Metro style Apps
Dictionary Builder Part 4 Loading Files.
Visual Basic Programming
Presentation transcript:

VB6.0 دىن VB.NET گىچە دەسلەپكى ئۈگەنگۈچىلەر ئۈچۈن ئاپتورى:چاشق ان رەتلىگۈچى:چا شقان لايىھەلىگۈچى: چاشقان

سىز بۇ دەرسلىك ئارقىلىق تىز سۈرئەتتە vb6.0 دىن vb.net قا ماسلىشالايسىز. بۇ دەرسلىكتە بىر قىسىم پەرقلەر ۋە ئەمەلىي مىساللار سۆزلىنىدۇ. ئۈنۈم

پىروگىراممىغا قىزىقامسىز؟

VB.NET دىكى تېپلار تۆۋەندىكى جەدىۋەلدە كۆرسىتىلدى. Byte Short Single Double Decimal Integer Char String Boolean Date Object ئۆزگەرگۈچى تېپى ئۆزگەرگۈچى گە ئېنىقلىما بېرىش 8-Bit 16-Bit 32-Bit F/P 64-Bit 64-Bit F/P 128-Bit 32-Bit 16-Bit 64-Bit 32-Bit چوڭ كىچىكلىكى ,768 -> E38 -> E38 -9,223,372,036,854,775,808 –> دائىرىسى 9,223,372,036,854,775, E308 -> E308 +/- 79,228 x ,147,483,648 -> 2,147,483, > 65, > Approx 2 Billion Characters True or False Jan 1, > Dec All Types VB.NET دا Variant تىپنى قوللىمايدۇ.Object تېپنى ئۆزگەرگۈچى مىقدارنىڭ تېپى نامەلۇم بولغاندا ئىشلىتىشكە بولىدۇ.

VB.NET دىكى ئىختىيارى تېپقا ئېنىقلىمابېرىش ئۆزگەرگۈچى گە ئېنىقلىما بېرىش Type UserName LoginName As String FullName As String Address As String MaxLogins As Integer End Type VB6.0 دا ئۆزى ئېنىقلايدىغان تېپقا ئېنىقلىما بېرىش بولسا ئۈستىدە كۆرسىتىلگەندەك.VB.NET. Structure UserName Dim LoginID As String Dim FullName As String Dim Address As String Dim MaxLogins As Short End Structure VB.NET

مىسال Dim sString1, sString2 As String sString1 = "this is a test" sString2 = sString1.ToUpper Dim sString1, sString2 As String sString1 = "this is a test" sString2 = sString1.ToLower Dim sString1, sString2 As String sString1 = "this is a test" sString2 = sString1.SubString(5, 2 ) Dim sString1 As String Dim iLength As Short sString1 = "this is a test" iLength = sString1.Length Dim sString1 As String Dim iPosition As Short sString1 = "this is a test" iPosition = sString1.IndexOf("e") Dim sString1 As String sString1 = String.Concat(“This”, “ is a “, “test”) Dim sString1, sString2 As String Dim bMatch As Boolean sString1 = "this is a test" sString2 = "this is A test" bMatch = Not CBool(StrComp(sString1, sString2, CompareMethod.Binary)) چۈشەندۈرۈش VB6.0 vs. UCase LCase Mid Len Instr & NOT Implemented Not implemented ToUpper ToLower SubString Length IndexOf & / Concat StrComp Insert Remove VB.NET ھەرپ-بەلگە فۇنكىيسيەلىرى ھەققىدە

ئەپ ئادرېسىنى بېكىتىش VB.NET دا ئەپ ئادرېسىنى تۆۋەندىكىدەك بېكىتىمىز VB6.0 دا ئەپ ئادرېسىنى تۆۋەندىكىدەك بېكىتىمىز

Vb6.0 دا ئېنىقلىما بېرىش DoEvents VB.NET دا ئېنىقلىما بېرىش Application.DoEvents () دەۋرىلەش قۇرۇلمىسدا ۋاقت يەتكۈزۈپ بېرىش كۆپ قوللىنىلىدۇ.

VB6.0 Select Case MsgBox("Please Press Yes or No", vbInformation + vbYesNo, "Make a Selection") Case vbNo MsgBox "No Pressed" Case vbYes MsgBox "Yes Pressed" End Select VB.NET Select Case MsgBox("Please Press Yes or No", MsgBoxStyle.Info rmation + MsgBoxStyle.Yes No, "Make a Selection") Case vbNo MsgBox("No Pressed") Case vbYes MsgBox("Yes Pressed") ئەسكەرتىش MassgeBox.sh ow فۇنكىسيەسىنى MsgBox فۇنكىسيەسى بىلەن ئالماشتۇرۇپ ئىشلىتىشكە بولىدۇ

بۇ قىسىمدا سانلار گۇرۇپپىسىغا ئېنىقلىما بېرىش سۆزلىنىدۇ. سانلار گۇرۇپپىسىغا ئېنىقلىما بېرىش VB6.0 دە ئېنىقلاش Dim MyArray(4) As String Dim iIndex As Integer VB.NETدا ئېنىقلاش Dim MyArray(4) As String Dim iIndex As Short

VB6.0 Dim MyArray(4) As Single MyArray(0) = "1" MyArray(1) = "5" MyArray(2) = "2" MyArray(3) = "4" MyArray(4) = "3" Call BubbleSortS(MyArray) Sub BubbleSortS(arr() As Single, Optional ByVal numEls _ As Variant, Optional ByVal VB.NET Dim MyArray(4) As String MyArray(0) = "A" MyArray(1) = "D" MyArray(2) = "E" MyArray(3) = "B" MyArray(4) = "C" Array.Sort(MyArray ) Dim MyArray(4) As String MyArray(0) = "A" MyArray(1) = "D" MyArray(2) = "E" MyArray(3) = "B" MyArray(4) = "C" Array.Sort(MyArray) Array.Reverse(MyArray)

Dim sAllText As String Open "C:\File.txt" For Input As #1 sAllText = Input(LOF(1), #1) Close #1 Dim sLine As String Open "C:\File.txt" For Input As #1 Do Until EOF(1) Line Input #1, sLine Loop Close #1 Dim sr As StreamReader = File.OpenText("c:\fil e.txt") Dim sLine As String Do sLine = sr.ReadLine() Loop Until sLine = Nothing sr.Close() Dim sr As StreamReader = File.OpenText("c:\file. txt") Dim sAllText As String sAllText = sr.ReadToEnd() sr.Close() VB6.0 ھەممىنى ئوقۇشVB.NETھەممىنى ئوقۇش VB.NET قۇرمۇ قۇر بويىچە ئوقۇش VB6.0 قۇرمۇقۇر بويىچە ئوقۇش

If Dir("c:\file.txt") <> "" Then MsgBox("File Found!") Else MsgBox("File Not Found!") End If Open "C:\File.txt" For Output As #1 Print #1, "Line1" Print #1, "Line2" Print #1, "Line3" Close #1 Dim fs As FileStream = File.Open("C:\File.tx t", FileMode.OpenOrCr eate, FileAccess.Write) Dim sr As New StreamWriter(fs) sr.WriteLine("Line1") sr.WriteLine("Line2") sr.WriteLine("Lin e3") sr.Close() If File.Exists("C: \File.txt") Then MessageBox.Show(" File Found!") Else MessageBox.Show(" File Not Found!") End If VB6.0 ھۆججەت تەكشۈرۈش VB.NETھۆججەت تەكشۈرۈش VB.NET تېكىست ھۆججىتى قۇرۇش VB6.0 تېكىست ھۆججىتى قۇرۇش

VB6.0 On Error GoTo ErrorHandler Picture1.Picture = LoadPicture("c:\file.bmp") ErrorHandler: MsgBox("Error Loading File!") VB.Net Try PictureBox1.Image = System.Drawing.Bitmap.FromFile("c:\File.bmp") Catch MsgBox("Error Loading File!") End Try

VB.NET بولسا VB6.0 بارلىق ماتېماتىكىلىق ئەمەلەر ۋە فۇنكىسيەلەرنىڭ ھەممىنى قوللايدۇ،لېكىن بەزى فۇنكىسيەلەر System.Math تۈر ئىچىگە قوشۇۋېتىلگەن.بۇ فۇنكىسيەلەرنى ئىشلەتكەن ۋاقتىمىزدا چوقۇم System.Math نى كىرگۈزىشىمىز كېرەك.بارلىق ئەمەللەر بەلگىسىمۇ يەنىلا كۈچكە ئىگە. Imports System.Math Dim dblResult As Double dblResult = Sqrt(64)

VB6.0 Public Function GetAgePhrase(ByVal Age As Integer) As String If Age > 60 Then GetAgePhrase = "Senior" ElseIf Age > 40 Then GetAgePhrase = "Middle-aged" ElseIf Age > 20 Then GetAgePhrase = "Adult" ElseIf Age > 12 Then GetAgePhrase = "Teen -aged" ElseIf Age > 4 Then GetAgePhrase = "School-aged" ElseIf Age > 1 Then GetAgePhrase = "Toddler" Else GetAgePhrase = "Infant" End If End Function VB.NET Public Function GetAgePhrase(ByVal Age As Integer) As String If Age > 60 Then Return "Senior" If Age > 40 Then Return "Middle-aged" If Age > 20 Then Return "Adult" If Age > 12 Then Return "Teen-aged" If Age > 4 Then Return "School-aged" If Age > 1 Then Return "Toddler" Return "Infant" End Function

VB.NET بولسا يەنىلا VB6.0 دىكى GetSetting ۋە SaveSetting بۇيرۇقىنى قوللاپلا قالماي،يەنە ھېچقانداق چەكلىمىگە ئۇچرىماي Microsoft.Win32.Registry ئارقىلىق تىزىملاش جەدىۋىلىگە كىرىشكە يول قويىدۇ.تۆۋەندە بۇ ھەقتە مىسال كۆرۈپ باقايلى Dim oReg As Microsoft.Win32.Registry Dim oRegKey As Microsoft.Win32.RegistryKey Dim sValue As String oRegKey = oReg.LocalMachine.OpenSubKey("Software\Micros oft\Windows NT \CurrentVersion", False) sValue = oRegKey.GetValue("CurrentVersion", vbNullString) Dim oReg As Microsoft.Win32.Registry Dim oRegKey As Microsoft.Win32.RegistryKey oRegKey = oReg.LocalMachine.OpenSubKey("Key\S ubKey", True) oRegKey.SetValue("Entry", "NewValue") VB.NET دا تىزىملاش جەدىۋىلىنى ئوقۇش VB.NET دا تىزىملاش جەدىۋىلىگە قىممەت يېزىش تىزىملاش جەدىۋىلىگە يېڭىدىن قۇرۇش Dim oReg As Microsoft.Win32.Registry Dim oRegKey As Microsoft.Win32.RegistryKey oRegKey = oReg.LocalMachine.CreateSubKey("Key\Subkey\NewKey")

Communication & Data Devices & Printing WinRT APIs Graphics & Media Desktop apps C C++ Win32 C# VB.NET SL HTML JavaScript Internet Explorer Metro style apps Application Model XAML JavaScript HTML / CSS C C++ C# VB Windows Kernel Services System Services View Model Controller Kerne l DX

چاشقان ئەپەندى