怎样在pb里实现无标题栏

api解决:
SetWindowLong(Handle,                  // 当前窗体句柄
                GWL_STYLE,                // 表示当前是要设置新的窗体(普通)样式
                // 得到指定窗体信息
                GetWindowLong(Handle, GWL_STYLE)
                  and (not WS_CAPTION));  // 去掉样式(s)中的“标题”样式

具体
FUNCTION long SetWindowLong(ulong hWnd, integer nIndex, ulong dwNewLong) library "user32.dll" ALIAS FOR "SetWindowLongA"
Function long GetWindowLong (Long hwnd,Long nIndex) library "user32" Alias for "GetWindowLongA"
//


//GWL_STYLE=-16
//WS_CAPTION=12582912
SetWindowLong(handle(this),-16,GetWindowLong(handle(this),-16)+12582912 )


上面是声明 下面的代码放在open事件中

 

=======================================================================

 

2.   如何使PB窗口总在最上层  

通过SetWindowPos函数吧窗口的显示层次修改为HWND_TOPMOST,就可以使指定窗口永远不会被其它窗口覆盖,该函数声明为:  

Function   Long   SetWindowPos(Long   hwnd,   Long   ord,   Long   x,   Long   y,   Long  

dx,   Long   dy,   Long   uflag)   Library   “user32.dll”  

参数1为要顶层显示的窗口句柄,参数2指定显示的层次,参数7为附加选项,其余  

参数指定窗口位置和大小,均可忽略。在窗口的Open或Activate事件中加入如下  

函数调用:  

SetWindowPos(Handle(This),-1,0,0,0,0,3)  

参数2取-1表示在最顶层显示窗口,取1表示在最底层显示;最后一个参数若取1,  

表示窗口大小保持不变,取2表示保持位置不变,因此,取3(=1+2)表示大小和  

位置均保持不变,取0表示将窗口的大小和位置改变为指定值。  


3.   显示或隐藏Windows的任务栏  

要显示或隐藏任务栏,首先要得到它的窗口句柄。任务栏是一个特殊的窗口,它  

的窗口类为:Shell_TrayWnd,没有标题,故只能用FindWindowEx函数来取得它的  

句柄:  

Function   Long   FindWindowEx(Long   ph,   Long   ch,   ref   String   cn,   ref  

String   wn)   Library   “user32.dll”  

Function   Long   ShowWindow(Long   hWnd,   Long   nCmdShow)   Library   “user32.dll”  

用ShowWindow来显示或隐藏窗口,其第二个参数为0表示隐藏,为5表示显示:  

handle   =   FindWindowEx(0,0,”   Shell_TrayWnd”,wn)   //wn为空串  

ShowWindow(handle,0)   //隐藏任务栏  

怎样在pb里实现无标题栏 如何使PB窗口总在最上层 显示或隐藏Windows的任务栏 1. pb里实现无标题栏 api解决: SetWindowLong(Handle,                  // 当前窗体句柄                 GWL_STYLE,                // 表示当前是要设置新的窗体(普通)样式                 // 得到指定窗体信息                 GetWindowLong(Hand 阅读详情

相关推荐

pb:显示或隐藏windows的任务栏

隐藏任务栏的方法,在OnCreate事件里利用Window API函数SetWindowLong:SetWindowLong(Application.Handle,GWL_EXstyle,WS_EX_TOOLWINDOW);handle = FindWindowEx(0,0,″Shell-TrayWnd″, wn)//wn为空串。然后调用:SetWindowLong(Handle(this),-20,128);ShowWindow(handle,0)//隐藏任务栏。

悠闲饭团的博客 252

PB中设置各种窗口风格的API

PB中设置窗口风格的API 直接主题: 下面的方法可以设置各种窗口的属性,包括大小,最大化,最小化, response风格的窗口一样可以设置 注:窗口的controlmenu=false //必须的,否则不生效 API声明: Function long SetWindowLongA(ulong hWnd, int nIndex, long dwNewLong) li

xiajinxian的专栏 3279

PB去掉mdi里工具栏的边框

PB去掉mdi里工具栏的边框,版本pb11.5 采用api函数

GetWindowLong函数(最好的解释资料,绝对值得一看,此函数在子类化技巧时候经常用到)

今天在看一个代码里头写了GetWindowLong (hwnd, 0),我当时就有点费解,靠,上网搜索函数原型说明,死活找不到第2个参数为0是指什么,MD,很恼火,最近终于在一个国外网站找到,我在这篇文章贴了,网站是http://www.codeguru.com/forum/archive/index.php/t-243778.html先收集所有关于此函数的使用方法以及程序代码

WINC开发的专栏 5万+

英飞凌TC3xx的GTM模块到底有多强?从PWM生成到电机驱动,一篇讲透车载定时器核心

本文深入解析英飞凌TC3xx系列中的GTM模块在汽车电子领域的强大功能,从PWM生成到电机驱动的全链路设计。通过模块化架构和硬件级解决方案,GTM显著提升系统精度和响应速度,适用于电机控制、电源管理等复杂场景。文章结合实战经验,详细拆解GTM的技术实现和性能优势。

weixin_27741699的博客 214

5G NR LDPC码(2)—— 从基图到速率匹配:解码5G高速数据信道的标准化设计

本文深入解析了5G NR LDPC码的标准化设计流程。从作为核心骨架的基图(BG1/BG2)出发,详细阐述了其如何通过扩展因子Z灵活生成实际校验矩阵,并协同传输块大小计算与分段策略。文章重点剖析了基于循环缓存和冗余版本的速率匹配机制,以及其如何高效支撑增量冗余混合自动重传请求,从而确保5G高速数据信道在复杂环境下的可靠与高效传输。

weixin_29206669的博客 277

pb powerbuiler 无标题栏窗口的移动

在使用 response! 或 popup! 窗口 的时候,经常会希望关闭标题栏(例图1),但关闭了标题栏,这个窗口就无法移动了。  (图1) 让无标题栏窗口的移动的设置方法: 1、在窗口中新建一个自定义事件(例图2,事件名 ue_cnhit),event id 选择pbm_cnhittest 2、添加脚本: return 2  3、鼠标点击窗口没有控件的位置,长按左键,就可以移动窗...

xiaox的专栏 1659

大模型训练流程(四):PPO强化学习实战与调优指南

本文详细解析了大模型训练中PPO强化学习的实战应用与调优技巧,涵盖RLHF核心原理、PPO算法实现及显存优化策略。通过具体案例和代码示例,指导开发者有效提升模型回答质量与安全性,避免常见训练陷阱。

weixin_29051811的博客 440

移动无标题栏窗口

移动无标题栏窗口 一般情况下,移动一个窗体需要将鼠标放置在标题栏上才能拖动窗体,为 什么非要使用标题栏呢?其实我们可以使用一个巧妙的方法来实现将鼠标放置 在窗体上按下就可拖动窗体,下面先看实现代码。在Form1的“Private”部分声明过程: 在private部分加入下列代码:procedure wmnchittest(var msg:twmnchittest);message wm_nch

hello simon 699

SqlSugar避坑指南:C#操作MySQL时你可能会忽略的5个细节

本文分享了使用C#和SqlSugar框架操作MySQL数据库时的实战避坑指南。针对连接配置、实体映射、查询性能、事务处理等关键环节,深入剖析了5个容易被忽略但至关重要的细节,帮助开发者提升项目稳定性和执行效率,避免常见陷阱。

delta的博客 282

python等级考试——一级知识点汇总(不包含turtle画图)

本篇文章是针对中国电子学会青少年编程等级考试的,适合初学者以及青少年编程学习者

weixin_65350557的博客 9048

如何在 PB 中实现无标题可拖动的窗口

如何在 PB 中实现无标题可拖动的窗口当鼠标拖动时Windows 首先会向鼠标下的窗口发送一个 wm_nchittest 消息,窗口收到这个消息后再由窗口的消息处理函数进行处理,消息处理函数将 会返回一个整数表示鼠标正处于窗口的什么部位。大家只需要知道的是处理函数 返回2,表示鼠标正处于窗口的标题栏上。根据这一点,我们只要截获这条消息, 然后直接返回2。这样不管鼠标真正位于窗口的什 么部位,WINDOWS 一律认为鼠标位于标题栏上。因此,用户自然可以拖动窗口。 下面是具体的步骤:1 为窗口定义用户自定义事件

548

【OpenCV】手眼标定实战:从原理到calibrateHandEye的完整实现

本文详细解析了机器人视觉中的手眼标定原理与实战,重点介绍了如何使用OpenCV的calibrateHandEye函数实现从数据采集到结果验证的完整流程。文章深入剖析了AX=XB核心方程,区分了眼在手上与眼在手外两种配置,并提供了详细的代码示例与避坑指南,帮助开发者精准建立相机与机械臂末端的坐标转换关系,是机器人精准抓取的关键技术。

weixin_29046611的博客 517

PB窗口使用技巧之增强窗口显示效果

一、窗口最小化时设置动态图标 二、放置闪烁文字 三、提高窗口的打开速度 四、移动不带标题栏的窗口 五、闪烁窗口标题栏 六、给窗口添加自动滚动条功能 窗口是应用程序中一个非常重要的界面,界面设计的大部分工作体现在窗口界面的设计中。所以,在不影响功能的前提下,提倡给用户提供更有提示性的、更美观的界面。常用的手段是动画、声音等,下面介绍这些常用的方法。 一、窗口最小化时设置动态图标 当应用程序最小化时,程序的图标如果是动画的,肯定更能吸引用户的注意,视觉效果会更好。方法是通过动态修改程序的图标来实现。 当程序最小

tlammon的专栏 1700

第四章:无感FOC的平滑启动艺术:告别“咔哒”声与抖动

无感FOC启动技术面临"先有位置还是先有旋转"的核心矛盾,导致常见故障包括位置失准、负载突变等。基础方案采用开环I/F控制,但存在重载启动困难等局限性。进阶方案结合IPD位置检测技术,通过脉冲电压注入法精准定位转子初始位置。关键技术在于开环到闭环的平滑切换,采用混合观测器设计和相位对齐技术。量产优化包括自适应参数整定和故障恢复机制,确保启动可靠性和一致性。该系统工程方案可有效解决启动抖动、异响等问题,提升用户体验。

汽车软件开发 764

华为OD机试 C++【TLV解析】

这里的valueOffset指的是value在整串消息里的起始位置(从0开始数)。这表示tag是15(十六进制的0F),length是4,接着的8个字符是value的内容。你收到了一串由两端设备传递的TLV格式的消息,现在你需要根据这串消息生成一个对应的(tag, length, valueOffset)列表。tag是15,对应的数据长度为4,value从第3个字节开始,所以偏移量为2。第二行:一个数字n,表示我们给出的tag的数量(0 < n < 1000)。第一行:一串消息,长度不超过10000。

wtswts1232的博客 482

无标题窗口的拖动和改变大小

在 OnMouseDown事件处理中 利用 WinAPI 向窗体发送 WM_NCLBUTTONDOWN 消息,模拟在窗体的标题栏点击鼠标左键操作。典型的调用的代码可能是这样: privateconstintWM_NCLBUTTONDOWN=0xA1;privateconstintHTCAPTION=2;[DllImport("user32.dll")]private...

weixin_30639719的博客 195

Outlook Express 6 (OE6) for Win7/Win8/Win10

英文版 Outlook Express6.0, 兼容Win7/Win10/WinXP,解压就可用。

PB 各种小技巧(七)

21.SendMessage API函数在PowerBuilder中应用 一、引言 在Powerbulider巧妙地调用API函数SendMessage,可以完成Pb中的一些用常规的方法而很难实 现的功能,特将对该api函数在Powerbuilder中的使用,例举几个方面的运用,以期起到抛砖引玉的效果(以下代码完全可以使用PowerBuilder中的Send函数替代SendMessag

gmb_1984的专栏 539

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

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

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

【无标题】

STM32开发板用HAL库实现中断控制LED灯

JJJean1的博客 260

迈瑞BS系列全自动生化分析仪LIS协议接口手册(内含HL7和ASTM)

迈瑞BS系列全自动生化分析仪LIS协议接口手册,内含HL7和ASTM)

PB send函数

PB send函数 2007年12月04日 星期二 上午 09:49 来自:http://www.haocang.com/kb/pages/viewpage.action?pageId=1758 转枫叶飘零的BLOG SendMessage API函数在PowerBuilder中应用 一、引言 在Powerbulider巧妙地调用API函数Sen

tlammon的专栏 3203

PB去掉窗口标题栏

setWindowPos函数把窗口的显示层次修改为HWND—TOPMOST,就可使指定窗口永远不会被其它窗口覆盖,该函数声明为:  Function Long SetWindowPos(Long hwnd,Long ord,Long x,Long y,Long dx,Long dy,Long uflag) Library ″user32″  参数1为要顶层显示的窗口句柄,参数2指定显示的层次,参数7为附加选项,其余参数指定窗口位置和大小,均可忽略。在窗口的Open或Activate事件中加入如下函数调用..

tlammon的专栏 854
上一篇: sql2000行转列
下一篇: DSOFramer.ocx 控件使用
SSSU
博客等级 码龄21年 34粉丝 82原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值