Delphi Object PASCAL Topic

| Object PASCAL language including OOP, classes, interfaces, types, methods, functions, procedures, etc. |
|
|
Thread 25 of 25 | | Thread Starter | | |  epicurean | BDE ConfigurationSo yesterday, all was well, happy happy joy joy. Today...when I try to open up my database program...I get an error, Cannot write to Engine configuration file BDE Error 8453 [$21] [$5]. Same problem when I open BDE Admin - System configuration file not found. System default in use. When I try to recreate the Alias and save the settings, same error, Cannot write to Engine configuration file. So my question is..what happened to the configuration file? I still have the new config file that I created previously, but when I try to apply it to the Alias, same error. I still have the default idapi32.cfg file. But when I try to make a new Alias with that config file, and save it as ParadoxTest (which is the name of the Alias I was using before), it won't let me save. Also will not let me save a newly created .cfg file. Any ideas?, , Using Delphi 6 enterprise with paradox 4.0 tables. Windows 98. .pas .dpr etc files on a Novel network drive, .cfg file is on the same network drive in different di... | 3 replies. Last post: |  Anonymous | what if it happens while logged in as administrator?!---Amin |
|
 8671 Hits | |
Thread 24 of 25 | | Thread Starter | | |  ParaDelphi | Does Delphi support code contracts?I was reading a bit about class contracts in Prism, does Delphi 2009 support class contracts? I've looked everywhere. | 4 replies. Last post: |  Paul.S | thanks. i have not been back in a while but wanted to say thanks for the info., |
|
 1998 Hits | |
Thread 23 of 25 | | Thread Starter | | |  hyp3n0zy5 | Bizarre date/time logicsCan anyone give me an explanation as to why the following first assert fails? (i use D7), , var dt1, dt2: TDateTime;, begin, dt1 := Now;, dt2 := IncHour(dt1, 1);, Assert(HoursBetween(dt1, dt2) = 1, '1st assert!');, , dt1 := Now;, dt2 := IncHour(dt1, 2);, Assert(HoursBetween(dt1, dt2) = 2, '2nd assert!'); | 8 replies. Last post: |  Wes | I cast a vote, too.
The bug(s) are very well documented in this QC report, and good fixes have been suggested. This is difinitely an area that needs attention. |
|
 3282 Hits | |
Thread 22 of 25 | | Thread Starter | | |  Jarmulowicz | Pascal Database Toolbox (TAccess)Is there a Delphi component that can read the old Borland Database Toolbox files - it was a superb fast DOS database and I want to develop a reader for some old data going back to 1978!, , Thanks, , Michael Jarmulowicz | 6 replies. Last post: |  peterw1956 | Thanks heaps EverybyteNow all I need is a version I can use with Delphi.regardsPeter |
|
 4094 Hits | |
Thread 21 of 25 | | Thread Starter | | |  hyp3n0zy5 | Creating simple PDF filesIs there a free unit, component or tutorial for creating PDF files? I only need very basic features. Just be able to insert some simple text and pictures in a PDF., If somebody has experience with a good commercial PDF product, i also like to hear. But for what i need, i hope there's something free. | 4 replies. Last post: |  Wes | Like Dan, I like Primo PDF - a lot. It is so simple to install and use, and the PDFs it produces are gorgeous. It behaves just like any other "printer." That is, once installed, Primo PDF becomes one of your printer choices.So, any application that can print, can now generate PDFs.However, if you're a Delphi programmer, and want to incorporate PDF generation directly into your application, my favorite way is to use the PDF Export component tha... |
|
 2420 Hits | |
Thread 20 of 25 | | Thread Starter | | |  hyp3n0zy5 | How to fully support all locale settings?I have a program that does a lot with strings, and is required to work everywhere in the world, so also in Asia for example. What is the way to do this in Delphi? Only use the Ansi... string functions? If i understand correctly the default string type should support this. If i write code like, , var SomeString: string;, SomeChar: char;, begin, if SomeString[1] = SomeChar then blablaDoes this work in other locales? If not how to do this?  How do i get the length of a string (in characters)?, , If i understand correctly the only reason Delphi is not 100% unicode is because it would break Win9x compatibility. Please go ahead Borland! I don't want to worry about this crap... | 2 replies. Last post: |  dulcaoin | [QUOTE]Originally posted by hypenozys:, [qb] I have a program that does a lot with strings, and is required to work everywhere in the world, so also in Asia for example. What is the way to do this in Delphi? Only use the Ansi... string functions? If i understand correctly the default string type should support this. If i write code like, , var SomeString: string;, SomeChar: char;, begin, if SomeString[1] = SomeChar then blablaDoes this work i... |
|
 1888 Hits | |
Thread 19 of 25 | | Thread Starter | | |  hr41pearl | vcharI am looking for an easy way to read a users input from a badge. Inbedded on the badge is a CNTRL O to confirm that the badge is being used. So a typical response would be 1445 CNTRL O. After I know the badge is used, I just strip the 1445 and apply it to the job database. , My confusion is the vchar and vcharcode. HLEP, , hr41pearl  | 1 Reply: |  hr41pearl | OOOPS. Found it. Thanks anyway., , hr41pearl |
|
 1034 Hits | |
Thread 18 of 25 | | Thread Starter | | |  ronando | Resize form & all contained objectsHi, I'm tring to convert some forms from PARADOX to DELPHI., i need to maximize from adn consequently all objects. In paradox i use bestfit instruction., , So can anyone give me a suggestion? I am rookie in Delphi., , Thanks, Fernando | 1 Reply: |  wpantoja | There are many ways this can be accomplished:, , 1. Use the Anchors and Align properties on each component as appropriate to automatically have components resize., , 2. Programmatically resize all components., , 3. A hybrid of 1 and 2., , Obviously, the first way is the easiest and in most cases will work very well. In some cases, however, the automatic resizing does not give you the effect you need or due to other issues requires you to manuall... |
|
 2011 Hits | |
Thread 17 of 25 | | Thread Starter | | |  Tim Oakley | eConvertError on StrtoDate won't recoverWe have this simple code that seemed to work fine for years. We are win2k delphi6 (with 2 updates) web app, bde 5.11 hitting oracle 8.0.1.6, ---------------------------------------, function IsValidMDYDate(DateText: String): Boolean;, var SaveState: String;, begin, SaveState:=ShortDateFormat;// user default is d/m/yyyy, Result:=True;, , try, try, ShortDateFormat:='mm/dd/yyyy';, StrToDate(DateText);, except, on EConvertError do Result:=False;, end;, finally, ShortDateFormat:=SaveState; // restore ShortDateFormat, end;, end;, ------------------------------------, The behavior is that it works fine until someone enters a date that fails the conversion. Then no matter what the user enters StrToDate will fail and raise the EConvertError., The app will have to be restarted to recover., , The ShortDateFormat presented to the users is d/m/yyyy. I have watched(flyover) the changing values of ShortDateFormat come in correctly, change correctly (for the database), then change back correctly. The ... | 4 replies. Last post: |  toakley | You make a very good suggestion. In fact, what you suggested in part was the solution. In some error logging written to a log file, the data seperator was being set to a hyphen. I corrected. Sorry I did not respond sooner... |
|
 3542 Hits | |
Thread 16 of 25 | | Thread Starter | | |  Matt | TForm and TComponentHi,, I'm trying to find a form by browsing through Delphi's application components and show the form when the right name has been found. Unfortunately, I hit a compiler error I don't know how to go about it., , var, ShowThisForm: TForm ;, , begin, for i := 0 to ComponentCount - 1 do, begin, if Application.Components[i] is TForm then, begin, if FrmNam = Application.Components[i].Name then, begin, ShowThisForm := Application.Components[i] ;, ShowThisForm.Show ;, exit ;, end ;, end ;, end ;, end ;, , end ; | 2 replies. Last post: |  Matt | Exactly what I needed to know. Thanks a lot!! |
|
 1522 Hits | |
Thread 15 of 25 | | Thread Starter | | |  hidingmonkey | arraysi want to read 1 2 3 4 or something of that format, four integers with a space inbetween from a text file. Once read i need to store each integer into an array so that it can be used later. How would i do this as i have tried many different ways and none seem to work. So for example , myArray[1]=1 , myArray[2]=2 , etc but it ignores the spaces | 1 Reply: |  Rick Carter | Hello, are you using Delphi, or some other programming language? Your code doesn't look anything like Delphi code. And I don't see any "spaces" in your code. |
|
 959 Hits | |
Thread 14 of 25 | | Thread Starter | | |  epicurean | Delphi/paradox multi-user appI'm looking for a tutorial on how to set-up delphi to access paradox 4.0 tables in a multi-user environment. Using Delphi 6 enterprise on a novel network. I've searched hi and low and can't find any information. Any suggestions would be greatly appreciated! Thanks in advance. | 5 replies. Last post: |  rt | AI, nice to see you, metaphorically speaking, back again  , rt |
|
 3271 Hits | |
Thread 13 of 25 | | Thread Starter | | |  Scott Wehrly | Forum : EncryptionIn the spirit of waking up these too-quiet Delphi forums, I want to open up a discussion of technical solutions, and begin a dialog between the board members on their experience with the subject., , , , I want to begin with data encryption. Having just built the first commercial release of our Password PocketBook application, naturally I had to analyze encryption methods., , , , What I want to know is what other Delphi developers have experienced in dealing with encryption - particulary encryption algorithms and data conversions., , [list], [*]1. What have you used for encrypting passwords and other sensitive string data?, [*]2. What worked best for you?, [*]3. What caused problems for you?, [*]4. For database fields (any SQL database), what was the most efficient way you handled field value encryption?, [*]5. What libraries or component products would you recommend?, [/list], , , , For our application, I did review a few libraries and source samples from Torry's and the Delphi Supe... | 2 replies. Last post: |  NevilleRichards | Unfortunately, I think that any self-respecting hacker would unravel Angel's encryption very quickly., , I once read an interesting article which proposed using a mathematical procedure of a recurrence relation type:, , D[i+1] := f(D[i]) - D[i-1], , In english, the next string is some mixture of the current on minus the previous (however you define minus in this context)., , This has the advantage that the reversal is of exactly the same fo... |
|
 1625 Hits | |
Thread 12 of 25 | | Thread Starter | | |  Angel | TipsIn the hope of livening up the Delphi boards a little bit (the paradox users are laughing at us) I have started this Tips thread. The idea being that we can share the little tips we have to make each others lives a little easier. Who knows, if the idea takes off, maybe I can convince Mike to add a dedicated Tips section., , I'll even start the ball rolling! Ever notice how the Mouse wheel only scrolls through the visible records of a DBGrid and then stops? You can rectify this by declaring a public procedure., public, { Public declarations }, procedure AppMessage(var Msg: TMsg; var Handled: Boolean);Then just add the following code as the procedure somewhere on your applications main form., procedure TForm1.AppMessage(var Msg: TMsg; var Handled: Boolean);, var, i: SmallInt;, begin , if Msg.message = WM_MOUSEWHEEL then, begin, Msg.message := WM_KEYDOWN;, Msg.lParam := 0;, i := HiWord(Msg.wParam);, if i > 0 then Msg.wParam := VK_UP else Msg.wParam := VK_DOWN;, ... |
 1593 Hits | |
Thread 11 of 25 | | Thread Starter | | |  dibefog | Break a loopCan i terminate a (long) for,while,repeat loop when i'm tired to waiting for the end ,with a click on a button? , , And can i resume it after?, , thank you!! | 4 replies. Last post: |  NevilleRichards | A simple way of breaking-out of a long loop would be to have a pause button which sets a boolean pause variable, and include a test for that pause variable in the while loop (given one of the instructions which enables things to work while the loop is in progress). |
|
 1840 Hits | |
Thread 10 of 25 | | Thread Starter | | |  MerLiN | Help with Animated FormsHi,, I want to make my app disappear when the user double clicks on the title bar (just like a Linux app) so all that remains is the title bar, and when they double click on the title bar again the window animates back to its former self., Can anybody help me with this?, , Merlin | 7 replies. Last post: |  merlin | Thanks for the zip Scott. Unfortunately I couldn't examine it. I'm using Netscape on Linux and when I extracted it from the email it must have stuffed it up. No problem though... I've already found the code I needed for my program., , As for the buttons on the title bar, I know it can be done (although I don't know how). I've got a winamp plugin that puts all the winamp controls on any window that has focus next to the min/close buttons. But as I... |
|
 1443 Hits | |
Thread 9 of 25 | | Thread Starter | | |  MerLiN | Help with resource DLLHi, I've (hopefully) created a resource DLL that contains bitmaps. Can someone show me or refer me to a website that can show me how to access the bitmaps from my app?, , Thanks |
 1106 Hits | |
Thread 8 of 25 | | Thread Starter | | |  dibefog | Arrays of charexample: 'ciao', , it is possible?!? : , , array[1]:='c';, array[2]:='i';, array[3]:='a';, array[4]:='o';, , -----------------------------------, , there is a function that get the seconds from the start of pc?, , sorry but i don't know english very well!!!!!, help me!!!  | 6 replies. Last post: |  dibefog | thank you but i found it!  , the function is: " gettickcount ", it count the milliseconds from the boot of windows., thank you for the help!!! |
|
 1236 Hits | |
Thread 7 of 25 | | Thread Starter | | |  rt | DatesIs it possible when using a standard MaskEdit box to get the system date to appear as a default, or is there some other cunning method to do a similar thing?, rt | 10 replies. Last post: |  rt | You are, of course, quite right as I remembered later! , For some strange reason (drink, insanity, senility etc ... |
|
 1007 Hits | |
Thread 6 of 25 | | Thread Starter | | |  Angel | Random function{Too Long} | 1 Reply: |  NevilleRichards | After the first number, the chance of the next on not being "near" it is 46/48., , After two numbers, chance of another not near either is 43/47., , So the five steps after the first yield probability of, , 46.43.40.37.34/(48.47.46.45.44), , = 0.48, , So slightly less than evens (approximately) that you won't get two numbers next to each other., , Not perfect probability, but I suspect a reasonable approximation. Similar to getting all differnet... |
|
 982 Hits | |
Thread 5 of 25 | | Thread Starter | | |  Gordon ALLAN | Detecting Audio SilenceHi there, I am trying to develop an application that will continuously monitor the Audio Level on the Final Output Stage of a Sound Card in a machine. This is with a view to detecting a lack of audio and then acting appropriately., , Can someone point me in the right direction?, , THanks for now, , Gordon |
 930 Hits | |
Thread 4 of 25 | | Thread Starter | | |  newbie | simple functionHey all, I am quite new to programming (Delphi6 particularly) and need help with a simple function. , I have many editboxes on my form, and would like to create a function that I could call everytime someone enters text in the edit box. I would like this function to chuck this text into a TStringlist that I have created. That part I have, but if someone could provide me with a view of code for the function declaration and implementation, I would greatly appreciate it., , radiobutton1, Choice : TStringlist;, , Thanks in advance., , -Newbie | 2 replies. Last post: |  Scott | Okay, I had Joy move this into the appropriate forum. Now for the reply..., , , , , Typically, what you're attempting is done in an event on the Edit control. I'll assume that the controls you're talking about are all [b]TEdit[/b] controls, and proceed from there., , , , Here's a sample of event code:, , procedure TForm1.Edit1Exit(Sender: TObject);, begin, if TEdit(Sender).Text <> '' then, StringList1.Add(TEdit(Sender).Text);, end;, ,... |
|
 889 Hits | |
Thread 3 of 25 | | Thread Starter | | |  MerLiN | Arrays and Checkboxes/ComboBoxesDoes anyone know how to use arrays with Checkboxes/ComboBoxes. What I want is for the user to select an item in a combobox and if they check the checkbox it will stay checked for that item., , Merlin | 2 replies. Last post: |  ldrews | Aargh! I hate it when I forget the obvious. Look up TCheckListBox. |
|
 1209 Hits | |
Thread 2 of 25 | | Thread Starter | | |  C.Oberhaus | Functions in a DLLHi all, , I decided to start a new thread for this topic, because its a little different from my last one..., , I have a unit which contains misc functions (such as isInteger, padString etc..) and I want to use these functions within various functions being exported from the DLL., , Each of my exported functions is in its own unit within the DLL, and the 'misc functions unit' is in the 'uses' clause of each of these units. Will there be any potential conflicts with multiple threads accessing these misc functions, or are the functions duplicated in memory?, , How do I allow all threads to access these functions without limiting the functions to a single thread (criticalSection) and without duplicating the functions for each exported DLL function (so it bloats)?, , Thanks in advance,, Peter | 3 replies. Last post: |  ldrews | [QUOTE] I presume the same for a function called from a DLL (as long as the function within the DLL does not use global vars within the dll)? [/QUOTE]Yes, as long as all of the functions/procedures in the call tree avoid using global variables, then the whole call tree is threadsafe. Of course, if any function uses something external to the call tree that is not threadsafe, then the call tree loses it's thread safety., , As you probably already... |
|
 1107 Hits | |
Thread 1 of 25 | | Thread Starter | | |  rOobert | operations on pointers... GDI+ translating...I'm trying to use the GDI+ in a delphi application., For now, I'm trying to translate the locking pixel data for writing [URL=http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdicpp/GDI+/GDI+Reference/Classes/BitmapClass/BitmapMethods/LockBits.asp]MSDN example[/URL], , look at this lines :, pixels = (UINT*)bitmapData.scanO;, [...], pixels[row * bitmapData.stride / 4 + col] = 0x..., , I'm wondering how to manage the pixels var : , scanO provides a pointer and array operations on p... |
 1358 Hits | |
 |
|
|