find items that appears twitce in a Stringlist


Hi I have a bug. I can catch the bug when an any item appears more than one in a stringlist. How do you know if an item appears more than once in a stringlist. Or do I need to ...
Posted On: Tuesday 27th of November 2012 12:57:36 AM Total Views:  259
View Complete with Replies

RELATED TOPICS OF Delphi Programming PROGRAMMING LANGUAGE




How to find the reasons for Form's unloading/closing

I have not been able to find any way for detecting the reasons for Form's unloading/closing. How can we find out the reason for which form is being unloaded/closed... OnClose event is not helpful here. I have managed to list the following reasons: - User clicks on the close button - Form is told to close from code - User is logging off Windows - Windows is shutting down - User closes End Task's the program from Task Manager TIA Yogi Yang
VIEWS ON THIS POST

194

Posted on:

Wednesday 19th September 2012
View Replies!

Submenu items

I am trying to dynamically add submenu items using DBS2006, My app hang if I delete all submenu items but works ok if I delete all but one and just edit the properties of the first. Anybody seen this odd behavior and can suggest a more elegant solution thanks, -rvg procedure TfmMain.mnEditCopyToClick(Sender: TObject); var i: integer; rec: TShowName; subMenu: TMenuItem; begin // delete all but the first while mnEditCopyTo.Count > 1 do mnEditCopyTo.Items[mnEditCopyTo.Count-1].Free; for i := 0 to ShowList.Items.Count-1 do begin rec := TShowName(ShowList.items.Objects[i]); if i > 0 then begin // add submenu subMenu := TMenuItem.Create(self); with subMenu do begin Caption := rec.table; Tag := i; OnClick := CopyToClick; end; mnEditCopyTo.Add(subMenu); end else begin // edit first submenu item....\t subMenu := mnEditCopyTo.Items[0]; with subMenu do begin Caption := rec.table; Tag := i; OnClick := CopyToClick; end; end; end; end;
VIEWS ON THIS POST

124

Posted on:

Friday 21st September 2012
View Replies!

How do I find component on palette

Sorry if this is a silly question. But I have Delphi 2007 professional and I want to find the TADOCommand component on the tool palette. It was on the ADO tab in Delphi7 but for some reason I cant find it in D2007. The component shows ok on a project loaded into Delphi2007so it must be there somewhere. What ever happended to configure palette menu
VIEWS ON THIS POST

146

Posted on:

Saturday 22nd September 2012
View Replies!

Delphi Job - Where to find programmers

Hi Im quitting my current job for pastures new and need to help my current employer to recruit a delphi capable programmer quite quickly... job would be in the UK, in the Northwest/Yorkshire area, working from home. Any pointers/resources would be appreciated. ta. KevanB
VIEWS ON THIS POST

171

Posted on:

Saturday 22nd September 2012
View Replies!

Keeping custom data with TImageList items?

Ahmadi wrote: > Hi > I have an object as TImageList, i want keep a custom data with each > item of it (i mean with each bitmap icon of it). How can i that > Maybe you want know why i need to keep custom data with bitmap items > of TImageList, then i must say: The object is first parameter of a > function that im trying to avoid duplication bitmap items loading, i > want keep an identification field as a custom data with each bitmap > item, you can consider that my custom data is bitmap filename. > >
VIEWS ON THIS POST

175

Posted on:

Tuesday 25th September 2012
View Replies!

delphi 5 and findfirst function

I am still happy with Delphi 5 and Windows XP +SP2 Home edition. But I cannot decode the file attribute in my searchrecord. I am using the FindFirst function with srec as the searchrecord. Now when I inspect the found files I find srec.attr to hold an integer with value 8224. The attributeconstants faReadOnly,faHidden,faSysFile etc does not give me such a great number even if I 'or' them all in an integer. Can you explain how to find out how to decode this attr-field
VIEWS ON THIS POST

297

Posted on:

Wednesday 26th September 2012
View Replies!

Adding menus items to the standard TMemo menu

How to append items in the standard TMemo menu (cut/paste/delete)... DH
VIEWS ON THIS POST

100

Posted on:

Thursday 27th September 2012
View Replies!

menu items and &

I'm not sure if I have the right terminology, but if I put a & before a character in a caption, that menu item should have an underscore under that character. This is called an 'accelerator', am I correct I'm currently developing a project which has a menu system. I haven't done a menu system project in a while. I'm using RAD2007 (fully updated) under Vista. Even taking a default MDI application, and when I run it, I can't see any of the accelerators. Yet during design, I can see the accelerator. Can someone point out how I can show them Ed
VIEWS ON THIS POST

89

Posted on:

Saturday 29th September 2012
View Replies!

could not find program

I am getting a bizarre error in Delphi 5 and Delphi 7 when compiling and running a program from the IDE: Could not find program, (path to program) I have many Delphi projects and this error is only affecting one (I hope!). If I remove some source code the program may create the exe correctly, for example I removed the line: Listbox1.items.add('Button Clicked'); and the program exe was created okay as soon as I put back the above code the exe was not created. There are no compilation errors and I have tried with the FastMM4 but this does not help. I do not know where to begin to look to find a resolution to this problem, any help will be greatly appreciated! I am running under Windows XP Home. TIA Barry
VIEWS ON THIS POST

172

Posted on:

Friday 5th October 2012
View Replies!

Reverse engineering a stream - finding the object definition(s)

I need to reconstruct the object(s) from a stream in a file. I'm told it was written from Delphi and it looks like it too (after a short test). I'm trying to reconstruct the stream file using other data, as input to an application. It appears the original source is lost or otherwise unavailable. I can enter data and see how the data is put in the stream. However, deconstructing the whole file looks like a bigger job than I'd like. Is there a shortcut here, eg something that will ****yse the stream and come out with a data structure Am I missing something Andrew -- Andrew Gabb email: agabb@tpgi.com.au Adelaide, South Australia phone: +61 8 8342-1021 -----
VIEWS ON THIS POST

111

Posted on:

Friday 5th October 2012
View Replies!

AV I can't find.

After leaving ReadDATFile but before returning to mnuUpDateCxClick execution goes off into FastMM4, and bombs with the message 'Access violation at addr 005F84AB in MyApp.exe. Read of addr 00000000.' Madexcept doesn't fire. The AV occurs running in and out of the IDE. Pausing and doing a Find Error on 005F84AB points at the line indicated.
VIEWS ON THIS POST

221

Posted on:

Friday 5th October 2012
View Replies!

faulting application! how to find a reason?

I have created server using Delphi, Indy idHTTP, Threads and EurekaLog. I run it as application under Admin account on Windows2003 One or two times in day it crashes without any error, eureka log do not gives error also and windows event viewer show error below. How to find where is the problem in such situation I have no clue what is going on. Faulting application Server.exe, version 0.0.0.0, faulting module kernel32.dll, version 5.2.3790.4062, fault address 0x0000bee7.
VIEWS ON THIS POST

115

Posted on:

Tuesday 9th October 2012
View Replies!

TListBox slow when adding thousands of items

Consider the following code: lstResults.Items.Clear; list2:=Search(searchItem,list); for I := 0 to list2.Count - 1 do lstResults.Items.Add(MyItem(list2[i]).title); The Search algorithm searches list and returns a smaller list (list2) containing results. This part is very fast, even when finding upwards of 100,000 items it only takes about 10-20 ms. Fast enough to search as the user types. On the other hand the for loop that displays the results in a TListBox takes about 5000 ms. Is there a faster way to do this
VIEWS ON THIS POST

94

Posted on:

Tuesday 16th October 2012
View Replies!

Reverse engineering a stream - finding the object definition(s)

I need to reconstruct the object(s) from a stream in a file. I'm told it was written from Delphi and it looks like it too (after a short test). I'm trying to reconstruct the stream file using other data, as input to an application. It appears the original source is lost or otherwise unavailable. I can enter data and see how the data is put in the stream. However, deconstructing the whole file looks like a bigger job than I'd like. Is there a shortcut here, eg something that will ****yse the stream and come out with a data structure Am I missing something Andrew -- Andrew Gabb email: agabb@tpgi.com.au Adelaide, South Australia phone: +61 8 8342-1021 -----
VIEWS ON THIS POST

93

Posted on:

Tuesday 16th October 2012
View Replies!

PeterB: dblRect.Pas= where to find?

Hi Peter B. I was studying and trying Your PrintUtils.pas and could not find DblRect.pas ( only one hit ). Is it still available AND: procedure GetBinnames(sl: TStrings; index: Integer = -1); souldn't it be " VAR sl: TStrings;"
VIEWS ON THIS POST

84

Posted on:

Tuesday 16th October 2012
View Replies!

Show a TFrame that Previously loaded

HI, I have a form with TPanel and TMenu, and I have many frames, when I click on frame name on menu it showed in the TPanel, after few clicks I have multiple instants of the Frames loaded. I want ...
VIEWS ON THIS POST

112

Posted on:

Thursday 15th November 2012
View Replies!

IDE Tool that needs "Run as Admin"

I am running Delphi 2007 on Vista. I have an older tool that hasn't been updated for Vista and it requires me to always right-click and "Run as Admin". I have modified the Properties of this Tool so that the ...
VIEWS ON THIS POST

85

Posted on:

Thursday 15th November 2012
View Replies!

disable items in radio group

Is it possible to disable radio buttons in a Tradiogroup or can only the radiogroup be disabled If possible how...
VIEWS ON THIS POST

88

Posted on:

Thursday 22nd November 2012
View Replies!

Typeconflict when restricting calendar items with datetime on outlook2K3

Hi folks, I've got the following strange problem: When I try to restrict Outlook's calendar items whith something like '[Start] >= 10.12.2007 00:00:00' I've got an exception telling me about a type conflict or an invalid argument for the condition. ...
VIEWS ON THIS POST

79

Posted on:

Thursday 22nd November 2012
View Replies!

RAD studio 2007 IDE won't find source files

, Recently I've been using Delphi6 and it had quite a lot problems to find unit on CTRL+ENTER or CTRL+CLICK on type. And now 2007 version feature is completely useless. First of all it just won't find anything. Secondly it ...
VIEWS ON THIS POST

80

Posted on:

Thursday 22nd November 2012
View Replies!