LizR 171 Posting Virtuoso

Usually you do a forumla such as

int pic_width=50;
int pic_height=50;

for(w=0;w<10;w++)
{
  picturebox[i].top=0;
  picturebox[i].left=(pic_width+1)*i;
  picturebox[i].height=pic_height;
  picturebox[i].width=pic_height;
}

this means box1 ends up at 0,0 , box2 51,0, box3 102,0 etc so they dont overlap.

LizR 171 Posting Virtuoso

You cant work like that what logic is it that produces such an effect?

LizR 171 Posting Virtuoso

The answer would normally be you shouldnt.

Please explain a little more of what you're trying to achieve before we can give you better answer

LizR 171 Posting Virtuoso

You could also have just used div - as div is for integer devision

LizR 171 Posting Virtuoso

In pre .net Id have agreed, in .net itself its not something Id given much thought.

LizR 171 Posting Virtuoso

Would be easier if you had just posted the errors and so on.

First error is lazy - it says "int32" not "Int32"
The second is also lazy - you have done the equivelent of

if (test==true)
{
 x;
}

where x is just a variable

Which if you fix it, will fix the other 2 errors.

LizR 171 Posting Virtuoso

Lanching MSDOS you should have been able to do, the problem is sending commands to it - this is a standard issue - normal way to do it is to either:

Do a lot of fancy work with copy and paste to a window handle you find by name, or by process ID

or

You can use something like http://www.delphi3000.com/articles/article_2298.asp

GOOGLE IS YOUR FRIEND

LizR 171 Posting Virtuoso

Sure..

You didnt write it - why should we?

Its your home work - not ours.

LizR 171 Posting Virtuoso

To learn more about String.Format - press F1 on it, it has examples and a lot of information on other formats and how to use it.

LizR 171 Posting Virtuoso

Well.. Make your own :)

What do you think a swap procedure/function would do?

LizR 171 Posting Virtuoso

3d gaming isnt my idea of fun either - however, the things it teaches you along the way are, and sure you make a bunch of games along the way but they cover so much and in someways you almost dont notice you're having a good laugh there.

LizR 171 Posting Virtuoso

What code do you have that doesnt work?

LizR 171 Posting Virtuoso

I too have the books but the vtms (even the free ones) on 3dbuzz are done in an entertaining and good way. Its worth a watch

LizR 171 Posting Virtuoso

Then it sounds like a timing issue.
You probably need to go give the object time to start before sending it instructions

LizR 171 Posting Virtuoso

You could try www.3dbuzz.com who have a set of video training things which are fun to follow

LizR 171 Posting Virtuoso

New problem, new thread.

LizR 171 Posting Virtuoso

Exactly, so converting to a language that should be treated as OO for it is (althoguh you can semi butcher it and ignore it mostly) it would be pointless to change to c# if you werent going to be making the most of what it offered

LizR 171 Posting Virtuoso

I think it was meant in terms of rather converting it by hand line by line - which of course you wouldnt, you'd convert class by class assuming the vb code even was remotely OO based in the first place.

LizR 171 Posting Virtuoso

The main one is why are you changing language if you arent going to be making use of its features.

LizR 171 Posting Virtuoso

Except Ive yet to see a system come out of a converter that didnt need a rewrite anyway

ddanbe commented: Well said +2
LizR 171 Posting Virtuoso

Split the files into mainpart and extension, then sort without extension.

LizR 171 Posting Virtuoso

Or you can try and convert the icon to a bmp and show that in the picture control - depends a little on how you want something displayed

LizR 171 Posting Virtuoso

Just google c# threads and look for msdn

Please dont forget to mark your issue solved.

LizR 171 Posting Virtuoso

Please search this forum - this question has been asked and answered before.

LizR 171 Posting Virtuoso

Only guarenteed way would be to step through all the running processes and check that powerpoint isnt already running

LizR 171 Posting Virtuoso

Same way you launch any of the applications. You would however need to know where to find slideshow.

LizR 171 Posting Virtuoso

Then mark the thread as solved.

However, a better statement of the problem would have helped too.

LizR 171 Posting Virtuoso

Then you need to check the extension and specifically not just launch the ppt file as its put in the folder, but launch the slide show.

LizR 171 Posting Virtuoso

Firstly without code tags thats kinda hard to read
Secondly, you dont mention in what way your time remaining hasnt worked.

LizR 171 Posting Virtuoso

Odd, it should give you a link to your help setup for VS ..

LizR 171 Posting Virtuoso

The article I posted was about background threads, and updating the UI and how to go about it, the rules and gotchas of the whole event.

If you're calling an update of your form from within your thread, and the work is done from the thread - not the main UI thread then, you can/will get issues of locking up - wether you use locks or not.

LizR 171 Posting Virtuoso

Did you read the thing on threads?

LizR 171 Posting Virtuoso

Set the dialog result to someting *ONLY* if all conditions are met.

LizR 171 Posting Virtuoso

Well with the questions per day thing you could dump their previous count each morning at midnight.

LizR 171 Posting Virtuoso

Well then, as a human you need to write that down in an if statement for the computer.

A little like the "Does this glass need topping up?"

If person has glass, and glass < full and they want more, add till glass = nearly full.

each appointment has 2 specific fields of interest, start and end. Your statement covers those - ergo you can solve that one.

Dont have delphi to hand but I believe you will find that is really all the calendar component in delphi is for, picking dates - there are 2 but they are pretty much the same. I drew my own once made a TYearCal which had data behind it to shade days and so on.

LizR 171 Posting Virtuoso

And the app you'd get would be worse by converting too

LizR 171 Posting Virtuoso

If you want to put it in a cell of a dbgrid, you'd change the db entry.. But your original post implied more of inserting a component into a dbgrid which is of course on google by the ton.

You didnt answer how YOU as a human would work it out - the answer is the same with the computer, you just need to write it down. The computer has no concept of calender, only humans, so you need to explain to it how you want it to work.

LizR 171 Posting Virtuoso

Most of the so called conversion tools dont seem to work as well as anyone ever wants them to. Coupled with the fact you're converting a win32 app to a .net app in from a language which allows for insane amounts of sloppyness, to a highly structured one.

LizR 171 Posting Virtuoso

As always this is a logic issue not a delphi issue.

As a human, how would you tell if "day shopping - 11am-6pm 19th Dec" clashes with "dentist - 4pm 18th Dec" or "Joe coming for dinner - 5.45pm 19th Dec" ?? (these appointments are ficticious as I could never ever spend that much time shopping, hate it)

the TCalender component does, but not in the way you probably think. It doesnt work like MS outlook and so on.

TMS have a few components that would go to make an outlook style appointment thing which simplifies the whole display element.

As for adding an edit box to your grid - its covered in multitudes of tutorials. Have a google.

LizR 171 Posting Virtuoso

It seems to me more a logic issue than a specific language issue.

Your background thread would need to invoke the main thread to update and draw. Any secondary thread must not update the UI as it can/will cause locks.

LizR 171 Posting Virtuoso

To restrict questions to x per day, or hour or whatever means you would have to log someones efforts.. or you select x questions that may run in a day and then randomize.

LizR 171 Posting Virtuoso

Well you dont include all your code, but in "Hand" as long as you still have access to the list of cards, just remember to "add" them back to the deck.

LizR 171 Posting Virtuoso

Renukavani, that code could be made so much simpler - which is why i didnt post code, because people need to understand not just copy

LizR 171 Posting Virtuoso

Yep, screen savers have specific functions in such as the config screen etc. I know Ive written a few following various googled tutorials in the past, so have a google.

LizR 171 Posting Virtuoso

Ok, so its not a runtime error its an issue with code completion.
Dont worry about it, worry yet.

LizR 171 Posting Virtuoso

and at what point did you get this?

LizR 171 Posting Virtuoso

Yes.
<sarcasm>dont set it to ok when its not :P</sarcasm>
The thing is thats exactly what you're doing

You're doing a number of tests on clicking an OK button. ALL of those tests must pass before you can move on, not just 1.

Either you have to make your if a big big if, or you do your logic so that if 1 of the tests fails you can tell. Easiest way to do that, is set the a boolean to false, and set it to true if any condition fails.. then at the end move on if its still false.

LizR 171 Posting Virtuoso
LizR 171 Posting Virtuoso

I would suggest you use an OK/Cancel button system, as while an item could even be considered valid, doesnt mean the user doesnt want to change it - it also means you only have 2 ways of leaving your form, the buttons or they hit close.

LizR 171 Posting Virtuoso

Depends I guess a little on when that code runs (which you havent shown) or, why you dont just use the draw method - for which search this forum ther are a number of examples