1,899 Topics

Member Avatar for
Member Avatar for MarkHolm

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; …

Member Avatar for Wolfgan
0
402
Member Avatar for Pekulacis

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; …

Member Avatar for Maggy0426
0
309
Member Avatar for MasterMic

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 …

Member Avatar for MasterMic
0
269
Member Avatar for mmhp

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 …

Member Avatar for mmhp
0
143
Member Avatar for max_22

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, …

0
79
Member Avatar for Pundia

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 …

Member Avatar for Pundia
0
376
Member Avatar for Pundia

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 := ''; …

Member Avatar for Pundia
0
826
Member Avatar for taurus3

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, …

Member Avatar for MosaicFuneral
0
471
Member Avatar for pritaeas

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).

Member Avatar for pritaeas
0
139
Member Avatar for Honeydew

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 …

Member Avatar for pritaeas
0
162
Member Avatar for Petrica7

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 …

Member Avatar for Petrica7
0
878
Member Avatar for ChaosKnight11

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. …

Member Avatar for pritaeas
0
117
Member Avatar for DrRodge

If programA starts Delphi programB, is there any way that programB can determine whether it was started by programA or by some other program?

Member Avatar for Wolfgan
0
103
Member Avatar for amberclaw

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

Member Avatar for Wolfgan
0
149
Member Avatar for Crossbow888

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 …

Member Avatar for Wolfgan
0
99
Member Avatar for hariharans87

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 …

Member Avatar for pritaeas
0
178
Member Avatar for Petrica7
Member Avatar for Petrica7
0
204
Member Avatar for thusarix

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

Member Avatar for dhee.outsider
0
1K
Member Avatar for Petrica7

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 …

Member Avatar for Petrica7
0
104
Member Avatar for abulwleed

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 …

Member Avatar for abulwleed
0
90
Member Avatar for ni5958

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 …

Member Avatar for ni5958
0
242
Member Avatar for Petrica7
Member Avatar for Petrica7
0
118
Member Avatar for kayhantolga

[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 …

Member Avatar for kayhantolga
0
137
Member Avatar for Simon180

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!

0
50
Member Avatar for CanYouHandstand

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 …

Member Avatar for Wolfgan
0
126
Member Avatar for mrtony90
Member Avatar for Wolfgan
0
61
Member Avatar for Petrica7

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 …

Member Avatar for Petrica7
0
407
Member Avatar for pritaeas

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 …

0
105
Member Avatar for Finarfin34

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;

Member Avatar for Wolfgan
0
121
Member Avatar for ChuckNZ2002

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 …

Member Avatar for ChuckNZ2002
0
234

The End.