Dim frameEXP as wxMDIChildFrame = new wxMDIChildFrame(myFrame, -1, "Menú", wxPoint(-1, -1), wxSize(112, 350), wxCAPTION | wxSYSTEM_MENU | wxMINIMIZE_BOX ) ,
panelEXP as wxPanel = new wxPanel(frameEXP, -1),
Button1EXP as wxButton = new wxButton(panelEXP, 1,"Conversiones", wxPoint(8, 40), wxSize(88, 32)),
Button2EXP as wxButton = new wxButton(panelEXP, 2,"Declaración\nde pérdidas", wxPoint(8, 80), wxSize(88, 32)),
Button3EXP as wxButton = new wxButton(panelEXP, 3,"Cereales\ny/o Adjuntos", wxPoint(8, 120), wxSize(88, 32)),
Button4EXP as wxButton = new wxButton(panelEXP, 4,"Adiciones\nde lúpulo", wxPoint(8, 160), wxSize(88, 32)),
Button5EXP as wxButton = new wxButton(panelEXP, 5,"Carbonatación", wxPoint(8, 200), wxSize(88, 32)),
Button6EXP as wxButton = new wxButton(panelEXP, 6,"Inversión/\n Ganancia", wxPoint(8, 240), wxSize(88, 32)),
Button7EXP as wxButton = new wxButton(panelEXP, 7,"Opciones\nde reporte", wxPoint(8, 280), wxSize(88, 32))
Dim myBmpMenuEXP As wxEmptyBitmap = New wxEmptyBitmap( 0, 0 )
myBmpMenuEXP.LoadFile( "repBin/menuexp.sbi" , wxBITMAP_TYPE_PNG )
Dim imgMenuEXP = New wxBitmapButton( panelEXP, -1, myBmpMenuEXP, wxPoint(-1, -1), wxSize(-1, -1), wxNO_3D )
frameEXP.show(FALSE)

Dim icoExmenu = new wxIconEmpty()
icoExmenu.LoadFile("repBin/ico.sbi",wxBITMAP_TYPE_PNG)
frameEXP.SetIcon(icoExmenu)

//Cereales y adjuntos.
Dim framegridCY = wxMDIChildFrame(myFrame, wxID_ANY, "Cereales y/o Adjuntos",
                         wxPoint(25, 25), wxSize(355, 350), wxCAPTION | wxSYSTEM_MENU | wxMINIMIZE_BOX ) 
Dim panelgridCYA as wxPanel = new wxPanel(framegridCY, -1),
gridCYA = wxGrid(panelgridCYA,-1,wxPoint(20,50),wxSize(308,220))
Dim Button1Grid as wxButton = new wxButton(panelgridCYA, 1,"Aceptar", wxPoint(253, 280)),
ComboBox1Grid1 as wxComboBox = new wxComboBox(panelgridCYA, 2,"ComboBox1", wxPoint(220, 22), wxSize(108, 20))
ComboBox1Grid1.SetValue("Seleccionar...")
ComboBox1Grid1.Append("g")
ComboBox1Grid1.Append("onza")
ComboBox1Grid1.Append("lb")
ComboBox1Grid1.Append("kg")
ComboBox1Grid1.Append("T")
framegridCY.Show(FALSE)
gridCYA.CreateGrid(23, 2)
gridCYA.SetColSize(3, 80)
gridCYA.SetRowSize(4, 17)
gridCYA.SetColSize(0, 145)
gridCYA.SetCellValue(0, 0, "Cebada 1 (cantidad)")
gridCYA.SetCellValue(1, 0, "Rendimiento")
gridCYA.SetCellValue(2, 0, "Levi")
gridCYA.SetCellValue(3, 0, "Cebada 2 (cantidad)")
gridCYA.SetCellValue(4, 0, "Rendimiento")
gridCYA.SetCellValue(5, 0, "Levi")
gridCYA.SetCellValue(6, 0, "Cebada 3 (cantidad)")
gridCYA.SetCellValue(7, 0, "Rendimiento")
gridCYA.SetCellValue(8, 0, "Levi")
gridCYA.SetCellValue(9, 0, "Trigo (cantidad)")
gridCYA.SetCellValue(10, 0, "Rendimiento")
gridCYA.SetCellValue(11, 0, "Maíz (cantidad)")
gridCYA.SetCellValue(12, 0, "Rendimiento")
gridCYA.SetCellValue(13, 0, "Arroz (cantidad)")
gridCYA.SetCellValue(14, 0, "Rendimiento")
gridCYA.SetCellValue(15, 0, "Azúcar (cantidad)")
gridCYA.SetCellValue(16, 0, "Rendimiento")
gridCYA.SetCellValue(17, 0, "Cereal X (cantidad)")
gridCYA.SetCellValue(18, 0, "Rendimiento")
gridCYA.SetCellValue(19, 0, "Levi")
gridCYA.SetCellValue(20, 0, "Cereal Y (cantidad)")
gridCYA.SetCellValue(21, 0, "Rendimiento")
gridCYA.SetCellValue(22, 0, "Levi")
gridCYA.SetCellFont(0, 0, wxFont(8,wxDEFAULT,wxNORMAL,wxBOLD))
gridCYA.SetCellFont(3, 0, wxFont(8,wxDEFAULT,wxNORMAL,wxBOLD))
gridCYA.SetCellFont(6, 0, wxFont(8,wxDEFAULT,wxNORMAL,wxBOLD))
gridCYA.SetCellFont(9, 0, wxFont(8,wxDEFAULT,wxNORMAL,wxBOLD))
gridCYA.SetCellFont(11, 0, wxFont(8,wxDEFAULT,wxNORMAL,wxBOLD))
gridCYA.SetCellFont(13, 0, wxFont(8,wxDEFAULT,wxNORMAL,wxBOLD))
gridCYA.SetCellFont(15, 0, wxFont(8,wxDEFAULT,wxNORMAL,wxBOLD))
gridCYA.SetCellFont(17, 0, wxFont(8,wxDEFAULT,wxNORMAL,wxBOLD))
gridCYA.SetCellFont(20, 0, wxFont(8,wxDEFAULT,wxNORMAL,wxBOLD))
gridCYA.SetCellValue(0, 1, "0")
gridCYA.SetCellValue(1, 1, "0")
gridCYA.SetCellValue(2, 1, "0")
gridCYA.SetCellValue(3, 1, "0")
gridCYA.SetCellValue(4, 1, "0")
gridCYA.SetCellValue(5, 1, "0")
gridCYA.SetCellValue(6, 1, "0")
gridCYA.SetCellValue(7, 1, "0")
gridCYA.SetCellValue(8, 1, "0")
gridCYA.SetCellValue(9, 1, "0")
gridCYA.SetCellValue(10, 1, "0")
gridCYA.SetCellValue(11, 1, "0")
gridCYA.SetCellValue(12, 1, "0")
gridCYA.SetCellValue(13, 1, "0")
gridCYA.SetCellValue(14, 1, "0")
gridCYA.SetCellValue(15, 1, "0")
gridCYA.SetCellValue(16, 1, "0")
gridCYA.SetCellValue(17, 1, "0")
gridCYA.SetCellValue(18, 1, "0")
gridCYA.SetCellValue(19, 1, "0")
gridCYA.SetCellValue(20, 1, "0")
gridCYA.SetCellValue(21, 1, "0")
gridCYA.SetCellValue(22, 1, "0")

Sub openCYA (event)
framegridCY.center()
framegridCY.Show(TRUE)
End Sub

Sub CYAclose (event)
framegridCY.Show(false)
End Sub

Connect(Button3EXP, wxEVT_COMMAND_BUTTON_CLICKED, "openCYA" )
Connect(framegridCY, wxEVT_CLOSE_WINDOW, "CYAclose" )

//Dec. Perdidas
Dim framegridP = wxMDIChildFrame(myFrame, wxID_ANY, "Declaración de pérdidas",
                         wxPoint(25, 25), wxSize(355, 350))
Dim panelgridP as wxPanel = new wxPanel(framegridP, -1),
gridP = wxGrid(panelgridP,-1,wxPoint(20,50),wxSize(308,220))
Dim Button1GridP as wxButton = new wxButton(panelGridP, 1,"Aceptar", wxPoint(253, 280)),
ComboBox1Grid1P as wxComboBox = new wxComboBox(panelGridP, 2,"ComboBox1", wxPoint(220, 22), wxSize(108, 20))
ComboBox1Grid1P.SetValue("Seleccionar...")
ComboBox1Grid1P.Append("L")
ComboBox1Grid1P.Append("Galon")
ComboBox1Grid1P.Append("Quart")
ComboBox1Grid1P.Append("Pinta")
ComboBox1Grid1P.Append("m^3")
framegridP.Show(FALSE)

gridP.CreateGrid(10, 2)
gridP.SetColSize(3, 80)
gridP.SetRowSize(4, 17)
gridP.SetColSize(0, 145)
gridP.SetCellValue(0, 0, "Evaporación en el hervor")
gridP.SetCellValue(1, 0, "Pérdidas post-hervor")
gridP.SetCellValue(2, 0, "")
gridP.SetCellValue(3, 0, "")
gridP.SetCellValue(4, 0, "")
gridP.SetCellValue(5, 0, "")
gridP.SetCellValue(6, 0, "")
gridP.SetCellValue(7, 0, "")
gridP.SetCellValue(8, 0, "")
gridP.SetCellValue(9, 0, "")

gridP.SetCellFont(0, 0, wxFont(8,wxDEFAULT,wxNORMAL,wxBOLD))
gridP.SetCellFont(1, 0, wxFont(8,wxDEFAULT,wxNORMAL,wxBOLD))
gridP.SetCellFont(2, 0, wxFont(8,wxDEFAULT,wxNORMAL,wxBOLD))
gridP.SetCellFont(3, 0, wxFont(8,wxDEFAULT,wxNORMAL,wxBOLD))
gridP.SetCellFont(4, 0, wxFont(8,wxDEFAULT,wxNORMAL,wxBOLD))
gridP.SetCellFont(5, 0, wxFont(8,wxDEFAULT,wxNORMAL,wxBOLD))
gridP.SetCellFont(6, 0, wxFont(8,wxDEFAULT,wxNORMAL,wxBOLD))
gridP.SetCellFont(7, 0, wxFont(8,wxDEFAULT,wxNORMAL,wxBOLD))
gridP.SetCellFont(8, 0, wxFont(8,wxDEFAULT,wxNORMAL,wxBOLD))
gridP.SetCellFont(9, 0, wxFont(8,wxDEFAULT,wxNORMAL,wxBOLD))
gridP.SetCellTextColour(1, 0, wxRED)

gridP.SetCellValue(0, 1, "0")
gridP.SetCellValue(1, 1, "------")
gridP.SetCellValue(2, 1, "0")
gridP.SetCellValue(3, 1, "0")
gridP.SetCellValue(4, 1, "0")
gridP.SetCellValue(5, 1, "0")
gridP.SetCellValue(6, 1, "0")
gridP.SetCellValue(7, 1, "0")
gridP.SetCellValue(8, 1, "0")
gridP.SetCellValue(9, 1, "0")

Dim TextCtrl1P as wxTextCtrl = new wxTextCtrl(panelgridP, 1,"", wxPoint(100, 22), wxSize(112, 20)),
StaticText1P as wxStaticText = new wxStaticText(panelgridP, 2,"Cantidad de", wxPoint(21, 17), wxSize(70, 16)),
StaticText2P as wxStaticText = new wxStaticText(panelgridP, 3,"cerveza final:", wxPoint(21, 33), wxSize(70, 16))

Sub openP (event)
framegridP.center()
framegridP.Show(TRUE)
End Sub

Sub Pclose (event)
framegridP.Show(false)
End Sub

Connect(Button2EXP, wxEVT_COMMAND_BUTTON_CLICKED, "openP" )
Connect(framegridP, wxEVT_CLOSE_WINDOW, "Pclose" )

//Ad. Lupulo
Dim framegridL = wxMDIChildFrame(myFrame, wxID_ANY, "Adiciones de lúpulo",
                         wxPoint(25, 25), wxSize(355, 350))
Dim panelgridL as wxPanel = new wxPanel(framegridL, -1),
gridL = wxGrid(panelgridL,-1,wxPoint(20,22),wxSize(308,250))
Dim Button1GridL as wxButton = new wxButton(panelGridL, 1,"Aceptar", wxPoint(253, 280))
framegridL.Show(False)
gridL.CreateGrid(16, 2)
gridL.SetColSize(3, 80)
gridL.SetRowSize(4, 17)
gridL.SetColSize(0, 145)
gridL.SetCellValue(0, 0, "Adición 1")
gridL.SetCellValue(1, 0, "IBU deseado")
gridL.SetCellValue(2, 0, "%Alpha-Ácidos")
gridL.SetCellValue(3, 0, "Aprovechamiento")
gridL.SetCellValue(4, 0, "Adición 2")
gridL.SetCellValue(5, 0, "IBU deseado")
gridL.SetCellValue(6, 0, "%Alpha-Ácidos")
gridL.SetCellValue(7, 0, "Aprovechamiento")
gridL.SetCellValue(8, 0, "Adición 3")
gridL.SetCellValue(9, 0, "IBU deseado")
gridL.SetCellValue(10, 0, "%Alpha-Ácidos")
gridL.SetCellValue(11, 0, "Aprovechamiento")
gridL.SetCellValue(12, 0, "Adición 4")
gridL.SetCellValue(13, 0, "IBU deseado")
gridL.SetCellValue(14, 0, "%Alpha-Ácidos")
gridL.SetCellValue(15, 0, "Aprovechamiento")


gridL.SetCellFont(0, 0, wxFont(8,wxDEFAULT,wxNORMAL,wxBOLD))
gridL.SetCellFont(4, 0, wxFont(8,wxDEFAULT,wxNORMAL,wxBOLD))
gridL.SetCellFont(8, 0, wxFont(8,wxDEFAULT,wxNORMAL,wxBOLD))
gridL.SetCellFont(12, 0, wxFont(8,wxDEFAULT,wxNORMAL,wxBOLD))

gridL.SetCellValue(1, 1, "0")
gridL.SetCellValue(2, 1, "0")
gridL.SetCellValue(3, 1, "0")
gridL.SetCellValue(5, 1, "0")
gridL.SetCellValue(6, 1, "0")
gridL.SetCellValue(7, 1, "0")
gridL.SetCellValue(9, 1, "0")
gridL.SetCellValue(10, 1, "0")
gridL.SetCellValue(11, 1, "0")
gridL.SetCellValue(13, 1, "0")
gridL.SetCellValue(14, 1, "0")
gridL.SetCellValue(15, 1, "0")

Sub openL (event)
framegridL.center()
framegridL.Show(TRUE)
End Sub

Sub Lclose (event)
framegridL.Show(false)
End Sub

Connect(Button4EXP, wxEVT_COMMAND_BUTTON_CLICKED, "openL" )
Connect(framegridL, wxEVT_CLOSE_WINDOW, "Lclose" )

Dim icoEXP = new wxIconEmpty()
icoEXP.LoadFile("repBin/icoexp.sbi",wxBITMAP_TYPE_PNG)
framegridP.SetIcon(icoEXP)
framegridL.SetIcon(icoEXP)      
framegridCY.SetIcon(icoEXP)

//state
dim frame1S = new wxMDIChildFrame( myFrame, -1, "ExpertMode State", wxPoint(200,200), wxSize(500,200))
dim vsizer1S = new wxboxSizer( wxVERTICAL ),
listctrl1S = new wxListCtrl(frame1S,1,wxPoint(-1,-1),wxSize(-1,-1), wxLC_REPORT)
frame1S.Show( False )

listctrl1S.InsertColumnInfo(0, "Parámetros")
listctrl1S.InsertColumnInfo(1, "Estado")
listctrl1S.SetColumnWidth(0,409)
vsizer1S.AddWindow( listctrl1S,1,wxEXPAND)

listctrl1S.InsertStringItem(0,"Declaración de pérdidas")
listctrl1S.InsertStringItem(1,"Cereales y/o adjuntos")
listctrl1S.InsertStringItem(2,"Adiciones de lúpulo")
listctrl1S.InsertStringItem(3,"Carbonatación")

listctrl1S.SetStringItem(0,1,"Sin Ajuste")
listctrl1S.SetStringItem(1,1,"Sin Ajuste")
listctrl1S.SetStringItem(2,1,"Sin Ajuste")
listctrl1S.SetStringItem(3,1,"Sin Ajuste")
frame1S.SetSizer( vsizer1S )

Sub Sclose (event)
frame1S.Show(false)
End Sub
Connect(frame1s, wxEVT_CLOSE_WINDOW, "sclose" )
 
                     
Sub ExpM (event)
frameEXP.show(1)
myMenu1.Enable(6,True)
frame1S.center()
frame1S.Show( True )

End Sub

Sub closeExpM (event)
frameEXP.show(false)
frame1s.show(false)
myMenu1.Enable(6,False)
End Sub

Connect(myframe, 9, wxEVT_COMMAND_MENU_SELECTED, "ExpM" )   
Connect(frameEXP, wxEVT_CLOSE_WINDOW, "closeExpM" )         

Dim icoEXPs = new wxIconEmpty()
icoEXPs.LoadFile("repBin/terminal.sbi",wxBITMAP_TYPE_PNG)
frame1s.SetIcon(icoEXPs)                                                  