本人学了8个小时的delphi很多东西不懂,应该是这段代码了。高手们注意了。得详细的说说,因为你少打一个分号我都不会补。
procedure TFrmMain.ActiveWebChange;
Var
WebForm: TFrmWeb;
begin
WebForm := CurrentWebForm;
If WebForm = Nil Then Exit; //改变地址栏
cobAddress.Url := WebForm.WebUrl; PageControl.TabIndex := PageControl.Tabs.IndexOfObject(WebForm);
// WebForm.ToolButton.Down := True;// IeTravelLog.Webbrowser := WebForm.WebBrowser;
// IeTravelLog.Connect; FavoritesMenu.EmbeddedWB := WebForm.WebBrowser; //刷新进度条
RefreshProgress(WebForm.Progress); WebForm.WebBrowser.SetFocusToDoc;
end;
procedure TFrmMain.ActiveWebChange;
Var
WebForm: TFrmWeb;
begin
WebForm := CurrentWebForm;
If WebForm = Nil Then Exit; //改变地址栏
cobAddress.Url := WebForm.WebUrl; PageControl.TabIndex := PageControl.Tabs.IndexOfObject(WebForm);
// WebForm.ToolButton.Down := True;// IeTravelLog.Webbrowser := WebForm.WebBrowser;
// IeTravelLog.Connect; FavoritesMenu.EmbeddedWB := WebForm.WebBrowser; //刷新进度条
RefreshProgress(WebForm.Progress); WebForm.WebBrowser.SetFocusToDoc;
end;
解决方案 »
- 关于OCX控件加载时的错误提示(小问题)
- 帮忙看一看吧,数据库如何设置好?用什么报表,怎么做?
- 請問:如何在任何窗口响应热键???
- DBGrid为什么不支持3D鼠标的滚动翻页???
- 在线等:如何获取WebBrowser里的图片内容?
- 关于控件开发的问题(高分求教)
- 如何改变dbgrid显示的列名?
- 我想在一个10行5列的StringGrid中第5行与第6行之间画一条3像素宽的红线,以区别上下部分。
- actionlist做权限控制,oracle的布尔型疑问
- 在局域网中如何编程实现共享一个文件夹?请教各位。
- delphi程序如何在另一个进程里截取消息?
- IdHTTP1.Get 如何下载有空格的文件名的文件?
beign
Result:=false;
For i:=1 to Length(Url) do
if Ord(Url[i])>127 then
begin
Result:=true;
exit;
end;
end;
然后,在需要跳转的地方写上:if Zh(WebForm.WebUrl) then
//跳转语句,百度搜索地址为:('http://www.baidu.com/s?wd=' + WebUrl) <--这里的WebUrl既然包含了汉字,就应该是关键字啦
else begin
//去网页
end;
//至于怎么跳转。。别问我。。我不知道。。谁知道你用的什么组件