How do you load an image from resource file in vb 2010 expresss?

前端 未结 2 372
鱼传尺愫
鱼传尺愫 2021-01-07 01:45

First of all Im new to vb 2010 and so far have enjoyed what I have been able to do with it. That being said I have run into an issue with my current project.

Basica

2条回答
  •  囚心锁ツ
    2021-01-07 02:51

    i think you are looking for this:

    Dim currentMin as string = "_" & minutes.text ' it would look something like this: _1
    picturebox1.Image = CType(My.Resources.ResourceManager.GetObject(currentMin), Image)
    
    Dim currentSec as string = "_" & seconds.text
    picturebox2.Image = CType(My.Resources.ResourceManager.GetObject(currentSec), Image)
    

提交回复
热议问题