---
title: "Delphi 无边框WebBrowser右键属性程序挂起问题解决"
author: "kong6001"
date: "2011-01-25T14:56:37Z"
tags: ["Delphi"]
categories: ["编程语言"]
slug: "delphi-webbrowser"
draft: false
lastmod: "2011-01-25T14:56:37Z"
id: 895065
url: "https://fanchi.iteye.com/blog/895065"
---

Form启动时候，从新设置窗体的Style：  
 

procedure TForm1.onFormCreate(Sender: TObject);  
var nbStyleFix:Integer;

 

 

 {修复无边框窗体WebBrowser右键/属性程序挂起}  
begin  
  nbStyleFix := GetwindowLong(Form1.Handle, GWL\_STYLE);  
  nbStyleFix := nbStyleFix - WS\_POPUP;  
  SetWindowLong(Form1.Handle, GWL\_STYLE, nbStyleFix);  
end[](http://www.52delphi.com)