Language: ChineseGermanSpanishFrenchDutchItalianRussian
123 Flash Chat Forums

Go Back   TOPCMM Community > SWFKit > SWFKit Support

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-01-2008, 04:40 PM
Junior Member
 
Join Date: Feb 2008
Posts: 7
Default Why does this crash in XP . . . ?

What does my desktop application/projector do? It starts up, displays itself on the screen for a second, then gets minimized to the system tray.

After x seconds (or minutes), it pops up with a reminder message.
After y seconds, it gets minimized to the system tray again.

And so on, and so forth. Until the end user closes the application or turns off the computer.

The problem: After showing & hiding & showing & hiding a few times, I get a nasty Windows XP bug message, asking me whether I want to send the issue to Microsoft.


Does anybody see anything alarming in my code? Any suggestions for improvement?

Your help would be greatly appreciated!




Code:
//Initialize
getAdditionalFile();

gmw = getMainWnd();
timeToHide = 10000;
timeToShow = 10000;
ft = 1;

gmw.onSize = function (type, w, h) {
	if (type == 1/*minimized*/) {
		gmw.hide();
	}
}

Application.Behaviour.bShowInSystemTray = true;
Application.SysTray.useDefaultHandler = false;
Application.SysTray.tip = "Visual Health Tool";
Application.SysTray.add();
Application.SysTray.onRClicked = function (){
  var menu = new Menu;
  menu.createPopupMenu();
  menu.appendItem("id0", "Hide");
  menu.appendItem("id1", "Show");
  menu.appendItem();
  menu.appendItem("id2", "About");
  menu.appendItem();
  menu.appendItem("id3", "Exit");
  gmw.bringToTop();
	var id = menu.show();

	if(id == "id0"){
		gmw.hide();
	}

	if(id == "id1"){
		if(gmw.windowState == "minimized"){
			gmw.windowState = "normal";
		}
		gmw.show();
		gmw.bringToTop();
	}

	if(id == "id2"){

	}
	
	if(id == "id3"){
		gmw.close();
	}
}




/* GLOBAL VARIABLES TO HIDE & SHOW THE APPLICATION * * * * * * * * * * * * * * */
//tt = 25000;
//timerShow = Application.setInterval(ShowApp, tt, (new Date).toString());

function ShowApp(str){
	Application.clearInterval(timerShow);
	if(gmw.windowState == "minimized"){
		gmw.windowState = "normal";
	}
	gmw.bringToTop();
	gmw.show();
	timerHide = Application.setInterval(HideApp, 5000, "hide");
}

function HideApp(str){
	Application.clearInterval(timerHide);
	if(gmw.windowState != "minimized"){
		gmw.windowState = "minimized";
	}
	gmw.hide();
	// Dialogs.msgBox("Hidden");
	timerShow = Application.setInterval(ShowApp, 10000, "show");
}	

/* ONLY ALLOW ONE INSTANCE OF THIS APPLICATION * * * * * * * * * * * * * * * * * * * */
wnds = Window.getWindowsByName("Visual Health Tool");
var has = false;
for (i = 0; i < wnds.length; i++){
  if (wnds[i].handle != gmw.handle){
    has = true;
    break;
  }
}

if(has){
  wnds[i].bringToTop();
  return false;
}

if(ft == 1){
	ft++;
	timerHide = Application.setInterval(HideApp, 1000, "hide");
}


return true;
Reply With Quote
  #2 (permalink)  
Old 03-05-2008, 08:44 AM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re: Why does this crash in XP . . . ?

Can you please send us your exe file(support@swfkit.com)? We have compiled your code and run it for hundreds of times and found no problem.
Reply With Quote
  #3 (permalink)  
Old 03-05-2008, 01:34 PM
Junior Member
 
Join Date: Feb 2008
Posts: 7
Default Re: Why does this crash in XP . . . ?

Thank you very much for your reply.

To be honest with you, I have since moved on to a different solution. Thanks for your help. I greatly appreciate it.
Reply With Quote
  #4 (permalink)  
Old 09-21-2009, 09:28 AM
Junior Member
 
Join Date: Sep 2009
Posts: 1
Default

I was also facing same type of problem.Thanx for the solution.
Reply With Quote
  #5 (permalink)  
Old 09-21-2009, 11:22 AM
Junior Member
 
Join Date: Sep 2009
Posts: 1
Default Sometime ago!!

Sometime ago I also suffer from this problem.But I got a complete solution for this problem on internet.You first try on net then if the problem persist then format your pc.
Reply With Quote
Reply

Was this information helpful?    Yes No



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 05:03 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.