Setting app wide icon?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Brett Romero

    #1

    Setting app wide icon?

    I'd like to use the same icon for my project's EXE file and forms. The
    icon may change so I need a way to put the icon file name in a variable
    and assign it to the icon propery of all forms. When assigned at
    design time, the following code is generated:

    this.Icon = ((System.Drawin g.Icon)(resourc es.GetObject("$ this.Icon")));

    How can I do this dynamically at run time via a variable.

    Thanks,
    Brett

  • Brooke

    #2
    Re: Setting app wide icon?

    Make sure that the icon file always has the same name and that it is located
    in the same directory as the program. If you want to replace the icon with
    a new one then just copy the new icon to the program directory and make sure
    that it has the same name. You will of course have to delete the old icon,
    or move it first.

    "Brett Romero" <account@cygen. com> wrote in message
    news:1138750030 .726310.35490@g 44g2000cwa.goog legroups.com...[color=blue]
    > I'd like to use the same icon for my project's EXE file and forms. The
    > icon may change so I need a way to put the icon file name in a variable
    > and assign it to the icon propery of all forms. When assigned at
    > design time, the following code is generated:
    >
    > this.Icon = ((System.Drawin g.Icon)(resourc es.GetObject("$ this.Icon")));
    >
    > How can I do this dynamically at run time via a variable.
    >
    > Thanks,
    > Brett
    >[/color]


    Comment

    Working...