sub MessageBox{ my $MessageBox_About = new Win32::GUI::Window( -name => "AboutWindow", -title => "About this program", -pos =>[ 150, 150 ], -size => [150,150], -parent => $Main, ); $MessageBox_About->AddLabel( -name => "MsgBox_Label", -text => "Blabla", -pos => [20,20], ); $MessageBox_About->AddButton( -name => "MsgBox_Button", -text => "Ok", -pos => [50,40], ); $MessageBox_About->DoModal(); return 0; } #### my $MenuButton1_About = $MenuButton1->AddMenuItem( -text => "About", -id => $Menu_id++, -onClick => MessageBox(), );