use Win32::GUI; $Win = new Win32::GUI::Window( -left => 101, -top => 171, -width => 400, -height => 300, -name => "Win", -text => "Window Title", -background => [255, 255, 255], #color WHITE ); $Win->Show(); $Win->AddButton( -text => "ToRed", -name => "Button1", -left => 19, -top => 14, -width => 31, -height => 21, -foreground => 0, ); Win32::GUI::Dialog(); sub Win_Terminate { return -1; } sub Button1_Click { #something like the following false code: # $Win->background([255, 0, 0]); }