2,103 Topics

Member Avatar for
Member Avatar for garden4ork

Hello again, pretty simple question this time I would think. What I'm wanting is to be able to add 5 minutes onto a ttime variable. As what I'm trying to acheive is a queue system. (Time + QueueTime) and (QueueTime := QueueTime + ProductTime) However I get the basics, just …

Member Avatar for DelphiGuy
0
118
Member Avatar for triumphost

I'm trying to convert this (Pascal) to C++.. My attempt is below this.. [CODE] function CompressString(const Str: string): string; var Destlen:longword; begin result := ''; Destlen :=BufferLen; if length(str) < 1 then exit; if compress(BufferString,destlen,PChar(Str),length(str)) = Z_OK then begin setlength(result,Destlen + SizeOf(Integer)); PInteger(@result[1])^ := Length(str); Move(bufferstring[0],result[5],Destlen); end; end; [/CODE] [CODE] …

0
82
Member Avatar for DelphiGuy

I'm working with this rather popular DrawDisk procedure which pretty much anti-aliases a circle and draws it, filling it and the background in the process. At the moment the procedure call only lets you modify the background color of the WHOLE canvas and the fill color of the line. Have …

Member Avatar for DelphiGuy
0
226
Member Avatar for garden4ork

Hey, I'm having trouble transferring a single row of data from a StringGrid through a Client/Server module and then add the row onto another StringGrid at the other side. I keep getting array errors which would make sense however surely you can just take a row and add a row? …

Member Avatar for garden4ork
0
132
Member Avatar for triumphost

I did not know WHERE to ask this as there is no "General" section on the site this site that I know of. Lets say I found code online but it's under the GPL 3 License.. I read it but it doesn't say that I cannot translate it from Pascal …

Member Avatar for mike_2000_17
0
103
Member Avatar for DelphiGuy

Hello, basically I want to have two TImage components, one I will use and using the Bitmap tools in Delphi I will create a background. In the second TImage I will create objects which move around the custom background but I still want the first TImage to be visible. The …

Member Avatar for pritaeas
0
470
Member Avatar for straylight

So I have been working on Pascal's triangle and going about it a different way then most. I am attempting do to a series of if and elif statements to check for the values in rows and columns of those rows. However my novice skills in python are stopping me …

Member Avatar for straylight
0
240
Member Avatar for DelphiGuy

Hello, basically I am making a program which uses OOP to draw objects onto a canvas and they constantly move, I am making a feature which will save the position variables as the objects move each time and then once a file is outputted it can be read again and …

Member Avatar for pritaeas
0
152
Member Avatar for DelphiGuy

I'm having trouble getting GDI sample codes to work, I've seen the external packages and downloaded them but I couldn't get the same code to work and I believe it's because I don't know how to install the GDI packages properly, can anyone help me?

Member Avatar for DelphiGuy
0
209
Member Avatar for pit1

help me on how i can write a program for solving integrals using recursive subroutines for example: For given borders integrating A and B. calculate value a certain integral of the form: integral(1,x/((cos)^(n))x={((1)/(n-1))·((sinx)/(((cos)^(n-1))x))+n-2/(n-1)integral(((,x)/(((cos)^(n-2))x)) if n≥2 equal to lntan(pi/4+x/2)if n=1 and equal to x if n=0.

0
72
Member Avatar for garden4ork

I'm sure this is very simple and I'm missing a trick or something, but all I want to do is write something in a memo, click a button to save to a textfile and then be able to change the memo, click the button again and add what has been …

Member Avatar for pritaeas
0
92
Member Avatar for DelphiGuy

Basically I have a object class like this: [code] Type TSomething = Class Private Blah : Integer; Public Procedure DoSomething; End; Type TSecond = Class(TSomething) Public Procedure DoSomethingNew; End; [/code] [code] Procedure TSecond.DoSomethingNew; Begin ShowMessage(IntToStr(Blah)); End; [/code] ...and the code to call the classes is: [code] Try Something := TSomething.Create; …

Member Avatar for DelphiGuy
0
156
Member Avatar for Scottie_uk

I am a mainly Java and VB programmer. However, I am writing a program that generates computer code in various languages. One of these is Pascal. What I am asking is simple. To detemine the size of an array in Java and VB I would enter: [code] anArray.length[/code] What is …

Member Avatar for Smileydog
0
6K
Member Avatar for Dornio-san

Hi, I'm looking for with some pascal code. I have to make a program which allows you to input a name and an amount four times. Then it is supposed to output the name, three percentages of the amount and the maximum of one of the percentage out of the …

Member Avatar for Smileydog
0
396
Member Avatar for hasbi

Uses crt; Const M=5; Var A : array [1..M] of Integer; i,x : Integer; dapat : boolean; Function Cek(angka:Integer;batas:Integer):string; var Awal:integer; Begin For awal:=1 to batas do Begin If A[awal]=angka then Begin Cek:='Angka Sudah Ada !'; dec(i); End Else Cek:='Angka benar !'; End; End; Begin Clrscr; Writeln('Pencarian dengan fungsi Logika'); …

Member Avatar for pritaeas
0
94
Member Avatar for AKJo

An application from Delphi 1 (16 bit) has been transferd into Delphi 2007. The main form is always shown behind all other forms, whatever I do. How can I get the normal action from the form, so it is shown on top when it is active. Thanks in advance

Member Avatar for DanHamm
0
1K
Member Avatar for cubicbox

Hi everyone, I'm now nearly finished with my project which tells us to write a PASCAL program for entering the information of the employees. However, I came across a BIG problem is that I've got no idea on how to edit records in the text files or delete unwanted data …

Member Avatar for pritaeas
0
3K
Member Avatar for DelphiGuy

Heya guys, basically here is some code for a simple example program: [CODE] unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, ExtCtrls; type TForm1 = class(TForm) img1: TImage; procedure FormCreate(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form1: TForm1; …

Member Avatar for DelphiGuy
0
2K
Member Avatar for BorisSobad

Making a logbook using editbox for entries that fill a listbox. I have two enter buttons. One would enter line in Red one in Black but I don't know how to change the font color in the listbox. My first pascal program and this is the last step for completion.:( …

Member Avatar for pritaeas
0
660
Member Avatar for RussCA

I bought a Wacom Bamboo Pen Graphic Tablet. The software which came with the tablet is way below my needs/expectations. I found some sample prgrams from Wacom that require Microsoft Dev Studio C++, which I do not have. But I DO have Delphi Pascal 2007. Does anyone know of any …

Member Avatar for dangerstick
0
408
Member Avatar for freakvista

Hello again. So lately i've been learning java, and now i want to make a program but in this program i need to do something like in pascal record(i want to make an array, and in every element of this array i have a string and an int). I heared …

Member Avatar for dmanw100
0
123
Member Avatar for Krefie

hi Guys/Gals OK my question, it seems complicated why I want to do it this way but I have my reasons ^_^ I have 3 Forms, FormBlue and FormRed and FormFunctions Now, the code in FormFunctions e.g. **** uses Blue, red **** FormBlue.label1.color := clBlue; FormBlue.edtBox.text := 'Bla'; OK so …

Member Avatar for Krefie
0
202
Member Avatar for Jimakoss

hello people of DaniWeb! This is my first post.I gotta tell you that my head is going crazy lately.I am 18. So what's the case? Alright last year I gave some really really really hard exams in my country Greece.I suceeded. I got into the university at the Department of …

Member Avatar for WolfShield
0
316
Member Avatar for heatdav

Hi. I'm not sure if Delphi can do this, but I'm trying to create a variable that I can create once in the code and can't be changed, after its created. On the surface, it looks like I want a const, but I'm trying to create a variable which is …

Member Avatar for pritaeas
0
76
Member Avatar for triumphost

In pascal, you can have something like the following: [CODE] type TPoint = record X, Y: Integer; end; TPointArray = array of TPoint; T2DPointArray = array of TPointArray; [/CODE] In C++ I tried to replicate this and failed miserably. [CODE] struct Point { X: Integer; Y: Integer; }; struct PointArray …

Member Avatar for triumphost
0
7K
Member Avatar for Soft_Buffalo

I have a program I am trying to write. It is very basic but I'm not sure how to implement this specific function. Basically this is what I WANT my code to look like; Date Day Availability 1 Monday Free 2 Tuesday Free 3 Wednesday Free 4 Thursday Free 5 …

Member Avatar for pritaeas
0
96
Member Avatar for scrypt3r

Hello all, i just started making a simple text-based console game for a computing class project. I have all my code working, but cannot find any code to- 1. Enable/Disable the console updating: When drawing the character, as well as multiple other objects on the console, sometimes you are able …

0
72
Member Avatar for triumphost

Hey all, I'm trying to make a DLL that can be used in Pascal to enable multi-threading. I've decided I want to export Threads in C++ to a DLL. Before I make DLL's I usually write the program first to test everything then I convert it to a DLL. [CODE] …

Member Avatar for nezachem
0
163
Member Avatar for Karlwakim

Hi everybody, Is pascal still used in big apps ? Is it true that skype is written in pascal ? What is it most used for ? Thanks.

Member Avatar for AceStryker
0
100
Member Avatar for hasbibulukumba

[CODE]Program arrprog; Uses crt; const max=20; add='Add Student File'; edit='Edit Student File'; del='Delete Student File'; vi='View All Student File'; Type Tdata = record id:string; nm:string; jr:string; sm:string; End; Var data:array [1..max] of Tdata; i,ls:integer; Pil:char; Procedure menu; Begin Writeln('Student Data'); Writeln('----------------'); Writeln; Writeln('1. ',add); Writeln('2. ',edit); Writeln('3. ',del); Writeln('4. ',vi); …

Member Avatar for AceStryker
0
349
Member Avatar for Fireprufe15

I'm programming a Yahtzee type game, but I have a problem checking for the different scoring types. So far I have everything but Full House, Small Straight and Large straight. It works like this: There are 5 variables (the dice) that are randomized to something between 1 and 6 every …

Member Avatar for Fireprufe15
0
130
Member Avatar for Fireprufe15

I am making a small game, just to sharpen up my Delphi knowledge before school starts again, and also to show of to my friends. So in this game I have five integers and I need to check if at least three of them equal each other. How would I …

Member Avatar for pritaeas
0
139
Member Avatar for Morten Brendefu

Dear enlightened ones. First of all. I am using Delphi 9. My code compiles and run with no error at all, still I am confused about the structure window in the Delphi window. It tells me that I have redeclared some identifiers. The thing is that I have a few …

Member Avatar for pritaeas
0
1K
Member Avatar for ebc3142

Hi, For a homework assignement, I'v been asked to write a small school administration system. Currently, the user is able to enter a new student and their age which is then stored in a text file. This all works fine but now I need to load the contents of the …

Member Avatar for Morten Brendefu
0
633
Member Avatar for Jiggle

Hi guys, new to this region of the forums. I recently converted from Windows 7 to Ubuntu 11.04 - and an having a nightmare of a time getting free pascal to work. Lazarus is really not looking like a good option at the moment - I would be much happier …

Member Avatar for wpeckham
0
115
Member Avatar for Neub

Hi, I'm looking to write a program that sets and gets responses using SNMPv1. I will be using Borland Delphi v7 or 8. I have been using PERL prior to looking at Delphi but I have had problems setting two OID's and sending them in the same packet rather then …

Member Avatar for pritaeas
0
107
Member Avatar for d34dflowers
Member Avatar for triumphost

Hey all, I'm a c++ programmer and I'm REALLY new to pascal. I want to translate some of my programs into pascal just for the experience. The thing is, this Lazarus compiler is soooo confusing! All the windows are split apart.. How can I join them? Next is how can …

0
89
Member Avatar for Simon180

Am looking for a way to search a listview for selected captain items and then for it to remove all the items that were found. demo idea to loop full list to find search string that can be changed via edit and then to delete all items that are the …

Member Avatar for pritaeas
0
135
Member Avatar for redrobby02

Hi i need to read the last 14 Entries made into a typed file and then list the entries in a StringGrid so i can copy them to label captions later. I am a little unsure how to write the Code to loop for the last 14 Entries. the current …

Member Avatar for Morten Brendefu
0
197
Member Avatar for crapped

Well is there any built-in function to do this ?, or 3rd party library EXAMPLE code [CODE]source := Sock.Get('http://www.google.com/'); if source('Google Search Engine', a) > 0 then begin NeededPattern := GetPattern(source, '<font>','</font>'); result := neededPattern; // will display ABC of the <font>ABC</font> end;[/CODE] Then it will get the middle of …

Member Avatar for pritaeas
0
151
Member Avatar for AceStryker

I need to create a KeyStroke encryption, i studied about it and the theory is this: [LIST] [*]Check the keystate before keyloggers do it [*]Cancel the action of the key [*]get the active window [*]Simulate a virtual key in this window [/LIST] I can make the last three items, but …

Member Avatar for Morten Brendefu
0
217
Member Avatar for Morten Brendefu

Dear knowledgeable ones. Some time ago I made a few of my routines kind of universal, and I wonder if there is any way in Delphi (My version is Delphi9) that can be used to reuse this code in example below. As you see, the two procedures are almost identical, …

Member Avatar for pritaeas
0
284
Member Avatar for Morten Brendefu

There are many places on internet for great help regarding many things. Proper implementation of really fast routines for sorting data however is not common. I am not claiming these routines to be the fastest around, but their ease of implementation and use may make them welcome. As a thank …

0
247
Member Avatar for alvin_aldrich

Hi I need help on converting the sample c++ code. Can someone please help. Any help would be greatly appreciated. :D struct sample { int type; long arg1, arg2; }; struct sample sampletable[2][3] = {{{ 1, 0, 0 }, { 2, 0, 0 }, { 1, 0, 0 }}, {{ …

Member Avatar for Sten Ove Larvin
0
437
Member Avatar for Morten Brendefu

In my Delphi9, I have the ability to "Shrink" complete procedures and functions so that only the first line is visible. There is a small + or - at the beginning of first line of a routine, and when pressed, the code is 'minimized' or 'maximized'. I find this to …

Member Avatar for pritaeas
0
266
Member Avatar for OASys1

Greetings, I need to have a way to veiw/print reports designed in MS Access in my Delphi application. I have a MS Access 2007 db for the backend of my Delphi2010 application. I have reports I had defined and saved in my Access db. I would like to place a …

Member Avatar for OASys1
0
448
Member Avatar for EnderX

Does anyone know of a good site or doc that describes the ways to use a TStringGrid? I'm trying to figure out how to right-justify some of the items that are going to be placed into a TStringGrid, and none of the docs I've found so far seem to have …

Member Avatar for Micheus
0
162
Member Avatar for vegaseat

Python does not have a type like struct in C or record in Pascal, but it can be easily implemented with a class. This little code snippet shows you how to do it.

Member Avatar for Gribouillis
0
4K
Member Avatar for mitster

Hey guys, im trying to use an IF statement in the SETUP portion of the script for my inno setup installer, i want it to test for the boolean condition of a radio button defined in a 'procedure' in the CODE section, is this possible, how would i do it? …

Member Avatar for Morten Brendefu
0
111

The End.