1,899 Topics
![]() | |
--- Basic Datatypes --- --- Form Management --- --- Data Access --- --- Component model --- | |
You can use any of the commented constants to perform the explained function. You might need to adjust the process privilege on NT based OSes. | |
Assumes the presence of Memo1 on Form1. | |
| |
In case there are mote than one NIC (Network Interface Card) the coe gives the MAC of the first adapter. You can change the 0 on the line qoted below to take the MAC of other NICs if present. "Result := GetAdapterInfo(AdapterList.lana[0]) " | |
This code disables font smoothing for a TLabel component. Can easily be converted for other VCL controls. Loren Soth | |
This program searches the given txt file.And tells you how many there are. Just a reminder don't forget to put the searced txt file in C: or change it accordingly for more info or questions [email]Silver.Lost.Raven@gmail.com[/email] have fun!! | |
It is a small two-in-one calculator that can work as a regular or RPN calculator, selected by a RPN checkbox. It has a four level stack similar to the HP 48 calculator made from four Tmemos. This code shows you how to make visual effects(RPN stack) from existing delphi components. … | |
The code shows you how to create a window without a titlebar that can be dragged with the mouse. Set the FormStyle property to fsStayOnTop. The form contains a small 18 button calculator. When you create the form and calculator components, try to make it tiny, it is cute that … | |
You can look at a selected file's date and time stamp and change it with this Delphi program. XP files need a little extra TLC, but it's taken care of too. | |
A data stream is used to load a bitmap image and convert it to a jpeg image. The converted image is displayed and saved to a .jpg file. | |
This Delphi procedure sends the text contained in a multiline editbox (memo in Delphi lingo) to a printer. The font and font size can be specified. | |
Just to give you an idea what Delphi can do, here is a plot of the ever popular sin(x). I have put enough information into the code comments so you can build the form. The PaintBox Paint Event takes care of the plotting. | |
This is Delphi code, just testing if there is some interest. | |
This simple program will draw several randomly sized and colored lines on the screen. Makes a good screensaver! | |
This is Similar to the Previous Snippet, but it puts indivdual pixels of different colors randomly on the screen. Also makes a nice screensaver! | |
Hi. I have wrote a basic program in delphi to perform calculations. The system the program was wrote on had the region set to English(United Kingdom). Upon testing the software, it will only perform calculations when the system is set in either English(United Kingdom) Or English(United States). If i set … | |
HI, Which changes I must to make in this program about (UDP Chat) which you may find on [url]http://delphi.about.com/library/weekly/aa101105a.htm[/url] To work on one computer simulate 2 clients, concerning with start two times on this program On same Computer I want to have two clients!! Is it possible? With Regard Janev … | |
Dear Sir, I work in Delphi 6 a few years. Now I was beginning in Delphi network and I need some help maybe in source code Or advice for following: I have chat application and have two peer to peer clients, and I want to start one procedure (For example … | |
Dear ALL, I have tried to demonstrate the card game problem by myself. The card game is come together with 52 cards. It has Spade, Heart, Club and Diamond - Spade > Heart > Club > Diamond. It has the integers and chars 2,3,4,5,6,7,8,9,10,J,Q,K,A. Could you tell me how can … | |
I'm trying to find a low-cost or free Memo control that is normally closed like a combo-box or datetimepicker, and opens in a similar manner. I want to fit one more memo controls on a dialog, but I'm finding that presenting a standard TMemo of reasonable size just takes up … | |
Dear Sir, I have made a question by myself. For example: I am playing the card game to my friend. The card has Spade, Heart, Club and Spade as usual but no number. How can I do if I only play five time and finally there is a record of … | |
Hi ppl, I am having a problem with playing mp3's in my program. Let me explain, I am writing a program for my choire, I need to do it in a low base languege like pascal since the systems used are not great. My program is writen on exact timing … | |
Hey Dudes and Dudets, The program I'm writing requires a string of 200 char, the max for a string is 255, so everything works fine, if I readln the text more than 80 charecters (wich is eol) then it truncates and goes to next line, cool, but if I put … | |
Could you mind telling me what can I do for the following question? To write a skeleton program for the assignment. It should have a menu system with at least 5 options. The menu keeps repeating after each procedure is called. When one of the procedures is called just return … | |
i have 1 combobox and i have auto Assign stringlist from advstringgrid its working ok . I need to activate filter sorting condition based on select string from combobox. hire is buton comand it work fine [code=delphi] advstringgrid1.Cells[9, 0] := 'some word '; CheckBox1Click(Sender); I need ,, ('some word';)" to … | |
Dear All, Could you mind telling me how to code with the card game? It has 52 cards and it comes together with Spade, Heart, Club and Diamond. There are 2 people play together for 8 times, after it, we will get the result of it. Cheers, | |
hi, whenever i try to write records into the file, only the first piece of records can be written. even some simple program like the following cant work properly. [ICODE]type thing=record name:string; end; var f:file of thing; data:array [1..2] of thing; i:integer; begin assign(f, 'infile.txt'); rewrite(f); data[1].name:='name'; data[2].name:='second'; for i:= … | |
Count Lines Of Text In Txt File hi i have text file ex. (sample.text) and i need to count lines in file and disply in memo . I have small examp but this not work any sugestion. [code] function linecount(filename: string): integer; var f: textfile; begin assignfile(f,filename); reset(f); result:= 0; … | |
Dear Sir, Could you tell me how can I do the following question? A positive integer is entered from the keyboard. If it's even, all even integers from 2 up to and including the entered integer are displayed. If odd, all odd integers from 1 up to and including the … | |
hi i have problem to use doscommand haw to install an use plise help. hire is doscmd [url]http://maxxdelphisite.free.fr/doscmd.htm[/url] | |
How to get combobox.items from MS Access database? I'm using ADOTable and Datasource to get database into DBGrid. | |
hi, i am working on a project to write data into the file and use a search enginee to get the data back. i was advised to use record but i didnt learn record at school. i tried to google it but came up with no solution. that's so far … | |
i have 4 memos on a page 3 of them are single line and the last is a large memo. Memo1 Memo2 Memo3 and Memo4 now for memo 4 i can use [code]Memo4.Lines.SaveToFile (SaveDialog1.FileName + '.txt');[/code] that works perfectly, but i want Memo1 2 and 3 saved to the same … | |
I have a problem with Tcomport. This is usage for writeing to ComPort. [CODE]b:byte ComPort1.write(char(b));[/CODE] How do i use [CODE]ComPort1.read(Buffer:pAnsiChar;Count:integer):integer;[/CODE] Thanks! | |
Guys, Im in desperately need of help, and I need the whole program to be written, as I dont understand anythuing in pascal haha. Thanks for any help, I really appreciate it! By the way, this is also my first post here, yay :D | |
Hi All, This is probably a stupid question, and I could have easily written a small function that loops over the values and selects the first match... but I'd prefer to use the built in way - if there is one. Is there a built in function to select a … | |
Hi I am using named pipes to transfer text between vc++ and delphi. The delphi code is shown below: [CODE] procedure TForm1.OnServerPipeMessage(Sender: TObject; Pipe: Cardinal; Stream: TStream); var S : String; begin SetLength(S, Stream.Size); Stream.Read(S[1], Length(S)); Memo1.Lines.Add(S); end; [/CODE] The problem i face is that I am able to receive … | |
hi expert, first of all, i have to say sorry for my poor english.i am working on a phone-book project and come across a big problem. my approach: 1. i ask to users to identify the type of data he would like to search,eg, name, tel no 2. i ask … | |
I'm trying to do program to basic operations in math. So, I want that the program calculate for example 3*2+4 etc. I already did something, but it needs upgrade. The problem is with division (/). Everything I write it's always the same result- 0. I don't know why. It is … | |
Please C++ TO Delphi [CODE]IMAGE_NT_HEADERS* inh; IMAGE_SECTION_HEADER* ish; DWORD newRVA = (ish + inh->FileHeader.NumberOfSections - 1)->VirtualAddress + ((ish + inh->FileHeader.NumberOfSections - 1)->Misc.VirtualSize + (inh->OptionalHeader.SectionAlignment - (((ish + inh->FileHeader.NumberOfSections - 1)->Misc.VirtualSize % inh->OptionalHeader.SectionAlignment) ? ((ish + inh->FileHeader.NumberOfSections - 1)->Misc.VirtualSize % inh->OptionalHeader.SectionAlignment) : inh->OptionalHeader.SectionAlignment))); newSecSize = (newSecSize + (inh->OptionalHeader.FileAlignment - ((newSecSize % … | |
I am trying to create an application that allows one to browse a .MDB file to add/edit/delete basic personal information for fraternity alumni. It is something that I have been casually doing in my free time with little trouble, however, I have run into a snag recently. I have a … | |
Hello! I was looking for the answer here but I couldn't find: [url]http://www.freepascal.org/port.var[/url] . I've got old code in Turbo Pascal and I try to run it on Dev-Pascal 1.9.2. (I also tried Lazarus application, but there was "Error. Project raised exception class 'External: SIGSEGV'."). [code]Free Pascal Compiler version 1.0.6 … | |
Can anyone give me a solution for this? the program should output how can the chemical equation be balanced (which are the coefficients) 28th ACM International Collegiate Programming Contest, 2003-2004 Asia Region, Tehran Site Balanced Chemical Equations Sample Input 3 HCl+CaO2H2=CaCl2+H2O HCl+H2SO4=NaCl HCl+NaOH=NaCl+H2O Sample Output 2 1 1 2 IMPOSSIBLE … | |
Dear Sir, Could you tell me what is (are) wrong of the following answer:- Question:- Create the first half of a game of rock, paper, scissors. Ask the user for R, P or S. Get the computer to generate 0,1or 2. Now convert the computer’s number to R, P or … | |
Hi all. I'm writing a little program that paints and animates its own form in response to the user's mouse gestures. The weird thing is: Whenever the [B]BDS Delphi 2006 is running[/B] and I run my application, I get a framerate of about 25 FPS. If I terminate BDS but … | |
Hy everyone! First I vould like to say that your great! I find lots of solutions here fom my programing problems. I would like to write a calculator in Pascal/Delphi with scietific functions. For example: if I write [1,2,3]+[3,2,1], program return [4,4,4]. Does anybody have an idea how solve this … | |
Dear ALL, Could you tell me how can I get num1, num2 and Output 2 for the following programme. [code] program Project2; {$APPTYPE CONSOLE} uses SysUtils, ourcrt; var num1, num2: integer; begin num2:=0; repeat num1:=num2+1; if (num1 mod 2=1) then begin writeln(num2); end else begin num1:=num1+1; end; num2:=num2+1; until num2>4; … | |
Dear Sir, I have got the answer of the following question but I do not understand why it has been done in this way: 3. Your task is to create a game of Heads or Tails against the computer. Write a program that asks the user for Heads or Tails, … | |
Hi! I have a problem, again. I would like to write a program to integrate functions. If I write to console integrate(polynom, lower limit, upper limit). I already write function which seperate polynom, now I don't know how to calculate whole thing. Example: integrate(x^2+3,-1,2) solution: 12 |
The End.