在托盘上显示Balloon Tooltip(VB.NET)

VB6实现任务栏托盘弹出窗口的源代码示例 本文还有配套的精品资源,点击获取 简介:本文提供了一个使用Visual Basic 6(VB6)语言开发的示例,展示了如何在Windows系统的任务栏托盘区域实现一个可滑动弹出的窗口功能。该功能允许开发者在自己的应用程序中添加交互式托盘图标,当用户与之交互时,可以从托盘区弹出一个窗口,显示更多信息或操作选项。项目包括可执行文件、窗体设计、版本控制文件和工程核心文件,为VB6... 阅读详情

使用VB编写在托盘上显示Balloon提示的功能就需要调用Win32Api了,但是VB6和VB.NET代码上还是有些不同的,红色部分即为二者区别

Imports System.Runtime.InteropServices

Public Class Form1
    Inherits System.Windows.Forms.Form


#Region "Win32Api_NotifyIcon"
    Private Declare Function Shell_NotifyIcon Lib "shell32.dll" Alias _
         "Shell_NotifyIconA" (ByVal dwMessage As Int32, _
    ByRef lpData As NOTIFYICONDATA) As Int32

    <System.Runtime.InteropServices.StructLayout(Runtime.InteropServices.LayoutKind.Sequential)> Private Structure NOTIFYICONDATA
        Public cbSize As Int32
        Public hwnd As IntPtr
        Public uId As Int32
        Public uFlags As Int32
        Public uCallBackMessage As Int32
        Public hIcon As IntPtr
        <MarshalAs(UnmanagedType.ByValTStr, sizeconst:=128)> _
                Public szTip As String
        Public dwState As Int32
        Public dwStateMask As Int32
        <MarshalAs(UnmanagedType.ByValTStr, sizeconst:=256)> _
        Public szInfo As String
        Public uTimeoutOrVersion As Int32
        <MarshalAs(UnmanagedType.ByValTStr, sizeconst:=64)> _
        Public szInfoTitle As String
        Public dwInfoFlags As Int32
    End Structure

    Private Const NOTIFYICON_VERSION = 3
    Private Const NOTIFYICON_OLDVERSION = 0

    Private Const NIM_ADD = &H0
    Private Const NIM_MODIFY = &H1
    Private Const NIM_DELETE = &H2

    Private Const NIM_SETFOCUS = &H3
    Private Const NIM_SETVERSION = &H4

    Private Const NIF_MESSAGE = &H1
    Private Const NIF_ICON = &H2
    Private Const NIF_TIP = &H4

    Private Const NIF_STATE = &H8
    Private Const NIF_INFO = &H10

    Private Const NIS_HIDDEN = &H1
    Private Const NIS_SHAREDICON = &H2


    Private Const NIIF_NONE = &H0
    Private Const NIIF_WARNING = &H2
    Private Const NIIF_ERROR = &H3
    Private Const NIIF_INFO = &H1

    Private nfIconData As NOTIFYICONDATA

#End Region


    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        nfIconData = New NOTIFYICONDATA()
        With nfIconData
            .cbSize = System.Runtime.InteropServices.Marshal.SizeOf(nfIconData)
            .hwnd = Me.Handle
            .uId = vbNull
            .uFlags = NIF_INFO Or NIF_ICON Or NIF_TIP Or NIF_MESSAGE
            .hIcon = Me.Icon.Handle
            .szTip = "123" '& Microsoft.VisualBasic.vbNullChar
            .dwState = 0
            .dwStateMask = 0
            .szInfo = "Balloon Style Tool-tip" & Chr(13) & "哈哈" '& vbNullChar
            .uTimeoutOrVersion = 15000
            .szInfoTitle = "看到了么?" '& Microsoft.VisualBasic.vbNullChar
            .dwInfoFlags = NIIF_INFO
        End With


        Call Shell_NotifyIcon(NIM_ADD, nfIconData)

    End Sub

    Private Sub Form1_Closed(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Closed
        Call Shell_NotifyIcon(NIM_DELETE, nfIconData)
    End Sub
End Class

vb.net中tooltip控件应用 立即下载

相关推荐

vb.net 托盘图标闪动 代码

vb.net的托盘图标闪动,适用于程序获取的信息有变动时的通知。 仿QQ来消息时的闪动频率。 希望对初学者有所帮助。

vb.net 教程 3-4 窗体编程 公共控件11 ToolTip

版权声明:本文为博主原创文章,转载请在显著位置标明本文出处以及作者网名,未经作者允许不得用于商业目的。 ToolTip,工具栏提示,就是鼠标放在窗体或者某个控件上显示的信息,在之前的vb中直接是设置控件的属性里。 在vb.net里面,把它单独提出来做成了控件,配合其他控件使用。 添加ToolTip只需要双击工具箱的ToolTip控件即可将它添加到设计界面的底端。 添加之后,窗体和窗体上的控件,属性窗口中会多出一项 ToolTip1上的ToolTip: 在这里就可以设置提示信息。 当然也可以在编程的

chinaherolts2008的博客 606

VB多风格自定义的ToolTip气泡信息提示

VB多风格自定义的ToolTip气泡信息提示,VB多风格自定义的ToolTip气泡信息提示

vb.net按钮添加鼠标提示文字

方法1 步骤1 添加 ToolTip控件到窗体 步骤2 为需要提示控件添加鼠标事件。这里我选择放入  .MouseMove 事件 步骤3 添加代码 Private Sub SaveDebug_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles SaveD...

anlog的专栏 2956

批处理气泡程序BalloonTip

批处理气泡程序BalloonTip

Java balloon Tip Tool

Java balloon Tip Tool Java balloon Tip Tool

如何在 Windows XP 或 Vista 中禁用通知区域的气球状提示?

http://support.microsoft.com/kb/307729/zh-cn 注意:本文中的步骤将禁用此计算机的通知区域的所有气球状提示。您无法禁用特定程序的气球状提示。   要禁用通知区域中的气球状提示,请按照下列步骤操作: 单击“开始”,单击“运行”,键入 regedit,然后按 Enter。找到以下子项: HKEY_CURRENT_USER\Software

civilman的专栏 1506

Python实战:用BM3D算法给老照片去噪(附完整代码+数据集)

本文详细介绍了如何使用Python和BM3D算法为老照片进行高效去噪。通过完整的代码实现和数据集,读者可以快速掌握图像去噪技术,包括环境配置、算法原理、参数调优及效果评估,帮助恢复珍贵老照片的清晰度。

weixin_29057237的博客 241

在托盘上显示Balloon Tooltip(VB.NET) (转)

在托盘上显示Balloon Tooltip(VB.NET) (转)[@more@]使用VB编写在托盘上显示Balloon提示的功能就需要调用win32api了,但是vb6和vb.NET代码上还是有些不同的,红色部分即为二者区别 ...

csd3176的博客 126

从大疆智图到Cesium:3D Tiles模型加载与Web三维场景构建实战

本文详细介绍了如何利用大疆智图生成3D Tiles数据,并通过Cesium在Web端实现高效加载与三维场景构建。从大疆智图参数设置到Cesium环境配置,再到3D Tiles性能调优与高级功能实现,提供了一套完整的实战指南,帮助开发者快速掌握3D Tiles模型加载与Web三维场景构建技术。

weixin_30520015的博客 1300

深入解析MTK平台hang_detect机制:从原理到实战调试

本文深入解析了MTK平台hang_detect机制的工作原理与实战调试技巧。作为系统健康监测的核心机制,hang_detect通过多层级监控体系检测应用层和内核层异常,结合Kernel_exception等日志信息快速定位问题。文章详细介绍了典型问题案例、调试方法及预防措施,帮助开发者提升MTK平台系统稳定性调试能力。

purple的博客 1008

VB.NET为每一个控件创建气泡提示

在NET中如果是ToolStrip1工具栏,默认的气泡提示即是该按钮的text属性值。 如果是其他控件呢?不如说TextBox控件,以下代码可实现:              Dim toolTip1 As New ToolTip()         toolTi

wl58796351的专栏 2221

【OpenCV-Python】图像的载入、显示和输出(imread()、imshow()、waitKey()、namedWindow()、imwrite())

图像的载入:imread()函数 imread()函数可以用来非常便捷地读取文件中的图片到Opencv中。这个函数一般需要两个参数: (1)载入图片的路径名。如果图像文件在工程文件夹下,可以直接用文件名读取,如“cat.jpg”,否则需要输入完整的访问路径,如“D:\\test\\lena.png”。这里还有几个tips: imread函数中,一个点代表省略当前文件夹路径,两个点则代表回...

M&Q的博客 1400

UI的优化之ToolTip控件的使用

大家在使用电脑的时候可能都注意到一个现象:当鼠标指向图片或者汉字的时候,旁边会出现提示文本,如图:    这样的效果实现起来其实很简单,需要用到ToolTip控件。下面简单介绍一下ToolTip及其简单用法。    简介:

炸丸儿 3764

ARM的CI-700和Arteris的NoC对比

设计理念:CI-700注重于为移动和客户端SoC提供定制化的互连解决方案,而Arteris的NoC更侧重于提供灵活、可配置的网络互连技术,适用于多种应用场景。性能与功耗:CI-700通过系统级缓存和网状拓扑结构优化性能和功耗,而Arteris的NoC通过物理感知和多协议支持来提升性能和降低功耗。功能安全:Arteris的NoC提供了功能安全支持,这对于汽车和工业应用尤为重要,而CI-700虽然也关注安全性,但未明确提及功能安全支持。互操作性。

ygyglg的专栏 2638

多智能体系统在军事仿真中的应用:AI人工智能战略推演

本文旨在全面解析多智能体系统在军事仿真领域的应用技术,重点探讨AI驱动的战略推演系统的设计原理和实现方法。研究范围涵盖从基础理论到实际应用的完整技术栈。本文采用从理论到实践的递进结构,首先介绍核心概念,然后深入算法实现,最后展示实际应用案例和未来展望。多智能体系统(MAS):由多个相互作用的智能体组成的分布式系统军事仿真(Military Simulation):通过计算机模拟军事行动和战争场景战略推演(Strategic Wargaming):通过模拟推演评估军事战略的有效性更高保真度的仿真。

AI天才研究院 1783

在托盘上显示Balloon Tooltip (转)

在托盘上显示Balloon Tooltip (转)[@more@] 运行这个示例的前提是系统需要windows 2000 or xp (shell version 5 or better)。大家可能对托盘程序很熟悉了,这里我...

csd3176的博客 262

3.1 快速启动Flink集群

在本实战中,我们将快速启动Apache Flink 1.13.0集群,并在Hadoop集群环境中提交作业。首先,我们会在本地下载Flink安装包并上传至云主机,解压并配置环境变量。接着,我们将启动Flink集群,通过访问Web UI进行监控管理。然后,我们会配置集群,将Flink分发到从节点,并在集群上提交作业。最后,我们将通过命令行提交作业,并在Web UI上查看任务节点的输出结果。这个过程涵盖了Flink集群的部署、配置和作业提交,为大数据处理提供了一个完整的实战经验。

howard2005的专栏 733

用VB实现托盘图标+气泡提示的效果

第一步:首先新建一个模块,保存以下代码:Option Explicit使用高分辨率图标所用的APIPrivate Const LR_LOADFROMFILE = &H10Private Const LR_LOADMAP3DCOLORS = &H1000Private Const IMAGE_ICON = 1系统托盘Private Declare Function Shell_NotifyIco

guoquan2003的专栏 7187

句向量(句嵌入)模型sent2vec的训练及应用

本文讨论NLP中的句向量模型(sent2vec),也就是将一个完整的句子映射成一个实数向量的技术。这方面已经发表的成果也是比较多的,本文中所涉及的技术主要源自NAACL 2018的一篇论文,其中提出的sent2vec模型可以理解为词嵌入技术中经典的CBOW方法的扩展,该所谓的扩展中一个重要改进就是引入了n-gram

白马负金羁 1万+

NTscan扫描工具

ntscan是一个扫描器,可以扫描没有密码和弱密码的共享,先到配置文件中填写猜测的用户名和密码,扫描过程中右侧出现的是扫描日志。

终于找到BalloonTip一直弄不出的原因了

之前C#做ballontip效果时一直做不出来,不知其故。 最近发现原来是注册表里的东西莫名被删…… HKEY_CURRENT_USER/Software/Microsoft/Windows/CurrentVersion/Explorer/TrayNotify 下重新建立BallonTip的DWORD键值即可

zachary21的专栏 1524

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

html按钮tooltip无法显示,设置按钮的ToolTip显示(VB.NET)

''' ''' 设置ToolTip''' ''' 按钮控件''' 提示信息''' Public Sub SetToolTip(ByRef Con As Control,ByVal strToolTip As String)Dim Tool As System.Windows.Forms.ToolTipTry'//SetToolTipTool = New System.Windows.Forms.T...

weixin_33305182的博客 449

pscad IEEE标准系统搭建说明

pscad IEEE标准系统搭建说明,包含典型的IEEE 9节点、14节点、30节点、39节点和118节点系统。内含标准测试系统的原始数据和潮流结果。

精雕软件(JDpaint) 5.5 绿色版

精雕软件(JDpaint) 5.5 绿色版精雕软件(JDpaint) 5.5 绿色版精雕软件(JDpaint) 5.5 绿色版

上一篇: 在.NET的Windows桌面应用中使用Amazon的Web Services
下一篇: 使用VB进行子类化
40Star
博客等级 码龄25年 1粉丝 32原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值