用VB制作IE工具条自定义按钮

利用VB自制OCX控件    如今OCX控件在编程中已占领了很重要的地位,我们可以利用OCX控件完成一些相当复杂的编程操作.同时OCX 控件还有利于主程序的简单化、功能的重用、隐常程序实现细节、便于升级、传播方便等优点。现在我们可以利用VB 5.0方便的制作出自己的OCX控件供我们在编程中使用同时还可以把它送给你周围喜欢编程的朋友! 下面列出制作OCX控件的步骤:一:新建OCX   打开VB 5.0选择新建工程在对话框中 阅读详情

现在,有许多软件安装后会在 IE 浏览器的工具条上添加一个自定义按钮,为用户运行程序提供了方便,如“网络蚂蚁”、“金山词霸”等等。实际上添加这个自定义按钮并不难,只要找到了它在注册表中的位置和有关参数,通过手工或程序都可以轻易完成。 而最方便的办法就是调用现成的 ActiveX 控件来完成这个功能,但 Windows 似乎没有提供这种控件。下面介绍如何开发和使用这种自定义控件。

实现方法
  要添加这种自定义按钮,需要在 Windows 注册表的HKEY_LOCAL_MACHINE/Software/Microsoft/Internet Explorer/Extensions 子键下建立一个 GUID 项,然后在注册表的右栏建立相应的参数并赋值。这些参数及其含义如下:
  ButtonText:自定义按钮上显示的文本字符串;
  Clsid:IE 工具条的类标识码,为“{1FBA04EE-3024-11D2-8F1F0000F87ABD16}”;
  Default Visible:自定义按钮是否可见,一般为 “Yes";
  Exec:自定义按钮执行的目标,为可执行文件或超文本链接等;
  HotIcon:鼠标移上按钮时显示的图标,一般取自 EXE 文件或 DLL 文件;
  Icon:按钮正常显示的图标,一般取自 EXE 文件或 DLL 文件;
  MenuText:在 IE 的“工具”菜单中显示的菜单项;
  MenuStatusBar:IE的“工具”菜单项的注释,在状态条上显示。

制作过程
  在 VB 5.0/6.0 下建立新的“ActiveX 控件”工程。
  首先,给控件 AddButton 的 Picture 属性添加一个微型 Icon 图片,这样当使用该控件时,会在控件工具箱上显示这个小图标。然后,再在设计窗口上放置一个 image 控件,给它也设置一个小图片,使用该控件时,会在其 Form 上显示该控件的外观。最后,调出代码编辑窗口,在该窗口中键入以下代码,其中 API 函数调用的代码可以直接从“API 文本浏览器”中获得。

 

'注意:Guid的值是特定的,才可以获取
Option Explicit
……'Default Property Values
……'Property Variables
'定义常量
Const HKEY_LOCAL_MACHINE = &H80000002
Const REG_SZ = 1

'声明存取注册表的 API 函数
Private Declare Function RegCloseKey Lib “advapi32.dll" (ByVal hKey As Long) As Long

Private Declare Function RegCreateKey Lib “advapi32.dll" Alias “RegCreateKeyA" (ByVal hKey As Long, ByVal lpSubKey As String, phkResult As Long) As Long

Private Declare Function RegDeleteValue Lib “advapi32.dll" Alias “RegDeleteValueA" (ByVal hKey As Long, ByVal lpValueName As String) As Long

Private Declare Function RegOpenKey Lib “advapi32.dll" Alias “RegOpenKeyA" (ByVal hKey As Long, ByVal lpSubKey As String, phkResult As Long) As Long

Private Declare Function RegSetValueEx Lib “advapi32.dll" Alias “RegSetValueExA" (ByVal hKey As Long, ByVal lpValueName As String,ByVal Reserved As Long, ByVal dwType As Long, lpData As Any, ByVal cbData As Long) As Long


'定义注册表中的主键、子键
Const hKey = HKEY_LOCAL_MACHINE
Const subKey0=“Software/Microsoft/Internet Explorer/Extensions/"

 

VB在窗体标题栏中添加自定义按钮.rar VB在窗体标题栏中添加自定义按钮,类似最大化,最小化按钮一样,美化一下,看不出是用户添加的按钮,当然,本例是只是简单的进行了美化。 立即下载

相关推荐

多样式的VB自定义按钮控件(仿PB风格)

多样式的VB自定义按钮控件(仿PB风格)

VB专用的漂亮toolbar工具条控件(ctl)

VB专用的漂亮toolbar工具条控件(ctl) 去发现同类优质开源项目:https://gitcode.com/ 欢迎使用这款VB专用漂亮toolbar工具条控件(ctl)。本控件旨在为VB源码界面编程提供一款功能丰富且外观美观的toolbar工具条。 内容索引 VB源码界面编程toolbar工具条控件 VB版ctl控件 仿IE8风格、OFFICE风格 动作参数显示视图框 漂亮的工具条样式 丰...

gitblog_06791的博客 511

Matlab实战:3种雷达间歇采样干扰的仿真与识别(附完整代码)

本文通过Matlab实战,详细仿真了雷达有源间歇采样干扰的三种核心样式:直接转发、重复转发和循环转发干扰。文章提供了完整的代码实现,并深入探讨了基于时频分析和循环平稳分析的特征提取与识别方法,为雷达抗干扰技术的学习与实践提供了清晰的工程实现路径。

weixin_29053695的博客 369

VB做IE插件1 BHO

用VB做IE插件(BHO) BHO(浏览器辅助对象)用于IE的加载项中,可以对IE的事件进行拦截编程(可以是IE上的工具条,或者按钮或者不可见插件).BHO的定义位于注册表"HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows/CurrentVersion/Explorer/Browser Helper Objects/" 下,当IE启动时就加载了该项

王永胜的专栏 5666

DDS信号发生器设计避坑指南:从AD9834配置到巴特沃斯滤波实战

本文详细解析了基于AD9834芯片的DDS信号发生器设计中的关键技术要点与常见陷阱,涵盖时钟源选择、寄存器配置时序、巴特沃斯滤波器设计等核心内容。针对中高频段信号质量优化,提供了实用的解决方案和代码示例,帮助工程师规避设计误区,提升信号发生器的性能和稳定性。

2y3u4i5o6p的博客 794

RK3568适配MIPI屏幕触摸,触摸延时很大

我用的是系统,接了一个,设备树已经正确配置,evtest测试坐标值和触摸位置都是准确的。但是出现了一个:我在屏幕上点一下,要等大约 2 秒才能在evtest里看到坐标事件打印。这种现象在 Goodix 系列触摸驱动里比较少见,一般意味着。

小灰灰的博客 1372

VB专用的漂亮toolbar工具条控件ctl:提升VB界面设计的利器

VB专用的漂亮toolbar工具条控件ctl:提升VB界面设计的利器 去发现同类优质开源项目:https://gitcode.com/ 项目介绍 在当今软件开发领域,用户界面(UI)的设计至关重要。一个美观且功能丰富的工具条可以极大提升软件的用户体验。今天,我们将向您推荐一款专为VB设计的漂亮toolbar工具条控件——ctl。它不仅为VB源码界面编程带来了新的可能性,还能让您轻松打造出专业且美观...

gitblog_06769的博客 300

工程级 RK3588 YOLOv5 Android 架构拆解:NPU 量化优化 + 多线程推理 + 跟踪算法源码

本文将带你完成一个完整的AI视觉项目:在搭载RK3588芯片的Android开发板上运行实时目标检测与跟踪应用。实战目标:成功运行官方YOLOV5摄像头实时检测案例技术深度:深入理解RKNN开发框架和源码实现核心技能:掌握NPU推理、多线程并发、目标跟踪等关键技术。

LXY_LOVE36的博客 139

妙用VBScript自制IE工具栏按钮

转自:http://www.gzu521.com/campus/article/design/200607/18051.htm IE工具栏上的各种按钮可不是Microsoft的专利,普通用户一样能够对其进行自定义,添加想设置的按钮,至于添加的方法,很多资料上都介绍过。具体的实现方式不外乎两种,一是使用冗长且复杂的VC或VB代码程序,这对普通用户来说要求是过高了一点,通常搞得人满头雾水而...

aiyun1234的博客 175

VxWorks系列 快速导航

Vxworks系列快速阅览导航

Mr.Sugarcane 1329

社交媒体文章内容与评论抓取:Python 爬虫实战教程

通过本文的介绍,我们学习了如何使用 Python 编写爬虫,抓取社交媒体平台的文章内容和评论。我们详细介绍了如何使用requestsSelenium和Tweepy等工具,抓取微博和 Twitter 上的公开数据。同时,我们还讨论了如何处理反爬虫机制,避免账号或 IP 被封禁。抓取社交媒体数据是一个充满挑战和乐趣的过程,掌握这些技术后,你可以在大数据分析、情感分析和舆情监测等方面得到更深层次的应用。

2201_76125261的博客 1713

如何在IE右键菜单中添加菜单项以及如何添加IE任务栏按钮

一、如何在IE右键菜单中添加菜单项    如果使用过Netants的朋友可能都知道,NetAnts在IE中添加了右键菜单功能,只要在页面的一个链接或者图片上点击右键后在菜单中选择 Down By Netants 就可以调用Netants下载该链接指向的文件。在本文中作者将介绍如何通过VB来实现这样的功能。    要实现在IE右键菜单中添加菜单项的功能,要依次实现以下步骤:    1、在注册表HKE

刘皓天的收藏夹 1704

【Python计量】linearmodels面板数据回归(一)

我们以伍德里奇《计量经济学导论现代方法》的”第14章高级面板数据方法“的案例14.1为例,使用jtrain中的数据来进行固定效应估计。

mfsdmlove的博客 9279

用VB写的IE工具栏源码

 1.API 函数      SetParent   设一个对象的父对象?参数是控件(对象)的句柄。。这招够绝!!         SetParent  .hwnd, m_lToolWnd         这样就可以把VB窗体上的控件放到IE工具栏上去 !! API的作用真大!!!! 2.BHO 调用      主要实现下面这么多接口,郁闷O..红色是真正BHO的接口啦!!

唸 尐 憂 的 天 空 2200

uniApp微信小程序:error: 60001 request:fail errcode:-101 cronet error code:-101error_msg:net::ERR CONNECTI

uni-app微信小程序域名访问报error 60001 request:fail errcode:-101,解决Uniapp微信小程序报600001错误,uni.request()接口请求报错,服务器更换SSL证书后,uniapp微信小程序出现`request:fail errcode:-101`问题分析与解决,服务器更换ssl证书后,手机访问微信小程序异常,微信小程序更换SSL证书后出现请求报错,服务器更换SSL证书,微信小程序报600001,小程序反应偶尔出现request:fail errcode:

✅ 精选推荐文章 4603

LinePhone3.2.7(android端最新版本) sip客户端

SIP客户端For android:LinePhone3.2.7(最新版本),官网地址:http://www.linphone.org/

使IE中的后退、前进按钮失效

用VB.NET做的方案,如保使得IE中在工具栏中的前进和后退功能失效?  ---------------------------------------------------------------   那你得使用脚本了  ---------------------------------------------------------------   可以考虑打开一个没有工具条的窗口。   也

xiaowu703的专栏 6590

深度学习工具包 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")

自制IE浏览器

个人认为对于新手 用VB 做 myie 比较简单易上手些...下面我就说下具体的做法:一  加载VB 二 添加 microsoft internet controls 部件  和   mircrosoft common dialog control 6.0 部件    再添一  microsoft windows common controls 6.0 部件....三  在窗体内添

PZHan的专栏 8476

WINCC7.3破解文件

WINCC7.3硬件够破解文件,有需要的下载!WINCC7.3硬件够破解文件,有需要的下载!

利用VB实现对IE的调用与控制

利用VB实现对IE的调用与控制随着网络应用的不断扩展,采用HTML语言编写的文档越来越多,如何在VB程序中实现对HTML文档的浏览是一个需要解决的问题。本文以一个实例说明了在VB中调用和控制Internet Explorer的方法。   一、 编程准备   VB通过OLE自动化技术创建和控制Internet Explorer对象的实例,因此,在新建一个工程后需要加入Microsoft

shawls的专栏 1496

VB填充IE上的输入框并提交

VB填充IE上的输入框并提交 假设登录页面的HTML代码如下: testPage            用户:                                 密码:                         很简单的页面,在上面有一个登录的Form,一个用户名输入框LoginName,一个密码输入框LoginPassword和一个提交按钮clickme 然后用I

3505

vb FindwindowEx的用法实例

'添加 Command1 Const WS_CHILD = &amp;H40000000Const WM_LBUTTONDOWN = &amp;H201Const WM_LBUTTONUP = &amp;H202Const SW_HIDE = 0Const SW_NORMAL = 1Private Type RECT    Left As Long    Top As Long   ...

miaozk2006的专栏 4057

VB制作CAB包过程 [转]

首先,在CSDN上有一个很好的资源,可以下载下来仔细研读:http://download.csdn.net/download/zhimei61580/2192320,这个资源讲解的很好很生动! 第一部分: 使用VB自带的打包工具。自动生成inf文件,并和工程所依赖的dll文件一起打包成cab文件。步骤如下 1. File->Make active.dll, 这一步生成我们

执着于我的执着 2409

在IE右键添加菜单项和任务栏按钮

一、如何在IE右键菜单中添加菜单项 如果使用过Netants的朋友可能都知道,NetAnts在IE中添加了右键菜单功能,只要在页面的一个链接或者图片上点击右键后在菜单中选择 Down By Netants 就可以调用Netants下载该链接指向的文件。在本文中作者将介绍如何通过VB来实现这样的功能。 要实现在IE右键菜单中添加菜单项的功能,要依次实现以下步骤:

frjcy的专栏 2198
上一篇: VB制作图片浏览器
下一篇: VB中如何读取txt文件的数据
hexxiaoyou
博客等级 码龄20年 56粉丝 26原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值