【问题标题】:How to change perl win32::GUI window title bar image?如何更改 perl win32::GUI 窗口标题栏图像?
【发布时间】:2011-12-07 20:34:44
【问题描述】:

在 Windows 操作系统中使用 Perl Win32::GUI 模块开发桌面应用程序时,标题栏中出现“骆驼”图像(窗口最左侧的图像)。
有可能改变那个吗? 如果是, 什么样的图像将支持(.gif,.png,.jpg,.ico)?和 我需要在下面写的设计窗口中更改/添加哪个属性?

  use strict;
  use Win32::GUI;

  my $main = Win32::GUI::Window->new(
    -name    => "Main",
    -title   => "Win32-GUI:Test",
    -left    => 100,
    -top     => 100,
    -width   => 600,
    -height  => 400,
  );

  sub Main_Terminate() {
    print "Main window terminated\n";
    return -1;
  }


  $main->Show();

 Win32::GUI::Dialog();

注意:我正在 windows XP 中开发应用程序

【问题讨论】:

    标签: perl


    【解决方案1】:

    是的,这是可能的。使用主窗口的SetIcon方法。

    $main->SetIcon($icon);
    

    其中$icon 必须是Win32::IconWin32::BitmapWin32::BitmapInline 的实例。

    【讨论】:

      猜你喜欢
      • 2011-07-03
      • 1970-01-01
      • 1970-01-01
      • 2022-08-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-01-16
      相关资源
      最近更新 更多