大家好,关于广告自助交易平台源码很多朋友都还不太明白,今天小编就来为大家分享关于易语言如何在源码内添加弹窗广告代码的知识,希望对各位有所帮助!
本文目录
一、易语言如何在源码内添加弹窗广告代码
1、可以利用自带命令“执行”或ShellExecute函数,建议用ShellExecute函数~.版本 2
2、.DLL命令 ShellExecute,整数型,,"ShellExecuteA",,执行命令
3、.参数 hwnd,整数型,,指定一个窗口的句柄,有些时候,Windows程序有必要在创建自己的主窗口前显示一个消息框。
4、.参数 lpOperation,文本型,,指定字串“Open”来打开lpFlie文档;或指定“Print”来打印它。也可设为vbNullString,表示默认为“Open”
5、.参数 lpFile,文本型,,想用关联的程序打印或打开的一个程序名或文件名
6、.参数 lpParameters,文本型,,如lpFile是一个可执行文件,则这个字串包含了传递给执行程序的参数。如lpFile引用的是一个文档文件,或者不需要使用参数,则设为vbNullString
7、.参数 lpDirectory,文本型,,想使用的默认路径完整路径
8、.参数 nShowCmd,整数型,,定义了如何显示启动程序的常数值。参考ShowWindow函数的nCmdShow参数
9、打开某个网页(不带参数的网页地址)
10、ShellExecute(0,"open","explorer.exe","www.myzhenai.com","",1)
11、打开某个网页(带参数的网页地址)
12、ShellExecute(0,"open",“ ”+ File+“&rlz=1I7PPST_zh-CN”,"","",1)
13、假设要打开C盘底下的myzhenai.txt
14、ShellExecute(0,"open","explorer.exe","C:\myzhenai.txt","",1)
二、怎么去除Android源码中的广告代码
这种方法,大致思路就是,反编译(编译可以理解为将源代码转化为可运行的程序,反编译就是将程序转化为源代码)APK文件,然后修改XML文件(一般情况下是在反编译出来的res文件夹中的main.xml,通常在layout文件夹,有时候也会放在其他文件夹)将广告信息去掉,最后重新编译为新的APK文件。
下面让说说具体的操作过程,首先需要在电脑上安装Java环境(可以在www.java.com下载并安装),然后在下载apktool。解压aptool.jar到c:windows,解压apktool-install-windows.zip到任意文件夹(例如D盘根目录)。
运行命令行提示符,用cd命令转到apktool-install-windows所在文件夹(如cd d:/ apktool)。如被嵌入广告的安装文件名为abcd.APK,执行如下命令将abcd.apk反编译到文件夹abcd:
现在打开abcd文件夹,在其中的res文件夹找到main.xml,接下来用记事本来打开,按下“Ctrl+F”找到fill_parent和wrap_content,并将它们都替换为0.0dip,保存退出,再输入以下命令重新编译:
接下来就可以在ABCDdistout.apk路径下找到重新生成的APK文件了,最后用APKsign等工具为APK文件签名即可使用。
三、ASP中的对联广告源码的问题
<!DOCTYPE HTML PUBLIC"-//W3C//DTD HTML 4.01 Transitional//EN">
<title>对联广告- Citk.Net</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<body style="margin:0px;">
<table border="1" width="776" height="3000" cellspacing="0" cellpadding="0">
<td width="100%" valign="top"><div align="center" style="color:green;font-size:23pt;font-family:黑体;"><br><br>页<br>面<br>区<br>域</div></td>
<SCRIPT LANGUAGE="JavaScript">
var PageWidth= 800;//页面多少宽度象素下正好不出现左右滚动条
var MinScreenW= 1024;//显示广告的最小屏幕宽度象素
var ClosebuttonHtml='<div align="right" style="position: absolute;top:0px;right:0px;margin:2px;padding:2px;z-index:2000;"><a href="javascript:;" onclick="hidead()" style="color:red;text-decoration:none;font-size:12px;">关闭</a></div>'
var AdContentHtml='<div align="center" style="color:green;font-size:23pt;font-family:黑体;"><br><br>广<br>告<br>内<br>容</div>';
document.write('<div id="Javascript.LeftDiv" style="position: absolute;border: 1px solid#336699;background-color:#EEEEE2;z-index:1000;width:'+AdDivW+'px;height:'+AdDivH+'px;top:-1000px;word-break:break-all;display:none;">'+ClosebuttonHtml+'<div>'+AdContentHtml+'</div></div>');
document.write('<div id="Javascript.RightDiv" style="position: absolute;border: 1px solid#336699;background-color:#EEEEE2;z-index:1000;width:'+AdDivW+'px;height:'+AdDivH+'px;top:-1000px;word-break:break-all;display:none;">'+ClosebuttonHtml+'<div>'+AdContentHtml+'</div></div>');
if(window.screen.width<MinScreenW){
alert("临时提示:\n\n显示器分辨率宽度小于"+MinScreenW+",不显示广告");
document.getElementById("Javascript.LeftDiv").style.display="none";
document.getElementById("Javascript.RightDiv").style.display="none";
var Borderpx=((window.screen.width-PageWidth)/2-AdDivW)/2;
document.getElementById("Javascript.LeftDiv").style.display="";
document.getElementById("Javascript.LeftDiv").style.top=document.body.scrollTop+Toppx;
document.getElementById("Javascript.LeftDiv").style.left=document.body.scrollLeft+Borderpx;
document.getElementById("Javascript.RightDiv").style.display="";
document.getElementById("Javascript.RightDiv").style.top=document.body.scrollTop+Toppx;
document.getElementById("Javascript.RightDiv").style.left=document.body.scrollLeft+document.body.clientWidth-document.getElementById("Javascript.RightDiv").offsetWidth-Borderpx;
document.getElementById("Javascript.LeftDiv").style.display="none";
document.getElementById("Javascript.RightDiv").style.display="none";
这是JavaScript代码,在HTML和ASP中都能用。不过,前提是,你的浏览器本身没有拦截此类广告,才能显示出来。
OK,关于广告自助交易平台源码和易语言如何在源码内添加弹窗广告代码的内容到此结束了,希望对大家有所帮助。
声明:本文内容来自互联网不代表本站观点,转载请注明出处:https://www.41639.com/15_394313.html
