3

Can anyone help me out how could I load an Image from my computer and write on the picture using VB.net [ 2008 ]. Then text will show only when the mouse is hovered on the location where text is written. I want to write down the location of the picture for say. Please help me with code block, because here you are talking with a noob. thank you

4

1 に答える 1

6

以下を使用して、PC からイメージをロードできます。

Dim img as Image = Image.FromFile(your_file_name)

次に、次を使用して画像にテキストを描画できます。

Dim gr As Graphics = Graphics.FromImage(img)
gr.DrawString("Drawing text", _
              New Font("Tahoma", 14), _
              New SolidBrush(Color.Green), _
              10,10)
gr.Dispose()
于 2011-11-05T18:09:35.947 に答える