Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
谁能帮助我如何从我的计算机加载图像并使用 VB.net [2008] 在图片上写字。然后只有当鼠标悬停在写入文本的位置时才会显示文本。我想写下图片的位置以备不时之需。请帮助我处理代码块,因为在这里您正在与菜鸟交谈。谢谢你
您可以使用以下方法从您的 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()