Click here to Skip to main content
15,914,359 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
QuestionMP3 Convertor Pin
Member 269015129-Jan-07 20:12
Member 269015129-Jan-07 20:12 
AnswerRe: MP3 Convertor Pin
Christian Graus29-Jan-07 22:00
protectorChristian Graus29-Jan-07 22:00 
QuestionProblem with SqlDataReader::GetBytes [modified] Pin
p_c29-Jan-07 5:04
p_c29-Jan-07 5:04 
AnswerRe: Problem with SqlDataReader::GetBytes Pin
prasad_som29-Jan-07 7:15
prasad_som29-Jan-07 7:15 
QuestionFirst-Chance exception Pin
uusheikh28-Jan-07 21:53
uusheikh28-Jan-07 21:53 
QuestionException handling Pin
shivapriyak28-Jan-07 18:31
shivapriyak28-Jan-07 18:31 
AnswerRe: Exception handling Pin
Christian Graus28-Jan-07 21:54
protectorChristian Graus28-Jan-07 21:54 
QuestionMy app get's hung up and is not responding. Pin
zoleero28-Jan-07 14:16
zoleero28-Jan-07 14:16 
I am developing this simple arithmetic program and this is my first windows application ever, so I am not so sure at how to program this. In my app the user can set the lower limit and upper limit for the calculations numbers that are about to come up in a test the user want’s to do. You se the upper and lower limit as variables in the code below. The code below generates calculations for addition, subtraction and multiplication. So let us suppose that the user sets the limits to lower = 1 and upper = 100, that will give us 100 x 100 = 10 000 calculations! When I test this on my own computer it takes a while to generate all calculations, and if I change upper limit = 200 the program stops I push (ctrl+alt+del) and it says that the application is not responding.

// Generating all Calculations for addition, subtraction and multiplication
for(int i = lowerLimit; i <= upperLimit; i++)
{
for(int j = lowerLimit; j <= upperLimit; j++)
{
// Reset flag
excludeCalculation = false;
// Create temp Calculation
tempCalculation = gcnew Calculation(i, calculationOperator, j);
// Check if Calculation should be removed
excludeCalculation = this->removeCalculation(tempCalculation);


// Check if to add Calculation
if(excludeCalculation == false) // If NOT to be excluded
{
calculations->Add(tempCalculation);
}
}
}

How do I prevent the application from stopping like this??

I would like to show a progressbar while the application is generating the calculations, but I don’t know how to do this when the application get hung up by it self all the time, I can not figure out how to work around this problem.

Does anybody have any tips???

I am not so familiar with using Threads, but is this one of these occasions when I should be using Threads???

If so, can someone give me an example of how to program with treads?? And how do I pass data between threads?… I have to know how many calculations is generated for my progressbar… or??

I am a complete newbe on this… so all help is appreciated!!



Best regards, Andreas
AnswerRe: My app get's hung up and is not responding. Pin
Christian Graus28-Jan-07 15:02
protectorChristian Graus28-Jan-07 15:02 
GeneralRe: My app get's hung up and is not responding. Pin
zoleero29-Jan-07 2:38
zoleero29-Jan-07 2:38 
GeneralRe: My app get's hung up and is not responding. Pin
Christian Graus29-Jan-07 8:48
protectorChristian Graus29-Jan-07 8:48 
GeneralRe: My app get's hung up and is not responding. [modified] Pin
zoleero6-Feb-07 5:51
zoleero6-Feb-07 5:51 
AnswerRe: My app get's hung up and is not responding. Pin
Michael Dunn28-Jan-07 19:16
sitebuilderMichael Dunn28-Jan-07 19:16 
GeneralRe: My app get's hung up and is not responding. Pin
Christian Graus28-Jan-07 21:52
protectorChristian Graus28-Jan-07 21:52 
Questionpartial class Pin
Bartosz Bien28-Jan-07 6:30
Bartosz Bien28-Jan-07 6:30 
AnswerRe: partial class Pin
George L. Jackson28-Jan-07 7:36
George L. Jackson28-Jan-07 7:36 
GeneralRe: partial class Pin
Bartosz Bien31-Jan-07 4:38
Bartosz Bien31-Jan-07 4:38 
GeneralRe: partial class Pin
George L. Jackson1-Feb-07 5:18
George L. Jackson1-Feb-07 5:18 
GeneralRe: partial class Pin
Bartosz Bien13-Feb-07 10:47
Bartosz Bien13-Feb-07 10:47 
GeneralRe: partial class Pin
George L. Jackson13-Feb-07 12:07
George L. Jackson13-Feb-07 12:07 
AnswerRe: partial class Pin
Christian Graus28-Jan-07 9:46
protectorChristian Graus28-Jan-07 9:46 
GeneralRe: partial class Pin
George L. Jackson28-Jan-07 14:06
George L. Jackson28-Jan-07 14:06 
GeneralRe: partial class Pin
Christian Graus28-Jan-07 15:05
protectorChristian Graus28-Jan-07 15:05 
GeneralRe: partial class Pin
George L. Jackson28-Jan-07 21:54
George L. Jackson28-Jan-07 21:54 
GeneralRe: partial class Pin
Bartosz Bien31-Jan-07 4:47
Bartosz Bien31-Jan-07 4:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.