Results 1 to 3 of 3

Thread: As Any

  1. #1

    Thread Starter
    Addicted Member Frankie902's Avatar
    Join Date
    Feb 2001
    Location
    Lindenwold, NJ, USA
    Posts
    217

    As Any

    I am new to .Net and am trying to upgrade a project of mine to it. The wizard was not able to upgrade it completely with out problems. One issue I have is a few api declarations with "As Any" in it. .Net says that it does not support "As Any" for declarations. What should I do to fix this?

    Also what is the .Net equivalent for "Forms" which is some sort of array that includes all forms in a project.

    One more thing. I have an image that I want to be the icon of a from. This code no longer works in .net
    VB Code:
    1. frmMenu.DefInstance.Icon = defaultICO.Image
    It says that an image cannot be converted into an icon
    Last edited by Frankie902; Jul 2nd, 2003 at 09:08 PM.
    Using:
    Visual Studio .Net Enterprise
    Visual Basic 6.0 Enterprise

  2. #2

    Thread Starter
    Addicted Member Frankie902's Avatar
    Join Date
    Feb 2001
    Location
    Lindenwold, NJ, USA
    Posts
    217
    Ok I resolved the other problems by actually reading the help file.
    heh.
    But I still do not know how to convert a system.drawing.image to system.drawing.icon.
    Using:
    Visual Studio .Net Enterprise
    Visual Basic 6.0 Enterprise

  3. #3
    Frenzied Member Memnoch1207's Avatar
    Join Date
    Feb 2002
    Location
    DUH, Guess...Hint: It's really hot!
    Posts
    1,861
    change this
    VB Code:
    1. frmMenu.DefInstance.Icon = defaultICO.Image

    to this
    VB Code:
    1. Dim bmp As Bitmap
    2. bmp = defaultICO.Image
    3. frmMenu.DefInstance.Icon = Icon.FromHandle(bmp.GetHicon)
    Being educated does not make you intelligent.

    Need a weekend getaway??? Come Visit

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width