Hmm... mam jeszcze jeden problem ;p odnosnie kodu z tematu morethanchaosa robiac tak jak jest w kodzie wszystko dziala ze zwykla forma i jest oki , ale zrobilem inna foremke i program sie kompiluje ale przed uruchomieniem programu wyskakuje blad ;/ Nie wiem czy to przez timery w splashscreenie
obydwie formatki osobno dzialaja ok ale laczac je wedlog tego sposobu cos sie pierniczny; ( Jakby kto mogl rzucic okiem albo mial podobny problem i cos doradzi to bede bardzo wdzieczny .
Z gory dzieki i pozdrawiam
kod formy co ma sie uruchomic przed glownym programem
namespace Przychodnia
{
public partial class SplashScreen : Form
{
public SplashScreen()
{
InitializeComponent();
timer1.Tick += new EventHandler(timer1_Tick);
timer2.Tick += new EventHandler(timer2_Tick);
timer3.Tick += new EventHandler(timer3_Tick);
timer4.Tick += new EventHandler(timer4_Tick);
}
private void timer1_Tick(object sender, EventArgs e)
{
Application.Exit();
}
private void timer2_Tick(object sender, EventArgs e)
{
this.axShockwaveFlash1.LoadMovie(0, @"C:\Documents and Settings\chudy123\Pulpit\flash\cybertrick.swf");
}
private void timer3_Tick(object sender, EventArgs e)
{
timer2.Stop();
this.axShockwaveFlash1.LoadMovie(0, @"C:\Documents and Settings\chudy123\Pulpit\flash\blur.swf");
}
private void button1_Click(object sender, EventArgs e)
{
Application.Exit();
}
private void timer4_Tick(object sender, EventArgs e)
{
SoundPlayer sp = new SoundPlayer(
@"C:\Documents and Settings\chudy123\Pulpit\flash\start3.wav");
sp.Play();
}
}
}
interval dla
timer1 - 16500
timer2 - 300
timer3 - 7000
timer4 - 8150
kod glownej formatki
namespace Przychodnia
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
// splashscreen
Thread thr = new Thread(new ThreadStart(Powitanie));
thr.Start();
Thread.Sleep(4000);
thr.Abort();
Thread.Sleep(1000);
}
private void zakończToolStripMenuItem_Click(object sender, EventArgs e)
{
Application.Exit();
}
void Powitanie()
{
SplashScreen spsc = new SplashScreen();
spsc.ShowDialog();
}
}
}
<\code>