LissajousCurves para Windows


lissa

 

El programa LissajousCurves para Windows Phone 7

El código dispuesto para descarga es una solución de Visual Studio denominada LissajousCurves. La aplicación web contiene los proyectos LissajousCurves y LissajousCurves.Web. La aplicación de Windows Phone 7 tiene el nombre de proyecto LissajousCurves.Phone. La solución también contiene dos proyectos de biblioteca: Petzold.Oscilloscope.Silverlight y Petzold.Oscilloscope.Phone, pero esos dos proyectos comparten todos los archivos de código.

 

Fuera de los controles TextBlock y Slider, el único elemento visual adicional del programa es una clase denominada Oscilloscope que se deriva de UserControl. Dos instancias de una clase denominada SineCurve proporcionan los datos para Oscilloscope.

SineCurve no tiene elementos visuales, pero derivé la clase de FrameworkElement, de manera que podría poner ambas instancias en el árbol visual y definir los enlaces en ellos. De hecho, todo lo que está en el programa está conectado con enlaces, desde los controles Slider hasta los elementos SineCurve y desde SineCurve hasta Oscilloscope. El archivo MainPage.xaml.cs de la versión web del programa no tiene código fuera de aquel proporcionado de forma predeterminada y el archivo equivalente de la aplicación de teléfono sólo implementa lógica en extinción.

SineCurve define dos propiedades (respaldadas por propiedades de dependencia) denominadas Frequency y Amplitude. Una instancia SineCurve proporciona los valores horizontales para Oscilloscope y el otro los valores verticales.

https://msdn.microsoft.com/es-es/magazine/gg983480.aspx

Excel 2010: OPCIONES DE GRÁFICO


Cuando se pulsa una vez sobre un gráfico, el contorno se transforma en un marco azul con puntos de anclaje para cambiar el tamaño, y tienes acceso a todas las opciones de la ventana de gráfico: Moverlo, borrarlo, modificar el área de datos, copiarlo, cambiar el tipo, etc. Para saber mejor qué puedes hacer, pulsa con el botón derecho sobre el gráfico para obtener el menú contextual.

excel

Herramientas de gráficos

Si señalas el gráfico con el ratón, verás en la parte superior de la pantalla que se te ofrece la ficha de herramientas de gráficos:

excel1

Con ella puedes cambiar rápidamente el diseño del gráfico y los colores, con lo que puede ser que no necesites otros cambios. Si deseas tener más dominio sobre ellos, lee los siguientes párrafos.

Mover el gráfico

Para mover un gráfico señala su borde (aparecerá una cruz) con el ratón, arrastra el gráfico a otra zona y suelta.

http://hojamat.es/guias/guiaexcel/Guia104.pdf

Small Basic: Intermediate Challenge 1 (Sushi restaurant)


sushiNao

Program Listing:    JWF370    http://social.msdn.microsoft.com/Forums/en-US/smallbasic/thread/bce001cb-ce65-4d23-8645-466098928115/

Intermediate Challenge 1

Write a program to display a menu that a till operator might use in a restaurant.  They click on the items the customer wants and it works out the bill.

………………………………………………………………………………………………………………………….

Code:

‘  Challenge of the month  May 2013     Restaurant  menu order   by  NaochanON

 

InitData()

GUI()

Controls.ButtonClicked=EnterData

Sub EnterData

btnnmb=Controls.LastClickedButton

nm=controls.GetButtonCaption(btnnmb)

if text.IsSubText(Btns,nm) Then  ‘

DNMB= Text.GetSubTextToEnd(btnnmb,7)                     ‘

Newconts= Menu[DNMB]

NewPrice= Price[DNMB]

DataEnter()

elseif  text.IsSubText(Newconts,nm) then

searchNo()

NN=NN+1

Order=order+NN+»: «+nm+»    «+Price[DNMB][PNMB]+CRLF

TotPrice=TotPrice+Price[DNMB][PNMB]

Mes=Order+CRLF+»   Price      = «+Totprice+CRLF

tax=math.floor(5*Totprice)/100

Mes=Mes+»   Tax(5%) = «+tax+CRLF

Mes=Mes+»   Total      = «+(Totprice+tax)+CRLF+CRLF+»   Thank you !»

Controls.SetTextBoxText(receipt,Mes)

EndIf

endsub

sub searchNo

For j=1 To Array.GetItemCount(Newconts)

If nm= Newconts[j] Then

PNMB=j

j=Array.GetItemCount(Newconts)

endif

EndFor

EndSub

Sub DataEnter

If NMB2<>0 Then

For j=1 To NMB2

Controls.HideControl(btn2[j])                  ‘

Controls.HideControl(btn3[j])

EndFor

EndIf

Shapes.Move(redrect,10,130+75*(DNMB-1))                            ‘  Red mark

‘————————————————————————————————————————-

NMB=Array.GetItemCount(Newconts)

GRXY=»W=500;H=»+(NMB*45)

GrayBox()

‘————————————————————————————————————————-

GraphicsWindow.BrushColor=»Navy»

For i=1 To NMB

btn2[i]=Controls.AddButton(Newconts[i],440,135+40*(i-1))         ‘  menu

btn3[i]=Controls.AddButton(«US$ «+NewPrice[i],760,135+40*(i-1))  ‘  price

Controls.SetSize(btn2[i],280,35)

Controls.SetSize(btn3[i],120,35)

EndFor

‘————————————————————————————————————————-

NMB2=NMB                                               ‘

endsub

Sub GrayBox

Shapes.Remove(GRBOX)

GraphicsWindow.BrushColor=»Lightgray»

GRBOX=Shapes.AddRectangle(GRXY[«W»],GRXY[«H»])           ‘  gray  box

Shapes.Move(GRBOX,400,120)

Shapes.SetOpacity(GRBOX,60)

EndSub

Sub GUI

GraphicsWindow.Width=Desktop.Width

GraphicsWindow.Height=Desktop.Height

GraphicsWindow.Top=0

GraphicsWindow.Left=0

GraphicsWindow.FontName=»Gergia»

GraphicsWindow.FontItalic=»true»

GraphicsWindow.DrawImage(back,0,0)                       ‘  background image

‘————————————————————————————————————————-

photo=Shapes.AddImage(Img)                               ‘  Sushi photo

Shapes.Zoom(photo,550/imgw,350/imgh)

Shapes.Move(photo,400,380)

Shapes.SetOpacity(photo,60)

‘————————————————————————————————————————-

GraphicsWindow.penColor=»Red»

GraphicsWindow.BrushColor=»Red»

redrect= Shapes.AddRectangle(30,30)

Shapes.Move(redrect,10,-100)

GraphicsWindow.FontSize=25

TTL=Shapes.AddText(» Sushi Restaurent  Order System  «)  ‘  Title

Shapes.Move(TTL,500,10)

‘————————————————————————————————————————-

GraphicsWindow.FontSize=25

GraphicsWindow.BrushColor=»Navy»

For i=1 To array.GetItemCount(Btns)

btn[i]= Controls.AddButton(Btns[i],50,125+75*(i-1))    ‘   Menu

Controls.SetSize(btn[i],250,55)

EndFor

‘————————————————————————————————————————-

GraphicsWindow.FontSize=16

receipt=Controls.AddMultiLineTextBox(1000,125)           ‘   receipt box

Controls.SetSize(receipt,350,600)

Shapes.SetOpacity(receipt,70)

EndSub

Sub InitData

back=ImageList.LoadImage(«C:\Windows\Web\Wallpaper\Scenes\img29.jpg»)

url= «http://farm7.static.flickr.com/6109/6245861119_1f06dabea8.jpg»

‘url=Flickr.GetRandomPicture(«Sushi»)

img= imagelist.LoadImage(url)

imgw= ImageList.GetWidthOfImage(img)

imgh= ImageList.GetHeightOfImage(img)

Btns=»1=Hot Appetizer;2=Cold Appetizer;3=Nigiri;4=Special Rolls;5=Sea Food;6=Dinner;7=Deserts&Beverage »

‘————————————————————————————————————————-

Menu[1]=»1=Japanese Eggplant;2=Tempura;3=Softshell Crab;4=Crab Cake;5=Oyster Saute»

Menu[2]=»1=Crab and Shrimp Sunomono;2=Aji tako Salad;3=Salmon radish Roll;4=Tuna with rice Biscuit»

Menu[3]=»1=Crab;2=Eel Sea;3=Halibut;4=Mackerel;5=Octopus;6=Omelet;7=Salmon;8=Salmon Roe;9=Scallop;10=Sea Urchin;11=Squid;12=Tuna»

Menu[4]=»1=Alaskan Roll;2=Hawaian Roll;3=Mexican Roll;4=Eel Roll;5=Avocado Roll»

Menu[5]=»1=Salmon;2=Scallops;3=Sea Bass;4=Tuna;5=Monk Fish;6=Black Cod;7=Yellow tail»

Menu[6]=»1=Chicken Teriyaki;2=Assorted Tempura;3=Sushi Deluxe;4=Assorted Sashimi Plate;5=Chirashi Sushi»

Menu[7]=»1=Ice Cream;2=Soda;3=Cola;4=Hot Tea;5=Cold Tea»

‘————————————————————————————————————————-

Price[1]=»1=7.00;2=7.00;3=8.50;4=9.50;5=7.00″

Price[2]=»1=7.00;2=9.50;3=9.50;4=10.50″

Price[3]=»1=3.50;2=5.00;3=4.50;4=3.50;5=4.00;6=3.00;7=4.00;8=5.00;9=4.50;10=7.50;11=3.75;12=4.50″

Price[4]=»1=12.00;2=12.50;3=11.50;4=10.50;5=7.50″

Price[5]=»1=12.00;2=14.00;3=16.50;4=15.50;5=13.00;6=13.50;7=14.50″

Price[6]=»1=12.00;2=13.00;3=22.00;4=24.50;5=22.50″

Price[7]=»1=2.50;2=1.50;3=1.50;4=2.00;5=1.50″

CRLF= Text.GetCharacter(13)+Text.GetCharacter(10)

EndSub

Small Basic: Triángulos y punto medio de una recta (código)


pendiente

Trazado de triángulos con base en la recta que pasa (corta) a otra recta por su punto medio

código:

  1. ‘ x1 < o > x2
  2. TextWindow.WriteLine(«Input      x1»)
  3. x1 = TextWindow.ReadNumber()
  4. TextWindow.WriteLine(«Input      y1»)
  5. y1 = TextWindow.ReadNumber()
  6. TextWindow.WriteLine(«Input      x2»)
  7. x2 = TextWindow.ReadNumber()
  8. TextWindow.WriteLine(«Input      y2»)
  9. y2 = TextWindow.ReadNumber()
  10. ‘ m is the slope of the line
  11. m =      (y2-y1) / (x2-x1)
  12. x =      (x1 + x2)/2
  13. y=      (y1 + y2)/2
  14. TextWindow.WriteLine(«the      slope of the line is :  » + m)
  15. GraphicsWindow.PenWidth = 1
  16. GraphicsWindow.PenColor =      «Red»
  17. GraphicsWindow.DrawLine(x1, y1,      x2, y2)
  18. GraphicsWindow.PenWidth= 1
  19. GraphicsWindow.PenColor=      «Blue)
  20. GraphicsWindow.DrawEllipse(x1,y1,      10,10)
  21. GraphicsWindow.DrawEllipse(x2,y2,      10,10)
  22. GraphicsWindow.PenWidth = 1
  23. GraphicsWindow.PenColor =      «Red»
  24. GraphicsWindow.DrawBoundText(x,      y,20, » medio «)
  25. GraphicsWindow.DrawLine(x, y, x      + 200, y)
  26. GraphicsWindow.DrawLine(x, y, x      – 200, y)
  27. GraphicsWindow.PenColor =      «Cyan»
  28. GraphicsWindow.DrawLine(x +      200, y, x1, y1)
  29. GraphicsWindow.DrawLine(x –      200, y, x1, y1)
  30. GraphicsWindow.DrawLine(x +      200, y, x2, y2)
  31. GraphicsWindow.DrawLine(x –      200, y, x2, y2)
  32. ‘ slope = m = (y2 – y1) / (x2 –      x1) = elevation / traveled.  for x1      different from  x2
  33. tangent      = y2-y1 / x2-x1
  34. ‘      distance = d
  35. a= Math.Power(x2- x1, 2)
  36. b =      Math.Power(y2-y1, 2)
  37. c = a + b
  38. d = Math.SquareRoot(c)
  39. TextWindow.WriteLine(«the      distance is : «

Small Basic: cálculo del punto medio de una recta, dadas sus coordenas


pmedio1

Escribir un programa en Small Basic, que calcule el punto medio de cualquier recta, dadas sus coordenas. La manera de obtener geométricamente el punto medio de una recta es Dado un segmento, cuyos extremos tienen por coordenadas:
(x1, y1) , (x2, y2) … el punto medio tendrá por coordenadas
.                           (x, y) = ( x1+x2)/ 2 , (y1+y2) / 2 )

 

TextWindow.WriteLine(«INPUT x1»)
x1= TextWindow.ReadNumber()
TextWindow.WriteLine(«INPUT y1»)
y1= TextWindow.ReadNumber()
TextWindow.WriteLine(«INPUT x2»)
x2= TextWindow.ReadNumber()
TextWindow.WriteLine(«INPUT y2»)
y2= TextWindow.ReadNumber()
x = (x1 + x2)/2
y= (y1 + y2)/2
TextWindow.WriteLine(«x =  » + x + »   y = » + y)
GraphicsWindow.Width = 240
GraphicsWindow.Height = 240
GraphicsWindow.PenColor = «Blue»
GraphicsWindow.DrawLine(x1, y1, x2, y2)
GraphicsWindow.PenWidth = 10
GraphicsWindow.PenColor = «Red»
GraphicsWindow.DrawEllipse(x, y, 20, 20)

Small Basic: Area de un triángulo (código)


areatri

Se pide ingresar la base y altura de un triángulo, y el programa calcula el área y lo grafica.  Edited by Nonki Takahashi

  1. ‘  Program Listing WGZ319
  1. ‘Area of a triangle
  2. TextWindow.Write(«enter the value of the base of the triangle: «)
  3. base = TextWindow.ReadNumber()
  4. TextWindow.Write(«enter the value of the height of the triangle: «)
  5. height = TextWindow.ReadNumber()
  6. area = (base * height) / 2
  7. TextWindow.WriteLine(«The area is » + Area)
  1. cm = 24 ‘ [px/cm]
  2. size = 12 ‘ [cm]
  3. GraphicsWindow.Width = cm * size
  4. GraphicsWindow.Height = cm * size
  5. GraphicsWindow.Top = TextWindow.Top + 150
  6. GraphicsWindow.Left = TextWindow.Left + 50
  7. GraphicsWindow.BackgroundColor = «LightGray»
  8. DrawGrid()
  9. DrawTriangle()
  1. Sub DrawGrid
  2. GraphicsWindow.PenColor = «DimGray»
  3. For x = 0 To cm * size Step cm
  4. GraphicsWindow.DrawLine(x, 0, x, cm * size)
  5. EndFor
  6. For y = 0 To cm * size Step cm
  7. GraphicsWindow.DrawLine(0, y, cm * size, y)
  8. EndFor
  9. EndSub
  1. Sub DrawTriangle
  2. GraphicsWindow.PenColor = «Black»
  3. GraphicsWindow.BrushColor = «MediumSeaGreen»
  4. k = 0.3 ‘ 0 <= k <= 1
  5. pxBase = base * cm
  6. pxHeight = height * cm
  7. x1 = pxBase * k
  8. y1 = 0
  9. x2 = pxBase
  10. y2 = pxHeight
  11. x3 = 0
  12. y3 = y2
  13. triangle = Shapes.AddTriangle(x1, y1, x2, y2, x3, y3)
  14. Shapes.Move(triangle, cm, cm)
  15. EndSub

La ecuación de la línea recta que muestra los ejes X e Y


easy

Pregunta:   Después de resolver la ecuación y = ax + b, ¿cómo puede Gráficor una línea recta en los ejes X e Y como Excel? – carlosfmur1948

Respuesta:   Tienes que dibujar cada segmento de línea y los ejes y etiquetado etc usando GraphicsWindow.DrawLine, y dando las coordenadas en píxeles – esto puede requerir un poco de conversión. Es necesario para calcular las coordenadas de los dos extremos del segmento de línea que se está dibujando, usando la ecuación o cualquier otro método es el adecuado.
Casualmente, yo estaba pensando en escribir una extensión de trazado simple en lugar de vertimiento datos a Excel a través de un archivo de texto que es lo que tengo que hacer si quiero una parcela de SmallBASIC.
Easy Graph  por NaoChanON

http://social.msdn.microsoft.com/Forums/en-US/smallbasic/thread/4f6b079a-c2c2-41f2-b38d-85ebcf9981ef/

Graficar con varios Anchos de pluma (código Small Basic y Visual Basic


a20
Mediante el uso de los bucles , se puede escribir fácilmente un programa que dibuja varias líneas con el aumento de grosor de la pluma.
La parte interesante de este programa es el bucle, donde se aumenta la PenWidth cada vez que el bucle se ejecuta y luego dibujar una nueva línea debajo de la anterior.

Small Basic

  1. GraphicsWindow.BackgroundColor = «Black»
  2. GraphicsWindow.Width = 200
  3. GraphicsWindow.Height = 160
  4. GraphicsWindow.PenColor = «Blue»
  5. For i = 1 To 10
  6. GraphicsWindow.PenWidth = i
  7. GraphicsWindow.DrawLine(20, i * 15, 180, i * 15)
  8. Endfor

Visual Basic

  1. Module UntitledModule
  2. Dim i As Primitive
  3. Sub Main()
    1. GraphicsWindow.BackgroundColor = «Black»
    2. GraphicsWindow.Width = 200
    3. GraphicsWindow.Height = 160
    4. GraphicsWindow.PenColor = «Blue»
  1. For i = 1 To 10

i.   GraphicsWindow.PenWidth = i

ii.   GraphicsWindow.DrawLine(20, i * 15, 180, i * 15)

  1. Next
  2. End Sub
  3. End Module

Sierpenski Triangles – Small Basic Featured Programs (Código)


a18

The Official Blog of Small Basic    http://blogs.msdn.com/b/smallbasic/   Ed Price – MSFT    NaochanON created this program that generates these triangles:

Program Listing: RBB339

  1. ‘ Fractale viewdata()              ‘Input numbers&marks for controls
    init_View()
    Controls.ButtonClicked = OnButtonClicked

    Sub Show_Fractal
    ‘ Base
    Base_Triangle()
    for k=Real_No[4] To 1 Step -1
    GraphicsWindow.PenWidth=1
    GraphicsWindow.PenColor=»white»
    GraphicsWindow.BrushColor= GraphicsWindow.GetRandomColor() ‘ «white»
    PowerK=Math.Power(0.5,k)
    For i=1 To  (Math.Power(2,k)-1)  Step 2          ‘ Y direction

    For j=1 To (Math.Power(2,k)-1-(i-1))   Step 2        ‘ X direction
    BaseY[i][j]=ACY*PowerK +(i-1)*ACY*Powerk
    BaseX[i][j]=ACX*PowerK +(j-1)*ABX*PowerK +(i-1)*ACX*powerk
    gas[i][j]=Shapes.AddTriangle(0,0,PowerK*Lc,0,PowerK*(Lc-MCX),PowerK*YH)
    Shapes.Animate(gas[i][J],SX+BaseX[i][j],SY+AY-BaseY[i][j],1000/k)
    EndFor
    EndFor
    EndFor
    EndSub

    Sub Base_Triangle
    La=Real_No[1]    ‘ Length a
    Lb=Real_No[2]    ‘ Length b
    Lc=Real_No[3]    ‘ Length c
    MCX=(La*La+Lc*Lc-Lb*Lb)/2/Lc           ‘ MCX
    YH=math.SquareRoot(La*La-MCX*MCX)      ‘ Hight
    AX=0             ‘ Point-A X C
    AY=YH            ‘ Point-A Y . . .
    BX=Lc            ‘ Point-B X . . YH .
    BY=YH            ‘ Point-B Y A . . . . . B
    CX=MCX
    CY=0
    ABX=(AX+BX)
    ABY=(AY+BY)
    ACX=(AX+CX)
    ACY=(AY+CY)

    GraphicsWindow.PenColor=»#FF0000″  ‘»Red»
    GraphicsWindow.BrushColor=»#FF0000″  ‘»Red»
    Base=Shapes.AddTriangle(AX,AY,BX,BY,CX,CY)
    SX=50             ‘ shift X
    SY=170            ‘ shift Y
    Shapes.Animate(Base,SX,SY,100)
    Program.Delay(500)
    EndSub

    Sub OnButtonClicked
    GraphicsWindow.BrushColor = «Red»
    name=controls.LastClickedButton     ‘Last button
    nm=controls.GetButtonCaption(name)  ‘ Button’s caption
    Xloc=50+2*BW*(count)    ‘ Angle number / length showing position
    If nm=»Del» Then
    Del_word()
    elseIf nm=»AC» Then
    Reset()
    elseIf nm=»Exe» Then
    Execute()
    else
    Make_word()
    endif
    EndSub

    Sub Fractale
    If Real_No[1]+Real_No[2] <= Real_No[3] Then
    Sound.PlayBellRing()    ‘ Check ( a+ b > C)
    Reset()
    endif
    For i= 1 To 4
    Shapes.Remove(T[i])   ‘ initial triangle and a b c
    EndFor
    Show_Fractal()          ‘ fractale showing
    EndSub

    Sub Sample_Triangle
    GraphicsWindow.PenColor=»Yellow»
    GraphicsWindow.BrushColor=»Yellow»
    AX=0
    AY=400
    BX=600
    BY=400
    CX=450
    CY=0
    MX=50
    MY=150
    T[1]=Shapes.AddTriangle(AX,AY,BX,BY,CX,CY)
    Shapes.SetOpacity(T[1],30)
    Shapes.Animate(T[1],MX,MY,600)
    T[2]=shapes.AddText(» a «)
    Shapes.Animate(T[2],MX+CX/2-50,MY+AY/2,800)
    T[3]=shapes.AddText(» b «)
    Shapes.Animate(T[3],MX+10+CX+(BX-CX)/2,MY+CY+(BY-CY)/2,1000)
    T[4]=shapes.AddText(» c «)
    Shapes.Animate(T[4],MX+BX/2,MY+BY,1200)
    EndSub

    Sub   Button_Set
    GraphicsWindow.BrushColor = «Blue»
    nn=0
    dm=s[1]
    Loop2:
    end_P=Text.GetIndexOf(dm,» «)
    msg=text.GetSubText(dm,1,end_P-1)  ‘ word
    nn=nn+1
    btn[nn][1] =Controls.AddButton(msg, 10+BW*(nn-1), BH+50)
    Controls.SetSize(btn[nn][1] ,BW-2,BH-2)  ‘Set 13 Control buttons
    If nn=WN Then
    Goto end1
    EndIf
    dm=text.GetSubTextToEnd(dm,end_p+1)   ‘gets number value or mark’s name
    Goto loop2
    end1:
    add_num=»»
    count=0
    EndSub

    Sub Reset
    GraphicsWindow.Clear()
    GraphicsWindow.Show()
    init_View()
    Button_Set()
    EndSub

    Sub init_View
    WN=13   ‘ 13 words
    BW=70
    BH=45
    GW=BW*WN
    GH=BH*15+20
    GraphicsWindow.Hide()
    GraphicsWindow.top=0
    GraphicsWindow.Width = GW+2*10
    GraphicsWindow.Height = GH
    GraphicsWindow.Title = «Fractale graph»
    GraphicsWindow.Show()
    GraphicsWindow.BackgroundColor = «Teal»
    GraphicsWindow.BrushColor = «White»
    GraphicsWindow.FillRectangle(10+BW*0, 45, BW*3/2, BH-10)
    GraphicsWindow.FillRectangle(10+BW*2, 45, BW*3/2, BH-10)
    GraphicsWindow.FillRectangle(10+BW*4, 45, BW*3/2, BH-10)
    GraphicsWindow.FillRectangle(10+BW*6, 45, BW*3/2, BH-10)
    GraphicsWindow.BrushColor =»Yellow»
    GraphicsWindow.FontSize = 20
    GraphicsWindow.FontName = «Coorie new»
    GraphicsWindow.FontItalic=»True»
    GraphicsWindow.DrawText(15,5,»Input a b c values (300-800 may be better)»)
    GraphicsWindow.DrawText(10+BW*9,5,»Note!: Must be ( a + b > c ) «)
    GraphicsWindow.DrawText(10+BW*6,23,»Steps: Under 7 «)
    GraphicsWindow.DrawText(10+BW*9,40,»AC=All Clear»)
    GraphicsWindow.DrawText(10+BW*9,60,»Exe=Enter Value or Run»)
    Button_Set()
    GraphicsWindow.FontSize = 23
    GraphicsWindow.DrawText(20,45,»a: «)
    GraphicsWindow.DrawText(20+BW*2,45,»b: «)
    GraphicsWindow.DrawText(20+BW*4,45,»c: «)
    GraphicsWindow.DrawText(20+BW*6,45,»S: «)
    Sample_Triangle()   ‘ show sample triangle
    EndSub

    Sub data  ‘ 13 words
    s[1]=»1 2 3 4 5 6 7 8 9 0 Del AC Exe »
    EndSub

    Sub Del_word
    Shapes.Remove(numbers[count])
    add_num=Text.GetSubText(add_num,1,Text.GetLength(add_num)-1)
    numbers[count] = Shapes.AddText(add_num)   ‘ 1 word delete
    Shapes.Move(numbers[count] , Xloc, 45)
    EndSub

    Sub Execute
    count=count+1
    Real_No[count]=add_num
    add_num=»»
    If count=4 then
    Fractale()
    endif
    EndSub

    Sub Make_word
    Shapes.Remove(numbers[count])
    add_num=text.Append(add_num,nm) ‘ Add 1 word
    numbers[count] = Shapes.AddText(add_num)
    Shapes.Move(numbers[count], Xloc, 45)
    EndSub

  2. //

Copyright (c) Microsoft Corporation. All rights reserved.