.


:




:

































 

 

 

 


. , .

-. . - . , , . , .

, . :

, , . , . wxPython, wx.App.MainLoop(). . , .

, . , , , . wxPython, wx.Event . (event type), .

, , - . , , , . , wxPython: , .

, , , . wxPython, wx.Event wx.EvtHandler.ProcessEvent() , . 3.3 . (event binder) . (event binder) - wxPython. . (event handler) - , . , .

  1. Visual Basic.

(IDE) Microsoft . .

() Visual Basic 6

:

;

(Standard);

;

(Project);

;

(Menu Editor);

(Properties);

(Form Layout);

(Object Browser);

.

  1. Visual Basic.

Visual Basic , . : - (.vbp); - (.frm); - (.bas); - (.cls). . , . . , , , , , . . . , , , . . . , , , . Visual Basic - :

1. ;

2.

3.

4. .

  1. .

, . , . Windows Forms, , (, , , ). Windows Forms , . ctlClock. ctlClock .

, , , , , .

ctlClockLib ctlClock

, .

Visual Basic Windows ctlClockLib, OK.

(ctlClockLib) . ., ctlClock, ctlClock, ctlClockLib.ctlClock..

UserControl1.vb . ctlClock.vb. , UserControl1.

  1. .

, . , Microsoft SQL Server Microsoft.SqlServer.Management.Smo.Server.Configuration. , . :

objInstance.PropertyName

, . , , . . SMO.

. , Tables Server. . .

Properties. Properties .

.

( , SQL Server SQL Server).

( , SQL Server, ).

SMO Microsoft.SqlServer.Management.Smo.UnknownPropertyException Microsoft.SqlServer.Management.Smo.PropertyCannotBeRetrievedException.

Group (). Group () . . .

, ( , . .), , , , . . . Group ():

Group () , . Name () Select Objects ( ).

Open () , , , . , , , . .

Close () , .

Ungroup () , , .

Explode ( ) , , .

Detach () ( ) . Open ().

Attach () , .

  1. Visual Basic.

, . , , -.

Visual Basic - , . , - ; ; ; - .

, , , , .

  1. Visual Basic.

, , -, ( ) , Visual Basic, Windows .
, Windows , . . (). , . - - . Windows . , Visual Basic. , Visual Basic.
EXE-, , File EXE. , ( ), . OK , EXE- . .
( Icon) , . , . .
: File; Open; misc (vb\icons\misc) . () ( ); : File/Save As.../ .

, , . - , . .

  1. Visual Basic.

Visual Basic .

Option Explicit , .

Option Strict , .

Option Infer () .

Option Compare , : ( ) ( ).

; Option Explicit, Option Strict, Option Infer Option Compare.

, .

  1. Visual Basic .

Visual FoxPro - , . , , - , ON ERROR, . Error.

PROCEDURE Object.Error

LPARAMETERS [nIndex,] nError, cMethod, nLine

nIndex - (). nError Visual FoxPro, cMethod - , , nLine - , .

, Error , Visual FoxPro , ON ERROR, , , .

, Error , , , :

LPARAMETERS nError, cMethod, nLine

* File in use by another IF nError = 108

= MESSAGEBOX( ! +; .)

ELSE

*

* , DO proc error

ENDIF

, , , . , . , - , Error , Error . ON ERROR , .

,

ERROR nErrorNumber nErrorNumber, cMessageTextl [cMessageTextl]

Visual FoxPro. nErrorNumber , Visual FoxPro. cMessageTextl , , . , , , Visual FoxPro . cMessageTextl , . nErrorNumber cMessageTextl, Visual FoxPro 1098 ( ). , cMessageTextl CHR(13).

ERROR , . ON ERROR, ERROR Visual FoxPro , ON ERROR. , Error .

ERROR Command ON ERROR , Visual FoxPro . ERROR ON ERROR , Visual FoxPro , .

  1. Windows- Visual Basic.

, (UI . user interface) , (), /. , , , , .

, , , .

() , , , , . . ( , : , , , , , . .).

, , , , (, , , , , ).

(). , , .

Windows Presentation Foundation (WPF) Windows Forms; . . , , XAML. XAML Extensible Application Markup Language, . , . XAML- . XAML

Windows Forms Windows Forms, . . , WPF- , XAML WPF.

XAML , . , . , Button : <Button></Button>. , , . , . . , (=) , . , , : <Button Height="23"></Button>.

WPF- , Visual Basic, - XAML-. , XAML- System.Windows.Controls.Button WPF.

<Button Height="23" HorizontalAlignment="Left" Margin="10,10,0,0"

Name="Button1" VerticalAlignment="Top" Width="75">Button</Button>

, Button Height "23", HorizontalAlignment "Left". , . , XAML. ( .) .

  1. .

: Visual Basic ( ) Project Explorer Insert -> User Form. (Form designer), ( UserForm1) Toolbox, .

( <F4>), . ( Click) <F7>, <Shift>+<F7>.

, , .

( ShowModal, ):

(Name) . , , . ( Visual Basic). , (UserForm) - , ( );

Caption ( ). , (, " ");

Enabled False, . , , - ;

ShowModal True ( ), , . VBA6 .

, .

  1. .

: (If) < 1>, (Then) < 1>, , (ElseIf) < 2>, < 2> .., (Else) - < N>.

:

If <1> Then < 1>: < 2>:...: < N>

(End If) .

For... Next

:

For <i>=<i0> To <iN> [Step <ih>]
<>
Next [<i>]

<i>, <i0>, <iN>, <ih> :

<i> - ;

<i0>, <iN> - ;

<ih> - .

. , 1.

Exit For.

  1. .

. , , , .
, (), , .

:

, ;

(, MS Windows);

;

;

( ) ;

, ;

;

, ;

;

;

.

  1. .

. : ,, . .

:

Left Top . Left . Top .

Height () Width () .

Visible Enabled True False. , . Visible False, . Visible True . Enabled False, ( , Visible - True), ., , . , .

VBA Name. , . . VBA . , ComboBox1 ( - Combobox2, ..), - CommandButton1, CommandButton2 .. .

  1. .

, , , . , . , , .

Focus, . Focus , . . , , CanFocus: true, , false .

Visual Basic.NET

' , TextBox1 ,

' , , .

If TextBox1.CanFocus = True Then

TextBox1.Focus()

End If

Visual C#

// , TextBox1 ,

// , , .

if(textBox1.CanFocus == true)

textBox1.Focus();

, , :

Enter

GotFocus

Leave

Validating

Validated

LostFocus

Enter Leave , ( ) . GotFocus LostFocus . , , Validating Validated .

  1. Windows- Visual Basic.

Visual Basic - .

(Menu Editor) - , . , , . , , . , .

(. . 3.18).

( ) Caption (), Name (). . , Index, HelpContextID, ShortCut, Checket, .

. , .

Next . Next .

. .

. , ( ), ( ) ( ). Menu Editor , , .

.

Insert . , ( ) , Insert (). , , Caption () Name ().

Delete.

Windows . Edit (), , Paste () , . , .

, Enabled .

Visual Basic .

- , . , .

(&).

- (&) .

. - , . Shortut.

& Shortut. , . [Ctrl] [C] [Ctrl] [V].

, . , . , . , .

, .

  1. .

( ) MenuItem :

new MenuItem()

, MenuItem. , , :

MenuItem ()

 
 
string Text /
char Mnemonic
Shortcut Shortcut /
bool ShowShortcut /
 

Mnemonic , Text ( 0, ). ShowShortcut false .

MenuItem bool :

MenuItem ()

 
 
bool Visible /
bool Enable /
bool DefaultItem /
bool Break /
bool BarBreak /
 

 

Visible false, . ( ) Click. , - . , - , .

, Enabled . false, . , , , . Click , .

File Edit . Save Save As , . Cut , , . Paste, , . , .

, DefaultItem true, . . DefaultItem . , , . , FirstMainMenu :

miExit.Defaultltem = true;

File . .

Break true , ( ) . BarBreak true, , . , Break BarBreak . : ( ) .

MenuItem. Checked RadioCheck. , MenuItem, MainMenu ContextMenu, Menu MenuItems ( ), .

MenuItem , Click. , . ( Click):

MenuItem ()

 
 
Click OnClick EventHandler EventArgs
Popup OnPopup EventHandler EventArgs
Select OnSelect EventHandler EventArgs
 

Popup , File Edit. Popup , , . , , Cut, Copy Paste, . / Popup.

Select , . . , , , .

  1. .

. . () . . , , , .

, , , .

Open , . ShowOpen
Save As , . ShowSave
Print . ShowPrinter
Font . ShowFont
Color . ShowColor

. , . , .

, , Components () Project ().

. . , .

, Visual Basic. , , ? , . Visual Basic . , .

  1. .

MsgBox. , :
;
;
;
.
MsgBox . . :
MsgBox [, ] [, ] [, , ].
, , , Integer, , . :
= MsgBox(TeKcr[, ] [, ] [, , ]).
, ( 1024 )
. , , , , . , = Button + Icon + Default. , , Visual Basic. , .
, . , .
, , . , .
, . , .
MsgBox ( ). , , .

  1. .

, . VB InputBox.
:
InputBox (prompt [,title] [,default] [,xpos] [,ypos] [,helpfile, context])

:
prompt -
title -
default - . ,
xpos - . .
ypos - . .
helpfile, context - .
InputBox 2 :OK Cancel.

  1. Visual Basic.

Visual Basic . :

(A, B,..., Z, a, b,..., z);

( , );

0 9;

_.

, , , , , . :

( ), (, , );

, :

, : <= >= <>.

.

Visual Basic (), , . . Visual Basic . , , () Rem:

Rem

, . Visual Basic : ; () ; ; ( ); ( ); ( ).

, , . , . , . -, , .. , . -, Visual Basic :

;

, , , , ;

, Visual Basic ;

255 , , Visual Basic 31 .

:

strMyName, i, intNumOne, StrInputValue, intNumber2, str, , _ ..

:

2Week - ;

_ ;

Second. Week - ;

Dim, As, Private - ;

Number One - .

Visual Basic, , () , . .

All Else Is ON SELECT
As Empty JOIN On Set
ASC Error Len Option Static
Binary False Let Optional Step
BY For Lock ParamArray String
ByRef Friend Me Print TABLE
ByVal Get Mid Private Then
CREATE IN New Property Time
Date INDEX Next Public To
DESC Input Nothing Resume WITH
DROP INTO Null Seek WithEvents

. , , .

:

N, I, Number, - ;

, - , .

, :

, ;

, ;

.

  1. Visual Basic .

. , . , , ( ), , . , , - . , , . , , .

, . , . . , :

type varName;

type , varName - . ( ), . , , :

int parrots; // parrots int

int cats; // cats int

, .

, , , . , .

.

, . (, , . , , . , , )

//

_cat = "";

Kitten3 = " 3 ";

Cat_Name = " ";

//

3Kitten = ""; //

Cat,Me = "Meow"; //

.

int Cats, Kittens, Dogs;

,

int Cats = 7;

, . , :

int widthSquare = 5; //

 

// perimeter

int perimeter = widthSqare * 4;

, # ( ?), . , , . , :

cat

Cat

CAT

cAt

  1. Visual Basic.

Boolean - . 2 . 2 True() False().

Byte - . 1 . 0 255. .

Char - . 2 . , 2 . Unicode.

Date - . 8 . 1 100 31 9999 .

Decimal - . 16 . , , +/- 79 228 162 514 264 337 593 543 950 335, . , , . . 28 .

Double - . . 8 . - 1,79769313486231E+308 -4,94065645841247E-324. 4,94065645841247E-324 1,79769313486231E+308.

Integer - . 4 . - 2 147 483 648 2 147 483 647.

Long - . . - 9 223 372 036 854 775 808 9 223 372 036 854 775 807.

Object - , . 4 .

Short - . 2 . - 32 768 32 767.

Single - . 4 . - 3,402823E+38 -1,401298E-45. 1,401298E-45 3,402823E+38.

String - . . , , 2- Unicode. .

  1. Visual Basic.

, , . .

() , ( ).

:

. ( ). _;

.;

255;

() .

Visual Basic . .

. Variant. .

:
Dim [ As ],
: Dim d as Long.
, Option Explicit (General) (Declarations) , . Visual Basic .



<== | ==>
? @ ) doc; @ ) txt. | 
:


: 2017-03-18; !; : 447 |


:

:

, .
==> ...

1625 - | 1547 -


© 2015-2024 lektsii.org - -

: 0.377 .