La descarga está en progreso. Por favor, espere

La descarga está en progreso. Por favor, espere

imagelistActionlist Nombres: ActionList = Alagencia Imagelist = ilagencia.

Presentaciones similares


Presentación del tema: "imagelistActionlist Nombres: ActionList = Alagencia Imagelist = ilagencia."— Transcripción de la presentación:

1

2

3

4 imagelistActionlist Nombres: ActionList = Alagencia Imagelist = ilagencia

5

6

7

8 void __fastcall TForm1::Button1Click(TObject *Sender) { ShowMessage("este es un mensaje sencillo."); } //--------------------------------------------------------------------------- void __fastcall TForm1::Button2Click(TObject *Sender) { MessageDlg("no es posible abrir el archivo.",mtError, TMsgDlgButtons() << mbAbort << mbRetry << mbIgnore, 0); } //--------------------------------------------------------------------------- void __fastcall TForm1::Button3Click(TObject *Sender) { AnsiString respuesta; respuesta= InputBox("introduzca su nombre de usuario:", "Escriba en minúsculas", "nombre"); ShowMessage(respuesta); }

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25 Despues de la línea AnsiString miVariable; Escribamos: Mivariabl=1;

26 void __fastcall TForm1::Button1Click(TObject *Sender) { miVariable=10; Edit1->Text =IntToStr(miVariable); } //--------------------------------------------------------------------------- void __fastcall TForm1::Button2Click(TObject *Sender) { float VarFloat; VarFloat = atof(Edit2->Text.c_str()); Edit7->Text = FloatToStr(VarFloat); } //--------------------------------------------------------------------------- void __fastcall TForm1::Button3Click(TObject *Sender) { Edit3->Text = DateToStr(Date()); } //--------------------------------------------------------------------------- void __fastcall TForm1::Button4Click(TObject *Sender) { miVariable = 1979; char Texto[10]; itoa(miVariable,Texto,10); Edit4->Text = Texto; } //--------------------------------------------------------------------------- void __fastcall TForm1::Button5Click(TObject *Sender) { char *Texto="1979"; int numero; numero = atoi(Texto); Edit5->Text = IntToStr(numero); } //---------------------------------------------------------------------------

27

28

29 #include #pragma hdrstop USERES("Estructura1.res"); //--------------------------------------------------------------------------- WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) { struct Tclientes { AnsiString Nombre; int Edad; char sexo; double telefono; AnsiString Direccion; }; Tclientes Cliente; Cliente.Nombre="Odeth Calderon"; Cliente.Edad=18; Cliente.sexo='F'; Cliente.telefono=9611371009; Cliente.Direccion="Albania Alta"; ShowMessage("Nombre: "+Cliente.Nombre+"\n" +"Edad: "+AnsiString(Cliente.Edad)+"\n" +"Sexo: "+Cliente.sexo+"\n" +"Telefono: "+AnsiString(Cliente.telefono)+"\n" +"Direccion: "+Cliente.Direccion+"\n"); return 0; }

30 //------------------------------------------------------- -------------------- #include #pragma hdrstop USERES("Project1.res"); //------------------------------------------------------- -------------------- WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) { int edad; edad=StrToInt(InputBox("Eres Mayor de Edad?","Dame tu edad","edad")); if(edad>=18) ShowMessage("18 años\n Mayor de Edad"); else ShowMessage(AnsiString(edad)+" años\n"+" Menor de Edad"); return 0; }

31 int valor; int numero=0; int factorial=1; numero =atoi(txtNumero- >Text.c_str()); for ( valor = 1; valor != numero + 1; valor++) { factorial = factorial * valor; } txtNumero->Text = factorial;

32 int valor=1; int numero; int factorial=1; numero =atoi(txtNumero- >Text.c_str()); while ( valor != numero + 1) { factorial = factorial * valor; valor++; } txtNumero->Text = factorial; int valor=1; int numero; int factorial=1; numero =atoi(txtNumero- >Text.c_str()); do { factorial = factorial * valor; valor++; }while ( valor != numero + 1); txtNumero->Text = factorial;

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

59

60

61

62

63

64

65

66

67

68

69

70


Descargar ppt "imagelistActionlist Nombres: ActionList = Alagencia Imagelist = ilagencia."

Presentaciones similares


Anuncios Google