使表单始终像 Win 7 小工具 (VB.net) 一样粘在桌面上 [英] Make form always stick to desktop like Win 7 gadget (VB.net)

查看:28
本文介绍了使表单始终像 Win 7 小工具 (VB.net) 一样粘在桌面上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好的,我知道有很多关于此的主题,但我没有找到任何适合我的内容.

Ok, I'm aware there's a lots of topis about this, but I haven't found anything that works for me.

我的程序生成了一个小图片,我想将它保存在始终位于底部的 WinForm 中,与桌面一起".类似于 Windows 7 中的小工具.

My program generates a small picture that i would like to keep in a WinForm that's always at the bottom, "with the desktop". Something like the gadgets in windows 7.

我如何告诉我的表单始终保留在此处,并且不能在任何其他表单/窗口上看到?

How do i tell my form to always stay here, and just can't be visible over any other form/window?

这不应该像在这个窗口的 form_load 函数中那样可行吗?

Should'nt this be doable like in the form_load function for this window?

像这样

Private Sub Sticky_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    Me.KeepMeAtTheBottomUntillIAmClosed
End Sub

推荐答案

如果您创建的表单没有边框和控件框,用户将无法调整其大小或移动它.然后添加您自己的按钮以允许它关闭,告诉它您想要的位置和 tada!

If you create a form that has no border and no controlbox, the user will not be able to resize or move it. Then add your own button to allow it to close, tell it where you want it to be and tada!

您甚至可以添加一些鼠标悬停功能,使工具在您悬停在表单上方时出现.

You can even add some mouse over functionality to make the tools appear when you are over the form.

这篇关于使表单始终像 Win 7 小工具 (VB.net) 一样粘在桌面上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆