Search Results

Search found 4237 results on 170 pages for 'delphi 2009'.

Page 60/170 | < Previous Page | 56 57 58 59 60 61 62 63 64 65 66 67  | Next Page >

  • How to get absolute path from path with system path variables?

    - by The_Fox
    Is there an easy way to translate a path with system path variables to an absolute path? So %ProgramFiles%\Internet Explorer\hmmapi.dll becomes C:\Program Files\Internet Explorer\hmmapi.dll I like to know if there is an API call that can do this, or do I have to do this the hard way and detect %..% sequences and replace them with the appropriate environment variable?

    Read the article

  • Inherited TShape.Paint does not work after overriding Shape property

    - by DarkWalker
    I'm to code a TExpandedShape class inherited from TShape. TExpandedShape must act like TShape and be able to draw extra shapes: Polygon and Star. Here is my code unit ExpandedShape; interface uses SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls, Forms, Dialogs, ExtCtrls, Windows; type TExpandedShapeType = ( stRectangle, stSquare, stRoundRect, stRoundSquare, stEllipse, stCircle, stPolygon, stStar ); TExpandedShape = class(TShape) private FShape: TExpandedShapeType; FEdgeCount: integer; procedure SetShape(const Value: TExpandedShapeType); procedure SetEdgeCount(const Value: integer); public procedure Paint; override; published property Shape : TExpandedShapeType read FShape write SetShape;// default stPolygon; property EdgeCount : integer read FEdgeCount write SetEdgeCount default 5; end; procedure Register; implementation procedure Register; begin RegisterComponents('Course', [TExpandedShape]); end; // TExpandedShape procedure TExpandedShape.Paint; begin case Shape of stStar : begin {Draw Star} end; stPolygon : begin {Draw Polygon} end; else begin {It is supposed to draw Circle, Rectangle etc, but it does not} inherited; end; end; end; procedure TExpandedShape.SetEdgeCount(const Value: integer); begin FEdgeCount := Value; Repaint; end; procedure TExpandedShape.SetShape(const Value: TExpandedShapeType); begin FShape := Value; Repaint; end; end. So, what is wrong? IMO TShape.Paint checks private value like FShape in case section and then decides what to draw. When inherited Paint method is called in my code it checks FShape value sees default 0 value [stRectangle] in there and draws it. PS: I did solve it with blackmagic way using Shape1 property instead of Shape one and if Shape1 value is not stPolygon or stStar i do like this: begin Shape := TShapeType(Shape1); inherited end; But this option is not really an option. I need a good short nice-looking one.

    Read the article

  • Creating same-width hit-zones on MenuItems in ASP.NET 2.0 Menus that include MenuItems added at runt

    - by Cary Jensen
    In an ASP.NET 2.0 application, I want to permit a user to select a MenuItem, even if the user does not click the actual text of the MenuItem, but instead only clicks the highlight area that ASP.NET places around the currently selected MenuItem (represented by the DynamicHoverStyle.BackColor property). Since the BackColor is displayed the same width for each MenuItem in a submenu, based on MenuItem with the longest text, I would like to make the hit-zone (clickable area) of each sub-MenuItem the same width (same at the BackColor area), regardless of how much text is displayed in the in each individual sub-MenuItem. Here's the setup. I am using a Menu on a MasterPage to display a similar menu on each of my pages. Some of the pages suppress this menu, and some of them add addition MenuItems, sometimes to the top level, sometimes adding sub-MenuItems to an existing top-level MenuItem, and sometimes both (adding a MenuItem to the top level and then additional MenuItems as submenuitems to that newly added top level. This menu has a horizontal orientation, and it is dynamic, in that only the top level is initially exposed, and the submenus are displayed when selected. During usability testing, we noticed that users would select a top-level menu item to expose the submenu, and then select a submenu item, but not by necessarily clicking on the submenu item text, but instead clicking on the BackColor area of the submenu item. Since the text of some MenuItems are longer than others, MenuItems with short Text have a rather large BackColor area. When the user clicks on the BackColor area, but not directly on the MenuItem Text, nothing happens, since the user didn't actually click on the submenu item hit zone. Although there are visual cues as to what part of the displayed MenuItem is clickable (the mouse pointer changes to a link cursor when the mouse is positioned on the MenuItem Text, but not when it is only hovering over the BackColor), this behavior confused the users. They highlighted a MenuItem, and clicked it, but nothing happened. I would to make clicking a MenuItem successful, even if the user did not click on the actual Text of the MenuItem, but simply click on the BackColor area. It seems like there should be a property somewhere to control the width of the active area of the displayed MenuItems, but I do not see it. Any suggestions, given that I am creating some of these MenuItems at runtime?

    Read the article

  • Is there a message generator

    - by Jlouro
    I don’t want to have my messages to the user stored in the application, or in a resource file. By message I mean, those difficult strings that we have to write to tell the user what is going on or wrong in the application at the precise time. Is there a simple message generator? Simple stuff, but as to handle singular/plural and feminine/masculine.

    Read the article

  • Changing drag cursor in VirtualTreeView

    - by Coder12345
    When using VirtualTreeView drag operation by default is [doCopy,doMove]. Move operation is indicated by arrow pointer with small box and Copy operation is indicated by same pointer icon but with added [+] next to it. By default VT uses copy operation and if you press modifier key (SHIFT key) it modifies operation to move therefore removing the [+] from pointer. Here is what I need: reverse the operations (default would be move, with modifier key pressed - copy) and thus reverse pointer arrow too replace modifier key - CTRL instead of SHIFT read in an event which of the two operations occurred and start copy or move operation Any pointers into right direction(s) appreciated.

    Read the article

  • Using EnterCriticalSection in Thread to update VCL label

    - by user257188
    I'm new to threads. I'm using a 3rd party library that uses threads which at times call a procedure I've provided. How do I update update a TLabel.Caption from my procedure when its called by the thread? If I've called InitializeCriticalSection elsewhere, is it as simple as EnterCriticalSection(CritSect); GlobalVariable := 'New TLabel.Caption'; LeaveCriticalSection(CritSect); And then in my main thread: EnterCriticalSection(CritSect); Label1.Caption:= 'New TLable.Caption'; LeaveCriticalSection(CritSect); But, how do I get the main thread code to be called? The thread can use SendMessage? Or is there some better/easier way (.OnIdle could check a flag set by the thread?) Thanks.

    Read the article

  • Indy10 Deadlock at TCPServer

    - by user1769184
    to write information on the processing state to the GUI inside a tcpserver.onexecute(..) function , i used the following command sequence ExecuteDUMMYCommand(Global_Send_Record); BitMap_PaintImageProcess; TThread.Synchronize(nil, BitMap_PaintImageProcess); The code is working well on some machines, but on a few it fails. The code execution stops atTThread.Synchronize command. I guess on these machines the function call is trapped inside a deadlock Any chance to figure out the real problem behind ? The procedure BitMap_PaintImageProcess , here I create a Bitmap and do a lot of painting stuff , but is seems that this code is never executed ?

    Read the article

  • Why are Pascal control structures inconsistent?

    - by 70Mike
    Most Pascal control structures make sense to me, like: for ... do {statement}; if (condition) then {statement}; while (condition) do {statement}; where the {statement} is either a single statement, or a begin ... end block. I have a problem with: repeat {statement-list} until (expression); try {statement-list} except {statement-list} end; Wouldn't it be better that repeat and try have the same general structure, accepting only a single statement or a begin ... end block, instead of having a statement-list that's not formally blocked with a begin and an end?

    Read the article

  • How can I monitor the SQL commands send over my ADO connection?

    - by RRUZ
    i need intercept all the SQL commands that pass between an ADO connection component and a database server. something like the TSQLmonitor of dbExpress, but for ADO . Anybody know any third-party component that implements this functionality? UPDATE I want to do is to monitor the SQL statements programmatically (by code) from my application without using an external tool. for any database engine.

    Read the article

  • Is it posible for WIndows Speech Recognition Engine to use in my project like word pronounciation ga

    - by XBasic3000
    I use to create an application that uses the windows speech recognition engine or the SAPI. its like a game for pronounciation that it give you score when you pronounce it correctly. but when i started experiments with SAPI, it has poor recognition unless if you load a grammar on it (XML) its give best recognition result. but the problem now is closest pronounciation from the input text will be recognize. for example: Database - dedebase - correct. even if you mispronounce it. it gives you correct answers. without using the xml grammar when you say database it give you "in the base/the base/data base/etc..." please post your answer,suggestion,clarication and please votes for best answer.

    Read the article

  • Why does this code fail in D2010, but not D7?

    - by Tom1952
    Why does this code get an access error on the Result := Buffer line in D2010, but not D7? Something, I'd guess, involving UniCode, but the compiler doesn't generate any warnings. Any suggestions on an elegant workaround? function GetTempPathAndFileName( const aExtension: string): string; var Buffer: array[0..MAX_PATH] of Char; begin repeat GetTempPath(SizeOf(Buffer) - 1, Buffer); GetTempFileName(Buffer, '~', 0, Buffer); Result := Buffer; // <--- crashes on this line, Result := ChangeFileExt(Result, aExtension); until not FileExists(Result); end; { GetTempPathAndFileName }

    Read the article

  • How to implement "tab drop in window" and "tab drop out of window" effect

    - by stanleyxu2005
    How to implement "tab drop in window" and "tab drop out of window" effect, just like the google chrome browser? My imagination is that: It is not a single application. The main browser frame is an application, the tabs are several applications without a window frame. When the main browser frame is resized or moved, all tabs will be notified to be resized or moved. Is there any existing component or code example can do this?

    Read the article

  • Parameters in query with in clause ?

    - by Hugues Van Landeghem
    Hi all, I want to use parameter for query like this : SELECT * FROM MATABLE WHERE MT_ID IN (368134, 181956) so I think about this SELECT * FROM MATABLE WHERE MT_ID IN (:MYPARAM) but it doesn't work... Is there a way to do this ? I actually use IBX and Firebird 2.1 I don't know how many parameters in IN clause.

    Read the article

  • Is there any simple way to test two PNGs for equality?

    - by Mason Wheeler
    I've got a bunch of PNG images, and I'm looking for a way to identify duplicates. By duplicates I mean, specifically, two PNG files whose uncompressed image data are identical, not necessarily whose files are identical. This means I can't do something simple like compare CRC hash values. I figure this can actually be done reliably since PNGs use lossless compression, but I'm worried about speed. I know I can winnow things down a little by testing for equal dimensions first, but when it comes time to actually compare the images against each other, is there any way to do it reasonably efficiently? (ie. faster than the "double-for-loop checking pixel values against each other" brute-force method?)

    Read the article

  • Pre-allocate memory between HostApp and DLL

    - by Leo
    I have a DLL which provided a decoding function, as follows: function MyDecode (Source: PChar; SourceLen: Integer; var Dest: PChar; DestLen: Integer): Boolean; stdcall; The HostApp call "MyDecode", and transfer into the Source, SourceLen and Dest parameters, the DLL returns decoded Dest and DestLen. The problem is: The HostApp impossible to know decoded Dest length, and therefore would not know how to pre-allocated Dest's memory. I know that can split "MyDecode" into two functions: function GetDecodeLen (Source: PChar; SourceLen: Integer): Integer; stdcall; // Return the Dest's length function MyDecodeLen (Source: PChar; SourceLen: Integer; var Dest: PChar): Boolean; stdcall; But, My decoding process is very complicated, so if split into two functions will affect the efficiency. Is there a better solution?

    Read the article

  • Why is Gmail not showing my text/html alternative?

    - by Stijn Sanders
    I'm creating an outgoing e-mail message (TIdMessage) with add two TIdText objects, one with ContentType:='text/plain' and one ContentType:='text/html', and also a TIdAttachment object. This seems to work for Outlook, which shows the HTML content, but for some odd reason, GMail keeps showing me the text/plain version by default. I've tried adding the text/html version first, I've tried adding '; charset=iso-8859-1' to the content type string, but I can't seem to find what else is different with other e-mails that GMail is showing the HTML from rightaway.

    Read the article

  • DelphiTwain how to show form setting

    - by Erwan
    Hi, I'm using Delphitwain (delphitwain.sourceforge.net) to add scan functionality to my app. Everything was fine, when i click scan button on my app it will show scan mode with scanner's Properties such as Page Size, Scanning Side (canon dr-3010c) and there is a Scan button and Cancel button. If i click cancel of course all the properties back to it's value before. How can I show this Scanner's Properties only to change properties without Scan, since i can do scan without showing properties Twain.LoadLibrary; Twain.LoadSourceManager; Twain.Source[CurrentSource].Loaded := TRUE; Twain.Source[CurrentSource].TransferMode := TTwainTransferMode(0); Twain.Source[CurrentSource].EnableSource(True, True); while Twain.Source[CurrentSource].Enabled do Application.ProcessMessages; Twain.UnloadLibrary; Twain.Source[CurrentSource].EnableSource(True, True); The first True for ShowUI and the second True for Modal I know it can be achieved 'cos i've seen another application that can show scanner's properties without scan, only OK and Cancel button, i've searched google all over but no luck, or maybe it just the limitation of the delphitwain component? Thanks, any suggestion appreciated

    Read the article

  • indy or ICS or ?

    - by radick
    Can any one tell me which is more stable? I know each has their own advantages and disadvantages. But which one is better for http, etc? In my previous application I used indy9 but I wasn't satisfied with it, as I would sometimes get strange errors. Can anyone recommend one?

    Read the article

  • to track the modified rows and manually update from the TClientDataSet's Delta

    - by Vijay Bobba
    hi, Is there any way to manually track the changes done to a clientdataset's delta and update the changes manually on to then db. i have dynamically created a clientdataset and with out a provider i am able to load it with a tquery, now user will do some insert update and delete operations on the data available in the cds, and at final stage these data(modified) should be post in to database by using a tquery(not apply updates)..

    Read the article

  • Is it possible to use calculated fields in aggregated fields?

    - by Jørn E. Angeltveit
    Is it possible to use a calculated field in an aggregated field in a TClientDataSet? object cdsOrders: TClientDataSet AggregatesActive = True object cdsOrdersPrice : TIntegerField FieldName = 'Price' end object cdsOrdersCount: : TIntegerField FieldName = 'Count' end object cdsOrdersCalcTotal: TIntegerField FieldKind = fkInternalCalc FieldName = 'CalcTotal' Calculated = True end object cdsOrdersAggGrandTotal: TAggregateField FieldName = 'AggGrandTotal' Active = True Expression = 'SUM(CalcTotal)' end end

    Read the article

  • how do i login to gmail via internet explorer using iwebbrowser 2

    - by omair iqbal
    is it possible to login to sites like facebook,gmail using iwebbrowser2? in the code below what can i add so that it can login to gmail(with ie8 as browser) using the username and password i put in a variable? MyBrowser := CreateOleObject('InternetExplorer.Application') as IWebBrowser2; MyBrowser.Navigate('http://mysite.com'..........???); note : i am a newbie. sorry for my english:) and thanks in advance

    Read the article

< Previous Page | 56 57 58 59 60 61 62 63 64 65 66 67  | Next Page >