好的,根据以下答案的建议,我删除了我的线程方法,现在我的程序看起来像这样: program.cs
static void Main(){
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
FrmWWCShell FrmWWCShell = null;
var splash = new FrmSplash();
splash.SplashFormInitialized += delegate
{
FrmWWCShell = new FrmWWCShell();
splash.Close();
};
Application.Run(splash);
Application.Run(FrmWWCShell);
Run Code Online (Sandbox Code Playgroud)
}
和FrmSplash.cs是这样的:
public partial class FrmSplash : Form
{
public FrmSplash()
{
InitializeComponent();
}
protected override void OnLoad(EventArgs e)
{
splashTimer.Interval = 1;
splashTimer.Tick +=
delegate { if (SplashFormInitialized != null) SplashFormInitialized(this, EventArgs.Empty); };
splashTimer.Enabled = true;
}
public event EventHandler SplashFormInitialized;
}
Run Code Online (Sandbox Code Playgroud)
问题是它现在根本不起作用.启动屏幕弹出一瞬间,品牌进度条甚至没有初始化,然后消失,而我等待10秒钟的dll和主窗体出现,同时盯着什么......
让我现在严重困惑!
如何为 vb.net 程序创建启动画面?我想制作一个在程序启动之前和完成之后出现的视觉效果,这可能吗?
我可以使用SplashScreenImage.png文件作为我的wp7应用程序启动屏幕图像吗?
有没有办法使用png文件作为SplashScreenImage?
我在 Oracle 文档中找到了一个关于 SplashScreen 的示例。问题是在这个例子中,这里使用的图像的链接在命令行中作为参数传递。我正在尝试更改代码,以便将链接写在里面,我不需要使用命令行。
methodesetImageURL(URL imageURL)应该能够为我完成这项工作,但它不接受我的参数(参数)。
我读过 URL 类,似乎它需要协议!像http和ftp这样的协议?如果是这样,我的 url 应该如何用于计算机中的文件?当我尝试从我的计算机(例如:)放置链接时,"C:\plash.gif"它说illege excape character
我什至尝试对图像使用 http 链接,但它在 URL 行中给了我这个错误:
non-static method setImageURL(URL) cannot be referenced from a static context
Run Code Online (Sandbox Code Playgroud)
这是代码:
package misc;
import java.awt.*;
import java.awt.event.*;
import java.net.URL;
public class SplashDemo extends Frame implements ActionListener {
static void renderSplashFrame(Graphics2D g, int frame) {
final String[] comps = {"foo", "bar", "baz"};
g.setComposite(AlphaComposite.Clear);
g.fillRect(120,140,200,40);
g.setPaintMode();
g.setColor(Color.BLACK);
g.drawString("Loading "+comps[(frame/5)%3]+"...", 120, 150);
}
public SplashDemo() {
super("SplashScreen demo");
setSize(300, …Run Code Online (Sandbox Code Playgroud) 我正在学习如何使用scrapy + splash.我已经在虚拟环境中创建了一个项目,现在我正在做这个教程:https://github.com/scrapy-plugins/scrapy-splash.
我跑过了:
$ docker run -p 8050:8050 scrapinghub/splash
Run Code Online (Sandbox Code Playgroud)
结果导致:
2017-01-12 09:18:50+0000 [-] Log opened.
2017-01-12 09:18:50.225754 [-] Splash version: 2.3
2017-01-12 09:18:50.227033 [-] Qt 5.5.1, PyQt 5.5.1, WebKit 538.1, sip 4.17, Twisted 16.1.1, Lua 5.2
2017-01-12 09:18:50.227201 [-] Python 3.4.3 (default, Nov 17 2016, 01:08:31) [GCC 4.8.4]
2017-01-12 09:18:50.227645 [-] Open files limit: 1048576
2017-01-12 09:18:50.227882 [-] Can't bump open files limit
2017-01-12 09:18:50.333978 [-] Xvfb is started: ['Xvfb', ':1', '-screen', '0', '1024x768x24']
2017-01-12 …Run Code Online (Sandbox Code Playgroud) 我正在使用Splash v2.3.2 并且我正在尝试呈现一个页面,但它并没有呈现所有内容。它不会渲染图像或动态加载的内容。
我正在使用我的http://localhost:8050/脚本:
function main(splash)
local url = splash.args.url
assert(splash:go(url))
assert(splash:wait(10))
return {
html = splash:html(),
png = splash:png(),
har = splash:har(),
}
end
Run Code Online (Sandbox Code Playgroud)
我试图改变等待时间,也试图允许插件。这些都行不通。我假设动态加载的内容受到限制,但我不确定。任何帮助表示赞赏。
我不能使用ionic cordova resources命令,因为我想要在每个设备上都有一个带边框的启动画面。
每个设备需要哪些不同的文件大小?
我有一个闪屏(我被要求使用它),它应该在我的游戏开始之前显示3秒,不幸的是,一旦启动闪光,游戏屏幕将不会进展.我认为我的代码是正确实现的,但我似乎在某处错了.任何帮助表示赞赏.
public class SplashScreen extends AppCompatActivity{
// Splash Screen Timer
private static int SPLASH_TIME_OUT = 3000;
//@Override
public void OnCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_splash);
new Handler().postDelayed (new Runnable() {
@Override
public void run() {
Intent i = new Intent (SplashScreen.this, Snake.class);
startActivity(i);
finish ();
}
}, SPLASH_TIME_OUT);
}
}
Run Code Online (Sandbox Code Playgroud)
我知道很多人反对添加启动画面,因为事实是让很多用户觉得程序有延迟,但同样,这不是我的决定,因此我想硬编码只需3秒钟.
我正在尝试使用 QT 开发一个 android 应用程序。我想在应用程序开始时显示启动画面。启动画面将在那里停留 2 秒钟,然后将显示应用程序的主页。为此,我创建了 2 个 .qml 文件。
飞溅.qml
import QtQuick 2.9
import QtQuick.Controls 2.2
import QtQuick.Window 2.3
Window {
id: window
visible: true
width: Screen.width
height: Screen.height
signal timeout
Image {
id: image
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
width: 300
height: 300
source: "qrc:/../Desktop/photo_2018-03-21_19-53-06.jpg"
}
Text {
id: text1
y: image.height + image.y + 20
text: qsTr("@startimeahmet Presents")
anchors.horizontalCenter: parent.horizontalCenter
font.pixelSize: 25
}
Timer {
interval: 2000; running: true; repeat: false
onTriggered: {
visible = false
window.timeout() …Run Code Online (Sandbox Code Playgroud)