1,899 Topics
| |
This seems to work well until I try to create the 11th button. Any suggestions? [CODE] procedure TForm1.FormClick(Sender: TObject); var nb: TButton; begin Inc(n); nb := TButton.Create(Self); nb.OnClick := ButtonClick; SetLength(ca, n); ca[n] := nb; ca[n].Left := 8; ca[n].Top := (((n - 1) * nb.Height) + 8); ca[n].ParentWindow := Form1.Handle; … | |
I hope that someone can help me with this problem. I need to allow only characters in input: Example I have procedure to add records to my database [CODE]procedure AddRec( var fff:Myfiletype; FileOpen: boolean); var rec:myrec; tmp:MyFileType; begin assign(tmp,'data.tmp'); reset(fff); rewrite(tmp); seek(fff,0); while not eof(fff) do begin read(fff,rec); write(tmp,rec); end; … | |
I've taken 1 course in Java and 1 in C++ and now I'm tinkering with Python (love it so far). My module I'm currently working on is designed to solve a certain puzzle. To understand the code you'll need to understand the puzzle: There is an upside down triangle with … | |
Hi, I'm trying to learn delphi. I'm writing a binary tree unit and so far I only have insert and check size. I'm having trouble with inserting a new node into a nonempty tree. Got access violation at runtime and while in debugging mode, the value of sRoot^.Data is in … | |
hi!I have a problem. There's the Access database embedded into dbrid using ADO. In db there is a list of goods,quantity and countries where goods were produced Now I have to build a diagram for db, for example for countries. It works quite well but the diagram shows EVERY good, … | |
Hi people, I'm trying to make a program that reads and counts words and their frequency. After a few days trying I just make the program read a text, counts the words and everything BUT just if there's no more than one ' ' space character at a time. And … | |
Hi, I want to sort a TStringList but not by the strings in it, but by the Objects. Here's my code: [CODE]var i : integer; iCount : integer; idxFound : integer; someText : string; s : TStringList; oneWord : string; aux : integer; begin someText := memo_txtfile.text; oneWord := ''; … | |
The combinations function C(n, k) is usually defined in terms of factorials, as follows: C(n, k) = n!/(k!*(n-k)!) The values of C(n, k) also leads to the Pascal Triangle: C(0, 0) C(1, 0) C(1, 1) C(2, 0) C(2, 1) C(2, 2) C(3, 0) C(3, 1) C(3, 2) C(3, 3) C(4, … | |
SetAutoSubClass() has been deprecated in newer versions of Delphi. Can anyone tell me what to replace it with ? I cannot find it in the Delphi 2009 OLH, nor in the VCL source (Forms). | |
Write a program that accepts a student’s name, form class, and number of books borrowed for the month of October. Determine the name of the student that has borrowed the most amount of books during the month of October and displays in certificate-form the student with the highest number of … | |
How do I detect that a drive is internal or connected to a USB port? For example I now the letter of a partition from that drive. If I use GetDriveType on one connected to USB it says that it is fixed not removable. I found some code with witch … | |
Hi, I have a fancy animated GIF loader that I want to use in projects, but the problem is that the image is only 48x22. Is there some way I can tile the image horizontally to lengthen it? The only solutions I found on the web was with bitmap images. … | |
If programA starts Delphi programB, is there any way that programB can determine whether it was started by programA or by some other program? | |
Hi, i´m quite new in pascal programing. Can someone explain me please why [CODE] function kolik(pocet:integer; retez: string):integer; var p: array[1..pocet] of integer; pomocna,j,i,k,l,od,nep:integer;[/CODE] is compiler telling me p: array[1..pocet] of integer; cannot evaluate this expression? Thank you in advance | |
Hi, New to programming. I have three Editboxes and a button - I would like to know how to make Button1.Enabled := true when all editboxes have at least one character of input and := false when even just one of the editboxes has no imput in it - is … | |
Hi, I have PIC32MX795F512L. I have used the "USB Host - MCHPUSB - Generic Driver Demo - PIC32 USB Starter Kit II.mcp" Firmware. I am very new to Delphi. So I have copy and paste the code from [URL="http://www.sixca.com/delphi/article/microchip_usb.html"]http://www.sixca.com/delphi/article/microchip_usb.html[/URL] It is working fine. I want to use the UPDATE_LED (change … | |
Is it possible to lock a drive, write something on it and unlock it...? | |
the title it's self explanatory i am using freepascal with the Lazarus IDE and this is quite a challenge for a noob like me so please the code with some explanation | |
I'm making a small program for a tvtunner. One of its functions is the ability to change audio level (master/wave/linein...). In Windows XP works fine. In Vista/7 I know only IAudioEndpointVolume interface. It works only for master volume. So, until I will find a better solution, I start the program … | |
Hi , please I am a student in economy so I don't know any thing about programming but we have Delphi course in our courses. so the doctor request from us a small project from every student and it is 25% from 100% from all marks in the course. so … | |
i have a little program that searches for[URL="http://en.wikipedia.org/wiki/List_of_perfect_numbers"] perfect numbers[/URL]. now it took it 36 minutes to get to the 5th number(and last one for longint) which is 33550336. as it worked i noticed in the task manager that it only used 25% of cpu the whole time and the … | |
I searched on Google for hours and couldn't find anything useful. Thank you for any reply. | |
[IMG]http://letscoding.files.wordpress.com/2010/12/4.jpg[/IMG]Something goes wrong but I can find it!! plese help!! run program and enter from 12 or larger [CODE=c] //Tolga Kayhan © 2010 //Let'sCoding #include <stdio.h> #include <stdlib.h> //Pascal triangle in this example contains int factorial(int); int C(int,int); void space(int); void writer(int,int); int main() { int last,sender; do{ printf("Enter a … | |
Hello, am currently using overbyte sockets in delphi and am wondering what is the best way to send code commands ? am currently using in my system [code] sendstr('comand'); [/code] but am wondering if there a better way more stable and faster? thanks for the advice! | |
Hi All I've been working on a program that automates a test sequence for testing a product before it is sent to the user. The program controls 12 test stations. There is an object that controls the interactions with each station (12 instances total). One of the challenges of the … | |
(infor[1].name) how can I remove the (.) from (infor[1].name) | |
Hi. What is the fastest way to create a file of a specific size (preferably without writing in it) on a nonNTFS partition..? On a NTFS I use this: [code]var tf: TFileStream; begin .... tf := TFileStream.Create(FileName, fmCreate or fmShareExclusive); tf.Size := [desired value]; tf.Free;[/code] It's very fast. But, for … | |
I'm in the process of converting a legacy app from D5 to D2009. I'm getting errors on AnsiToNative, NativeToAnsi (both DBTables) and DbiOpenSPParamList (BDE). Apparantly the parameters for these functions have changed. Does anyone here have a ready example on how I should use these in D2009 ? I was … | |
Olaylar= record 1024Bytes = array[0..1023] of byte; OnRx: procedure(const RxBfr: 1024Bytes; const DataLen: word); stdcall; OnTx: procedure(const TxBfr: 1024Bytes; const DataLen: word); stdcall; end; | |
I hope that you folks can help? I have ten IP cameras strategically located around my property. I capture video from these cameras with no problems. The cameras have the ability to pan and tilt, if I send commands to them. I can send something like the following to the … |
The End.