原地址:http://blog.sina.com.cn/s/blog_697b1b8c0101gd4h.html

using System;
using System.Runtime.InteropServices;
using UnityEngine; public class WindowMOD : MonoBehaviour
{
public Rect screenPosition;
[DllImport("user32.dll")]
static extern IntPtr SetWindowLong (IntPtr hwnd,int _nIndex ,int dwNewLong);
[DllImport("user32.dll")]
static extern bool SetWindowPos (IntPtr hWnd, int hWndInsertAfter, int X, int Y, int cx, int cy, uint uFlags);
[DllImport("user32.dll")]
static extern IntPtr GetForegroundWindow (); const uint SWP_SHOWWINDOW = 0x0040;
const int GWL_STYLE = -;
const int WS_BORDER = ;
const int WS_POPUP = 0x800000; void Start ()
{
SetWindowLong(GetForegroundWindow (), GWL_STYLE, WS_POPUP);//将网上的WS_BORDER替换成WS_POPUP
bool result = SetWindowPos (GetForegroundWindow (), ,(int)screenPosition.x,(int)screenPosition.y, (int)screenPosition.width,(int) screenPosition.height, SWP_SHOWWINDOW);
}
}
这样子在编辑模式下点运行,我的Unity的边框确实木有了。然而,发布之后的exe文件仍然带有边框。在playersetting中将Display Resolution Dialog设置为Disabled或者Hidden By Default。然后再发布的exe就可以直接无边框显示啦。

Unity3d 去掉exe版本的边框的更多相关文章

  1. fenghuangscannerV3 EXE版本

    作者wils0n未给出EXE版本,鼓捣了下: 1.安装pyinstaller 2.fenghuangscanner目录防止pyinstaller下 3. pyinstaller.py --consol ...

  2. 【Winfrom-Button】 重写Button,去掉获取焦点时的边框

    Winfrom Button 去掉获取焦点时的边框: 自定义一个Button,重写ShowFocusCues方法 /// <summary> /// 去掉获取焦点的边框 /// </ ...

  3. 安装unity3d多个版本共存

    转自:https://www.cnblogs.com/xsgame/p/3549486.html 用4.3打开两个低版本的unity工程,都报错.... 用低版本打开正常,希望Unity3D版本兼容性 ...

  4. unity3d多个版本共存

    用4.3打开两个低版本的unity工程,都报错.... 用低版本打开正常,希望Unity3D版本兼容性越来越好吧. 参考:http://blog.csdn.net/anyuanlzh/article/ ...

  5. 使用pyInstaller发布PathMerge的exe版本(py转换成exe)

    前言 PathMerge是用python写的一个辅助文件夹合并的小工具,它的特点是不用担心合并后文件会丢失,旧文件会创建副本保存下来,除非你手动删除. 详情见:python开发目录合并小工具 Path ...

  6. HTML页面表单输入框去掉鼠标选中后边框变色的效果

    标题说的有些含糊,实在不知道怎么描述了,就简单说一下吧,一个最简单的表单,代码如下,没有任何样式和名字, <!DOCTYPE html> <html> <head> ...

  7. Siverlight去掉ToolTip的白色边框

    control作为tooltip后,外框背景是白色的,并且有边框.  我们可以定义 一个样式去掉. <Style x:Key="ToolTipTransparentStyle" ...

  8. 小窍门:变更Windows Azure Websites自带的node.exe版本

    这几天在玩node.js.Azure Websites天然支持node.js(还支持.net, php和python).   它对nodejs支持的原理是: IIS充当Web服务器,接收所有的请求,而 ...

  9. input 去掉点击后出现的边框

    添加属性 :focus{outline:none} 就可以去掉默认点击时,边框会出现的蓝色边框. :focus 选择器用于选取获得焦点的元素.提示:接收键盘事件或其他用户输入的元素都允许 :focus ...

随机推荐

  1. 模态窗口插件之Jbox

    $.jBox.tip("报损数量不能大于库存数!", 'error'); $.jBox.tip("请选择要报损的产品", "warn"); ...

  2. javaWeb开发模式

    1.发展历程 2.模式分析 JSP+JavaBean模式适合开发业务逻辑不太复杂的web服务程序.这种模式下,JavaBean用于封装业务数据,JSP即负责处理用户请求,又显示数据(JSP编写业务逻辑 ...

  3. ThreadLocal模式的核心元素

    首先来看ThreadLocal模式的实现机理:在JDK的早期版本中,提供了一种解决多线程并发问题的方案:java.lang.ThreadLocal类.ThreadLocal类在维护变量时,世纪使用了当 ...

  4. JDO持久 (jdbc ejb)

    转自:http://blog.csdn.net/liuzhigang1237/article/details/6305113 JDO快速入门 Java数据对象(Java Data Objects,JD ...

  5. “耐撕”团队 2016.04.08 站立会议

    1. 时间 : 15:20--15:40 2. 人员 : Z 郑蕊 * 组长 (博客:http://www.cnblogs.com/zhengrui0452/), P 濮成林(博客:http://ww ...

  6. 【POJ 3176】Cow Bowling

    题 Description The cows don't use actual bowling balls when they go bowling. They each take a number ...

  7. getHibernateTemplate()的用法

    getHibernateTemplate() spring 中获得由spring所配置的hibernate的操作对象,然后利用此对象进行,保存,修改和删除等操作,此方法是在配置了spring以后,hi ...

  8. Spring+C3P0数据库连接池配置

    一.xml文件读取.properties文件连接数据库 1.xml文件中的配置 <bean id="dataSourceLocal" name="dataSourc ...

  9. CodeReview Learning

    目录 . 引言 . 代码检视的指导思想 . 代码检视的内容 . 回归测试 0. 引言 代码检视(Code Review)是指软件开发人员在完成代码设计.编写.调试后展开的个人或群体性的代码阅读过程,代 ...

  10. PL/0编译器(java version) - MainFrame.java

    1: /* 2: * To change this license header, choose License Headers in Project Properties. 3: * To chan ...