> -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] Behalf Of > Beckett Richard-qswi266 > Sent: Tuesday, February 10, 2004 12:13 PM > To: '[EMAIL PROTECTED]' > Subject: Perl and delphi interaction query. > > > Guys, > > I inherited a delphi GUI, which is too complicated to even consider > re-writing. > > So, I added a button that fires of a perl .exe, made with perlapp. > > The perl .exe works perfectly when run alone. It uses Tk and > a ROText widget > to display the progress of the script, and I changed the Tk > icon in the > corner to my own, like this... > > my $mw = MainWindow -> new (-title => " $title $version"); > $mw -> withdraw; > $mw -> minsize (qw(600 400)); > my $status = $mw -> ROText()->pack(-expand, 1, -fill, 'both'); > my $button = $mw -> Button ( > -text , 'Cancel', > -command, \&finished, > ) -> pack (-side, 'bottom'); > my $icon = $mw->Photo(-file => 'SpikeWare.gif'); > $mw->idletasks; > $mw->iconimage($icon); > $mw -> Popup; > $mw -> focus; > > However, when I run this by clicking on the button from the > delphi created > gui, the script just dies. > > If I then remove the 3 lines that change the icon: > my $icon = $mw->Photo(-file => 'SpikeWare.gif'); > $mw->idletasks; > $mw->iconimage($icon); <- this seems to be the main culprit.
Can't help with delphi but in view of your analysis try using a .xpm image, which can be included in your script like so... $mw->Pixmap( 'myicon', -data => loadIcon()); $mw->Icon( -image => 'myicon' ); sub loadIcon { return <<'EOT'; /* XPM */ static char *image_xpm[] = { /* width height ncolors chars_per_pixel */ "30 30 66 1", " c #002d31", ". c #00314a", "+ c #001836", "@ c #030303", "# c #16b0c9", "$ c #07edf2", "% c #0ec9d6", "& c #25abca", "* c #e9f8e9", "= c #1999c4", "- c #150205", "; c #031405", "> c #26c6d6", ", c #040515", "' c #2fa595", ") c #cc93b8", "! c #f9e9e8", "~ c #268eb4", "{ c #26cde9", "] c #2b79a7", "^ c #eafbf8", "/ c #030625", "( c #4fc39a", "_ c #011627", ": c #2e7297", "< c #171525", "[ c #2c8798", "} c #27ebf6", "| c #041516", "1 c #35887b", "2 c #160415", "3 c #56c6b5", "4 c #148b97", "5 c #2897c5", "6 c #03e6bb", "7 c #558377", "8 c #6a93ab", "9 c #eaebea", "0 c #1a7aa6", "a c #26050d", "b c #1995b5", "c c #8bedf9", "d c #06ebd6", "e c #fdfdfd", "f c #2ac5b9", "g c #69aab2", "h c #151407", "i c #052510", "j c #14a8b9", "k c #28b5e5", "l c #faebf7", "m c #160425", "n c #17b9e3", "o c #518b94", "p c #09c9b7", "q c #27a6b8", "r c #eeeddb", "s c #f48af4", "t c #0ea899", "u c #f377f9", "v c #daf6ec", "w c #f8f9eb", "x c #52abb1", "y c #56d3e6", "z c #29e6d7", "A c #0bd5e5", "eeeee@@@, ~~~b~bb55~0~5~b~~]]~", "@@|__~~bq=bb~b5~qj=&b'~b~~~~:@", ",~]b~b55qbb1|ooo7@@ww@;-bb~~~t", "m~~~~=j~&o<-@@@@@@[EMAIL PROTECTED]", "[:b[bbb5,@eew!@@@@[EMAIL PROTECTED]", ",,bbjq&|eeeee@@@@@eewee;&&=qqb", "a/jq==o-eewww@@@@weeeee/j##==t", ";b5#&b<[EMAIL PROTECTED];;j##&b#", ",~j5#,[EMAIL PROTECTED],###bjb", ",j=&[EMAIL PROTECTED]@-####&&q", "bj5&pweweweeee;;@[EMAIL PROTECTED]@", "qq=#jwwweeeel@@,,-@@ A%%&####@", "qj&j>[EMAIL PROTECTED],pdA%x2>%%##@", "5##jpteeeei>f,su,A}A%>/;#%#>%@", "[EMAIL PROTECTED])>ddpAA@@{%%#j@", "####%nkA%Ad{A,,[EMAIL PROTECTED]@", "&##%#%pA$AAd},@,}AAAd-9%{%%##@", "#j%#>,,A%AA$Ap2d}$$$,e!AdA%%%@", "#%##p@;pAA$AA$.$$$$d-rcA%pA%%@", "&#>[EMAIL PROTECTED]|^%%$A%%_@", "n%%#n@,[EMAIL PROTECTED]@@", "[EMAIL PROTECTED]/$$|re!-{AAA%%;@", "[EMAIL PROTECTED]@[EMAIL PROTECTED]@@[EMAIL PROTECTED]", "-j,f#/@A%$%$$,@; $$d,$$AAd%p;@", "@;@%%nh%%A$$2; d$$$$zAAAAAA%,-", "@eek%n-pn$Am,z}$$}d$A$AAA%n%##", "eeeon%,@%(,_$d$d{3AAAAAAA%A#%%", "eee,#f-@@_d{g@@m-adAAAAAA%%#8#", "ee-_>{;-/%dnd ,-adAA%AAAA%>j,@", "ee,>&&@[EMAIL PROTECTED],,", }; EOT } HTH - Lynn. > > It works perfectly under all circumstances. > > I really want to use my icon, so does anyone know why it > won't run when > fired off from delphi? _______________________________________________ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs