Option Explicit
Dim frameDEN As wxMDIChildFrame = New wxMDIChildFrame( myframe, -1, "Density Correction", wxPoint(0,0), wxSize(344, 248), wxCAPTION | wxSYSTEM_MENU | wxMINIMIZE_BOX ),
panelDEN as wxPanel = new wxPanel(frameDEN, -1) ,
StaticBox1d as wxStaticBox = new wxStaticBox(panelDEN, 1,"Corrector de densidad:", wxPoint(16, 32), wxSize(304, 160)),
StaticText1d as wxStaticText = new wxStaticText(panelDEN, 2,"Insertar", wxPoint(32, 56), wxSize(72, 16)),
StaticText2d as wxStaticText = new wxStaticText(panelDEN, 3,"Temperatura", wxPoint(32, 104), wxSize(72, 16)),
TextCtrl1d as wxTextCtrl = new wxTextCtrl(panelDEN, 4,"", wxPoint(112, 56), wxSize(96, 20)),
TextCtrl2d as wxTextCtrl = new wxTextCtrl(panelDEN, 5,"", wxPoint(112, 104), wxSize(96, 20)),
StaticText3d as wxStaticText = new wxStaticText(panelDEN, 6,"kg^m3", wxPoint(216, 64), wxSize(56, 16)),
StaticText4d as wxStaticText = new wxStaticText(panelDEN, 7,"Grados C", wxPoint(216, 112), wxSize(56, 16)),
Button1d as wxButton = new wxButton(panelDEN, 8,"Corregir", wxPoint(232, 152), wxSize(72, 24)),
StaticText5d as wxStaticText = new wxStaticText(panelDEN, 9,"Densidad", wxPoint(32, 152), wxSize(56, 16)),
StaticText6d as wxStaticText = new wxStaticText(panelDEN, 10,"0", wxPoint(112, 160), wxSize(96, 16)),
StaticText7d as wxStaticText = new wxStaticText(panelDEN, 11,"densidad:", wxPoint(32, 72), wxSize(72, 16)),
StaticText8d as wxStaticText = new wxStaticText(panelDEN, 12,"de medición:", wxPoint(32, 120), wxSize(72, 16)),
StaticText9d as wxStaticText = new wxStaticText(panelDEN, 13,"corregida:", wxPoint(32, 168), wxSize(56, 16))
frameDEN.Show(FALSE)

Dim myBmpDen As wxEmptyBitmap = New wxEmptyBitmap( 0, 0 )
myBmpDen.LoadFile( "repBin/denmodule.sbi" , wxBITMAP_TYPE_PNG )
Dim imgDen = New wxBitmapButton( panelDEN, -1, myBMPDen, wxPoint(-1, -1), wxSize(-1, -1), wxNO_3D )
Dim myBmpVer As wxEmptyBitmap = New wxEmptyBitmap( 0, 0 )
myBmpVer.LoadFile( "repBin/version.sbi" , wxBITMAP_TYPE_PNG )
Dim imgVer = New wxBitmapButton( panelDEN, -1, myBMPver, wxPoint(93,200 ), wxSize(-1, -1), wxNO_3D )

Dim TEMP
Dim DM
Dim DC
Dim CORREC
Dim CORREC1 

Sub cor_density (event)
DM = val(TextCtrl1d.Getvalue())
TEMP = val(TextCtrl2d.Getvalue())
Correc1 = TEMP*9/5+32
COrrec = 1.313454-0.132674*Correc1+0.002057793*(Correc1^2)-0.000002627634*(Correc1^3)
DC = DM + Correc
StaticText6d.SetLabel(DC)
End Sub

Connect( Button1d, wxEVT_COMMAND_BUTTON_CLICKED, "cor_density")
Dim ico = new wxIconEmpty()
ico.LoadFile("repBin/ico.sbi",wxBITMAP_TYPE_PNG)
Dim ico1 = new wxIconEmpty()
ico1.LoadFile("repBin/ico1.sbi",wxBITMAP_TYPE_PNG)
Dim ico2 = new wxIconEmpty()
ico2.LoadFile("repBin/ico2.sbi",wxBITMAP_TYPE_PNG)
Dim ico3 = new wxIconEmpty()
ico3.LoadFile("repBin/ico3.sbi",wxBITMAP_TYPE_PNG)
myframe.SetIcon(ico)
framereport.SetIcon(ico3)
myChildFrame1.SetIcon(ico2)
frame1.SetIcon(ico)
frameOUT.SetIcon(ico)
framecalc.SetIcon(ico1)
wxSleep(1)	
myFrame.show(TRUE)