D2007 problems with GetWindowText and MainFormOnTaskbar


I have discouvered that since I upgraded to D2007 I am having problems with a procedure that tells me how many other instances of my application are running. function GetCurrentExeCount: integer; var hPrevInst : Thandle; sfClassName: PChar; begin hPrevInst ...
Posted On: Thursday 22nd of November 2012 11:15:13 PM Total Views:  245
View Complete with Replies

RELATED TOPICS OF Delphi Programming PROGRAMMING LANGUAGE




d2007 & runtime error 255

I have an app that runs on a flash drive and one of the functions is to make a clone of itself to a new flash drive. that works fine. At the end I tell the user to put back the original flash drive or continue working on the new one. When the dialog completes, if they leave the copied flash drive in place the program seems to work but doesn't. A separate empty window opens with the programs name but no content and it does nothing. I decided to restart the program at the end. My first approach was to to a postquitmessage followed by a shellexecute. That actually worked but after the program restarted, the cursor remains an hourglass for a bit and then a "This program performed blah..blah..blah" message popped up and when you close it I get a dialog box with Runtime error 255 at 0042021C. When I looked at the technical details it said "inpage error at ...". Nothing on Google for error code 255 seems relevant. I googled "restart Program" and found nearly the exact same thing I was doing except it was shellexecute first and then appliation terminate. I changed to that and it still fails exactly the same way -- every time. I tried this on vista and I get no such error messages. Note when I accept shutting down the program, the new instance works just fine so the error must be coming from the old instance. I'm just about ready to make a batch file to restart the program. Anyone have a better idea or know what the 255 error relates to Mostly I'm working in xp-pro on a ms vm on a vista business machine so I can't actually test the program there. I use a separate machine with xp-pro to test but the error also happens on XP-Home. --
VIEWS ON THIS POST

257

Posted on:

Wednesday 19th September 2012
View Replies!

d2007 help again

I love Delphi and have been using it since D2. I'm am becomming so angry with the help system. I do ONLY win32 development in pascal/delphi. I want to turn off Visual Basic, J++, C++, JScript, ..net, .net compact framework, and actually except for specific projects, blackfish Sql, dinkumware, indy, intraweb and rave reports. I don't want to just turn on Language Delphi or Platform SDK or Rad Studio or Rad Studio for Win32 Platform. What the hell! If I know which area the help was in, I most likely wouldn't even need the help. I see improvement in the help content -- when I can actually find what I'm looking for but the index and filtering system totally sucks--as well as the full 30 second delay the first time you invoke help or when you set a filter. Why not provide a simple check box for each of the filters that would let us UNCHECK the content that has no bearing on what we're doing and then make it stick until we change it. Even when I filter for Laguage Delphi, C++ articles still show up in the results I find. Anybody know if there is there a way, maybe in the registry, to turn off the elements that are of no relevance to the task at hand I find myself using the old d7 help most of the time and that's fine except it's a bit dated esepcailly on some things. --
VIEWS ON THIS POST

230

Posted on:

Saturday 22nd September 2012
View Replies!

Code templates d2007

I saved the delphi feeds article "Code Template - Property with Getter & Setter" from June 30th, and saved the file in the c:\documents\radstudio etc. pasting the link from the article into the explorer navigation bar to be sure I got it right. Then I started d2007 and tried it and it doesn't show up. I looked in help under code templates and saw this at the end: To add a template: Choose ToolsOptionsEditor Options. Click the Source Options tab and then the Edit Code Templates button. In the Templates section, click Add. Type a name for the template after Shortcut name, enter a brief description of the new template, and click OK. Add the template code to the Code text box. Click OK. Only problem is I don't see an "Edit Code Templates" button anywhere in the tools|Options page. I don't have a lot of time to play with this but thought this template was interesting. As I recall, last time I played with these was with d2005 and then I believe the only way I could get them to work was to save them in the borland program files code templates folder. Obviously I'm missing something here. --
VIEWS ON THIS POST

189

Posted on:

Monday 24th September 2012
View Replies!

d2007 and packages

Hi all, I've recently started heavily using d2007 and decided to upgrade an application from d7 to d2007. The program makes exclusive use of RT Packages and in d7 I've had very few package related problems. I can't say the same for d2007. Are there any known IDE/Compiler problems with using packages under d2007 Here is a short list I've found just from my own experiences over the last couple of days: - IDE gets very confused when dealing with multiple packages. I've coverted a number of d7 packages for this application to d2007 and the new dproj files contain references to other packages that I'm not even working on at the moment. - design time packages have problems with .dcr files being listed in them. they constantly want to try and remove the file references, even though the .pas files are not listed in the package. - the d2007 compiler seems to barf alot with Internal compiler errors when trying to build applications, or even packages, with no reference as to what file could be causing the issue. Yet d7 has no problems with the exact same code base!! Am I in the minority with trying to use delphi to build applications using RT packages Any suggestions on how I can possibly track down and fix my package problems Ryan
VIEWS ON THIS POST

243

Posted on:

Tuesday 25th September 2012
View Replies!

Font.color don't change on d2007/vista

What's happening is very strange. On my Delphi 2007 enterprise registered version (updated to the last) installed on Vista Business sp1 I can't change the font color of many standard vcls like TRadioGroup, TCheckBox and others. Anyone who have experienced something like this Suggestions
VIEWS ON THIS POST

255

Posted on:

Tuesday 25th September 2012
View Replies!

importing flash activex into d2007

Did you create a new package In D2007 you need to install the package (and can't just import the ActiveX). Basically: - File->New->Package - import the ActiveX and make sure you select option to add control to package - you can then right-click on package in Project Manager and select Install Raul "Dwight Crevelt" wrote in message news:4846e20f$1@newsgroups.borland.com... >I have tried importing the Shockwave flash activex into D2007 on Win XP > > The wizard runs and creates shockwaveflashobjects_tlb.pas and .dcr > > However it ends with the code for the file in the editor and nothing is > placed in the tool palate > > I have many D7 apps that use this activex and MUST get it into D2007's IDE > > -- > Dwight > >
VIEWS ON THIS POST

156

Posted on:

Friday 28th September 2012
View Replies!

Still got DLL problems

Just read the excellent article on String and Pchar written by Rudy Velthuis http://rvelthuis.de/articles/articles-pchars.html. In the article he shows the following example: function WindowsDirectory: string; begin SetLength(Result, MAX_PATH); GetWindowsDirectory(PChar(Result), Length(Result)); SetLength(Result, StrLen(PChar(Result))); end; Which I thought I understood. So I wrote the following: function MFCommand(command:PChar;Var Buffer:PChar;Var BufferLen:integer; Var Tokenouble;TaskID:PChar):integer;stdcall;external 'IPMFClient.dll'; procedure TForm1.Button1Click(Sender: TObject); var rc : integer; str: String; token: double; strlen: integer; begin strlen:=500; SetLength(str,strlen); rc := MFCommand(pchar(Edit1.text),pchar(str),strlen,token,'Test Module'); showmessage('MFCommand rc='+inttostr(RC)); setLength(str,strlen(pchar(str))); if rc=0 then showmessage('String='+str); end; but this won't compile getting error E2197 Constant object cannot be passed as var parameter What am I missing here, they look equivalent to me.
VIEWS ON THIS POST

90

Posted on:

Wednesday 3rd October 2012
View Replies!

Service problems

I'm trying to write a service and I've had to install and uninstall a few times. Now when installing I get this error: Service "Service1" failed to install with error: "System Error. Code: 1078. The name is already in use as either a service name or a service display name" I've tried uninstalling and it says that it does not exist as an installed service. I've also tried manually deleting it from HKLM\System\CurrentControlSet but its not there... Any ideas whats been left behind and how to get it installed again (without renaming)
VIEWS ON THIS POST

96

Posted on:

Friday 5th October 2012
View Replies!

Delphi 2007 IDE problems after installing Vista Service pack 1

I run the latest available build for Delphi 2007 Win 32 (11.0.2902.10471 with December 2007 Update and February 2008 Help Update installed) on Vista Business. Until last Friday everything worked OK. Last Friday I installed Vista SP 1. Since then I have two issues with my compiler: 1. After I open my compiler and I click (first time only) on any main menu item, the IDE drops down that menu item and freezes for 20-25 seconds and I have to wait until I can click on any menu item/subitem again. I have to underline that this happens only on the first click on any main menu item. After that everything is fine until the end of the session. 2. In one of my applications I use a TActionManager with lots of TCustomActions. This worked fine until now. After this Vista update I get a similar behavior into my application with the one I mentioned about the IDE at pct 1. After launching my app (first time only) when I click on any main menu item, that item is dropped down, the application freezes for 5-10 seconds, and the debugger stops on an a TCustomAction exception triggered into ole32.dll. This exception triggers an INT 3 in ntdll.DbgBreakPoint which causes a stop on this breakpoint. Of course if I continue to run (F9) everything will be fine until the end of the session. Any input on this issues will be greatly appreciated.
VIEWS ON THIS POST

68

Posted on:

Sunday 7th October 2012
View Replies!

d2007 Special HTML project page?

Somewhere in the help documentation I read about an apparently new feature of delphi d2007 that would allow you to make an html page about your project and the ide would load it (iirc) when you open a project (as a base page). As I understood it you could make html comments/plans/todo items, etc. about the project. I have searched for an hour for this again unsuccessfully. Anyone know where to look specifically I don't remember exactly what the feature was called. I just recently made my first html page in the ide as a change log. I had always used frontpage for that and for help but this is pretty decent for a simple html editor. I'm quite impressed. I can see a few common operations that are missing (like joining cells in a table) and document/paragraph/item level property editing to name just a few). I'm wondering if anyone has written any ide extensions that enhance this ability. --
VIEWS ON THIS POST

91

Posted on:

Monday 8th October 2012
View Replies!

d2007 build options not showing on some projects

This is probably something stupid but I can't see what's causing this. some of my projects do not show the build options in the Project-Options dialog. It's not greyed out, it just doesn't show. I thought I saw this a month or so ago but then it seemed to go away then. Anybody know what I'm missing here --
VIEWS ON THIS POST

124

Posted on:

Monday 8th October 2012
View Replies!

d2007 and packages

Hi all, I've recently started heavily using d2007 and decided to upgrade an application from d7 to d2007. The program makes exclusive use of RT Packages and in d7 I've had very few package related problems. I can't say the same for d2007. Are there any known IDE/Compiler problems with using packages under d2007 Here is a short list I've found just from my own experiences over the last couple of days: - IDE gets very confused when dealing with multiple packages. I've coverted a number of d7 packages for this application to d2007 and the new dproj files contain references to other packages that I'm not even working on at the moment. - design time packages have problems with .dcr files being listed in them. they constantly want to try and remove the file references, even though the .pas files are not listed in the package. - the d2007 compiler seems to barf alot with Internal compiler errors when trying to build applications, or even packages, with no reference as to what file could be causing the issue. Yet d7 has no problems with the exact same code base!! Am I in the minority with trying to use delphi to build applications using RT packages Any suggestions on how I can possibly track down and fix my package problems Ryan
VIEWS ON THIS POST

85

Posted on:

Tuesday 16th October 2012
View Replies!

d2007 Special HTML project page?

Somewhere in the help documentation I read about an apparently new feature of delphi d2007 that would allow you to make an html page about your project and the ide would load it (iirc) when you open a project (as a base page). As I understood it you could make html comments/plans/todo items, etc. about the project. I have searched for an hour for this again unsuccessfully. Anyone know where to look specifically I don't remember exactly what the feature was called. I just recently made my first html page in the ide as a change log. I had always used frontpage for that and for help but this is pretty decent for a simple html editor. I'm quite impressed. I can see a few common operations that are missing (like joining cells in a table) and document/paragraph/item level property editing to name just a few). I'm wondering if anyone has written any ide extensions that enhance this ability. --
VIEWS ON THIS POST

75

Posted on:

Tuesday 16th October 2012
View Replies!

importing flash activex into d2007

Did you create a new package In D2007 you need to install the package (and can't just import the ActiveX). Basically: - File->New->Package - import the ActiveX and make sure you select option to add control to package - you can then right-click on package in Project Manager and select Install Raul "Dwight Crevelt" wrote in message news:4846e20f$1@newsgroups.borland.com... >I have tried importing the Shockwave flash activex into D2007 on Win XP > > The wizard runs and creates shockwaveflashobjects_tlb.pas and .dcr > > However it ends with the code for the file in the editor and nothing is > placed in the tool palate > > I have many D7 apps that use this activex and MUST get it into D2007's IDE > > -- > Dwight > >
VIEWS ON THIS POST

60

Posted on:

Tuesday 16th October 2012
View Replies!

D7: component pallet problems

My D7 component pallet is gone--doesn't show up. There is a file I should delete, isn't there
VIEWS ON THIS POST

112

Posted on:

Tuesday 16th October 2012
View Replies!

Re: System tray problems

"Lorne" wrote in message news:474d8a2c@newsgroups.borland.com... > By design my application only shows in the system tray. When the user > passes the mouse over the icon I can pick up WM_MOUSEMOVE and show a popup > menu above the ...
VIEWS ON THIS POST

177

Posted on:

Saturday 10th November 2012
View Replies!

BDS 2006 problems with VarArrayOf on Windows 2000

Davide Angeli wrote: > Hi. The following code ran on a Win 2000 PC raise and "Invalid > Variant Type". On Win XP and Win Vista no problem! > > procedure TForm1.Button1Click(Sender: TObject); > var > V : Variant; > ...
VIEWS ON THIS POST

219

Posted on:

Thursday 15th November 2012
View Replies!

Re: System tray problems

"Lorne" wrote in message news:474d8a2c@newsgroups.borland.com... > I want the menu to stay visible whilst the mouse is over the > icon or on the menu but to disappear if the mouse is moved > away without clicking anything. That ...
VIEWS ON THIS POST

134

Posted on:

Thursday 15th November 2012
View Replies!

ChecklistBox problems

I can't figure this out. I'm using a checklistbox with the style set as lVirtualOwnerDraw, everything is working as expected, except I can't figure out how to tell it that an item is checked or not. It keeps using the ...
VIEWS ON THIS POST

141

Posted on:

Thursday 22nd November 2012
View Replies!

TForm.Create-problems I

I have a TForm whichs property will be set by the caller. This form shall "ShowModal" other forms, which names will only be known at runtime. But know I dont know, how to do this with a Property: Normally I ...
VIEWS ON THIS POST

150

Posted on:

Thursday 22nd November 2012
View Replies!