Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » Newbie corner » Open An image upon startup
Open An image upon startup [message #27987] Thu, 12 August 2010 23:56 Go to next message
nick28th is currently offline  nick28th
Messages: 13
Registered: August 2010
Location: Missouri
Promising Member
So when my app starts i wanna have a pic of agumon pop up lol is this possible, i dont wanna have to have them got the pic, the dirrectory is
C:\Documents and Settings\Nick\My Documents\My Pictures\agumon.jpg
so can i do this?
Re: Open An image upon startup [message #27988 is a reply to message #27987] Fri, 13 August 2010 00:11 Go to previous messageGo to next message
nick28th is currently offline  nick28th
Messages: 13
Registered: August 2010
Location: Missouri
Promising Member
this forum sucks Confused
Re: Open An image upon startup [message #28000 is a reply to message #27987] Fri, 13 August 2010 09:44 Go to previous messageGo to next message
mr_ped is currently offline  mr_ped
Messages: 825
Registered: November 2005
Location: Czech Republic - Praha
Experienced Contributor
English please. Smile I have no idea what you want.
Re: Open An image upon startup [message #28044 is a reply to message #28000] Fri, 13 August 2010 17:42 Go to previous messageGo to next message
nick28th is currently offline  nick28th
Messages: 13
Registered: August 2010
Location: Missouri
Promising Member
i want a picture to pop up when i launch my program... is there an open command like in c++ system("Directory") and that file opens, i have tried that and it wont accept it. the manual's formulas are very confusing in my opinion and i cant figure out how to do this
Re: Open An image upon startup [message #28048 is a reply to message #28044] Fri, 13 August 2010 18:46 Go to previous messageGo to next message
jeremy_c is currently offline  jeremy_c
Messages: 175
Registered: August 2007
Location: Ohio, USA
Experienced Member
U++ is written in C/C++. If system("Directory"); does what you want just use it?

Jeremy
Re: Open An image upon startup [message #28050 is a reply to message #28048] Fri, 13 August 2010 19:07 Go to previous messageGo to next message
nick28th is currently offline  nick28th
Messages: 13
Registered: August 2010
Location: Missouri
Promising Member
UGH still isnt working, it brings an error with 1 \ but doesn't with \\ and it doesn't open the pic but runs right.
Re: Open An image upon startup [message #28051 is a reply to message #27987] Fri, 13 August 2010 19:26 Go to previous messageGo to next message
jeremy_c is currently offline  jeremy_c
Messages: 175
Registered: August 2007
Location: Ohio, USA
Experienced Member
Nick,

I am not being mean. I'm trying to help you enjoy programming and accomplish your goals much more rapidly.

My suggestion is that you purchase a book or borrow one from the library on programming in C/C++. If you don't, you'll just frustrate yourself. The sooner you do, the better off you will be.

What you are describing is a two fold problem.

#1... escape characters inside of a string. You need to know why there are escape characters and what those escape characters are. They are pretty much standard across all programming languages.

#2... system simply issues a command. For example, if at the command prompt you type "Picture.jpg", if the command prompt returns an invalid command so will system. There are all sorts of tricks for getting around this, but you probably want to use the Functions4U package in the bazaar. This may/maynot require you using a source code management tool which is something else you should read up on after a basic programming book.

Again, not being mean just trying to start you off on the right track, the one with the least frustration and most productivity.

Jeremy
Re: Open An image upon startup [message #28056 is a reply to message #28051] Fri, 13 August 2010 21:29 Go to previous messageGo to next message
nick28th is currently offline  nick28th
Messages: 13
Registered: August 2010
Location: Missouri
Promising Member
i know you arent trying to frustrait me, i got the program done it is almost finished, im putting final touches on it i took a c++ class last year and have continued my lessons past that i know quite a bit but sometimes stuff just doesn't work right, im not a bad programmer and i know C++. my program is 1800+ lines. i know what system is dude your being a jerk and ill figure it out my self if your gonna be a jerk, U++ is amazing but it has flaws and holes in it.
Re: Open An image upon startup [message #28084 is a reply to message #28056] Sat, 14 August 2010 23:12 Go to previous messageGo to next message
andrei_natanael is currently offline  andrei_natanael
Messages: 262
Registered: January 2009
Experienced Member
I don't know if you want to do a splash-screen (see TheIDE for that) or not, but if you don't there is LaunchWebBrowser() which will open the image with default program for image viewing.
Re: Open An image upon startup [message #28089 is a reply to message #28084] Sun, 15 August 2010 05:25 Go to previous messageGo to next message
nick28th is currently offline  nick28th
Messages: 13
Registered: August 2010
Location: Missouri
Promising Member
OKAY sweet thanks will do i got one other problem, my drop booxes arent working right. in one program i can only have 5 values or it doesnt work right and in this program, its doing it right, it just wont write to the array.

#include "Punnett_Squares.h"
int count1;


Punnett_Squares::Punnett_Squares()
{
	CtrlLayout(*this, "Punnett Squares");
	par11.Add(1, "AA");
	par11.Add(2, "Aa");
	par11.Add(3, "aa");
	par21.Add(1, "AA");
	par21.Add(2, "Aa");
	par21.Add(3, "aa");

	btnGo <<= THISBACK(Monohybrid);
}
void Punnett_Squares::Monohybrid()
{
	if (count1 > 3)
	{
	if(par11 ==1 && par21 ==1 )
	{
		res1.Add("AA");
		res1.Add("AA");
		res2.Add("AA");
		res2.Add("AA");
		count1++;
	}
	if(par11 ==1 && par21 ==2 )
	{
		res1.Add("AA");
		res1.Add("Aa");
		res2.Add("AA");
		res2.Add("Aa");
		count1++;
	}
	if(par11 ==1 && par21 ==3 )
	{
		res1.Add("Aa");
		res1.Add("Aa");
		res2.Add("Aa");
		res2.Add("Aa");
		count1++;
	}
	if(par11 ==2 && par21 ==1 )
	{
		res1.Add("AA");
		res1.Add("AA");
		res2.Add("Aa");
		res2.Add("Aa");
		count1++;
	}
	if(par11 ==2 && par21 ==2 )
	{
		res1.Add("AA");
		res1.Add("Aa");
		res2.Add("Aa");
		res2.Add("aa");
		count1++;
	}
	if(par11 ==2 && par21 ==3 )
	{
		res1.Add("Aa");
		res1.Add("aa");
		res2.Add("aa");
		res2.Add("aa");
		count1++;
	}
	if(par11 ==3 && par21 ==1 )
	{
		res1.Add("Aa");
		res1.Add("Aa");
		res2.Add("Aa");
		res2.Add("Aa");
		count1++;
	}
	if(par11 ==3 && par21 ==2 )
	{
		res1.Add("Aa");
		res1.Add("aa");
		res2.Add("Aa");
		res2.Add("aa");
		count1++;
	}
	if(par11 ==3 && par21 ==3 )
	{
		res1.Add("aa");
		res1.Add("aa");
		res2.Add("aa");
		res2.Add("aa");
		count1++;
	}
	}
}

GUI_APP_MAIN
{
	Punnett_Squares().Run();
}

can i get some help with this?
Re: Open An image upon startup [message #28094 is a reply to message #28089] Sun, 15 August 2010 13:55 Go to previous messageGo to next message
andrei_natanael is currently offline  andrei_natanael
Messages: 262
Registered: January 2009
Experienced Member
Hi Nick,
I can't see any problem with Dropbox control from the code you've send. I can only say that Monohybrid() never get executed because count1 is not initialized and greater than 3, so if (count1 > 3) will fail.
Re: Open An image upon startup [message #28095 is a reply to message #28094] Sun, 15 August 2010 21:07 Go to previous message
nick28th is currently offline  nick28th
Messages: 13
Registered: August 2010
Location: Missouri
Promising Member
awe yes thanks lol the count was something i had added checked the forums and linked b4 i finished. i have had so many problems with these drop boxes though. as awesome as U++ is i feel that sometimes it is self aware and doesn't want to work properly XD
Previous Topic: Demo time trial
Next Topic: Algorithms and Vectors
Goto Forum:
  


Current Time: Sat Apr 20 11:04:03 CEST 2024

Total time taken to generate the page: 0.03999 seconds