Search Results

Search found 5657 results on 227 pages for 'delphi 2007'.

Page 120/227 | < Previous Page | 116 117 118 119 120 121 122 123 124 125 126 127  | Next Page >

  • How to make an HTTP request in a separate thread with timeout?

    - by Vitaly
    Hi, I haven't programmed in Delphi for a while and frankly didn't think I'll ever have to but... Here I am, desperately trying to find some information on the matter and it's so scarce nowadays, I can't find anything. So maybe you guys could help me out. Currently my application uses Synapse library to make HTTP calls, but it doesn't allow for setting a timeout. Usually, that's not a big problem, but now I absolutely must to have a timeout to handle any connectivity issues nicely. What I'm looking for, is a library (synchronous or not) that will allow making HTTP requests absolutely transparent for the user with no visible or hidden delays. I can't immediately kill a thread right now, and with possibility of many frequent requests to the server that is not responding, it's no good.

    Read the article

  • Transparent checkbox with theme-support?

    - by Steve
    I'm looking for a simple, transparent checkbox component that properly supports XP/Vista/7 theming. It should also work with Delphi 7. I've found a component on Torry's that's not working properly, and I know that Raize components has a transparent checkbox - but I'm obviously not going to pay $300 for the entire package just to get this single component. I've also found many other solutions, but none of them support theming. The main problem is that TCustomCheckBox is a TWinControl descendant, and in order to implement transparency, you need to make a new TGraphic descendant control from ground up. Any ideas?

    Read the article

  • Is it possible to have a global exception hook?

    - by Heinrich Ulbricht
    Hi, my code is fairly well covered with exception handling (try..except). Some exceptions are not expected to happen and some exceptions happen fairly often, which is expected and ok. Now I want to add some automated tests for this code. It would be good to know how many exceptions happened during execution, so I can later see if the expected number was raised or anything unexpected happened. I don't want to clutter every exception handling block with debug code, so my question is: Is there a way to install some kind of global exception handler which sits right before all other exception handling blocks? I am searching for a central place to log these exceptions. Thanks for any suggestions! (And if this matters: it is Delphi 2009)

    Read the article

  • The Reason of Service Termination

    - by Mariusz
    I use a service application I created in Delphi. My problem is that it is sometimes terminated by the operating system and I don't know why this happens. When I go the the system events, I can find a piece of information like this one: Event ID: 7034, The [...] service terminated unexpectedly. It has done this [...] time(s). I know you can't give me an answer why this happens, but could you please give me a clue what to pay attention to to find the reason of that behaviour? For instance what kind of exceptions could make the OS close an application. Thank you in advance.

    Read the article

  • Using a indentifier or reserved word in a automation object under FPC

    - by Salvador
    Actually i am using OLE automation under Free Pascal , but some objects have properties which uses reserverd words as names, so i cannot compile the code. check this sample MyObj : OleVariant; begin MyObj := CrealeOleObject('AObject'); MyObj .Descriptor := Param1; MyObj .Type := Param2; //this line generates a error this is the error StdOleAux.pas(783,15) Fatal: Syntax error, "identifier" expected but "TYPE" found so the question is how i can access this properties in FPC when they have a name which is a reserved word? FPC 2.2.4 Lazarus 0.9.28.2 using {$MODE DELPHI}

    Read the article

  • Raudus vs ExtPascal

    - by user193655
    Delphi developers has several tools (several alternatives to ASP.NET) for building web applications. While No.1 framework is Intraweb, there is a lot of interest around ExtJS, that has 2 incarnations: 1) the opensource ExtPascal 2) the closedsource Raudus Now the products are different, Raudus never supports the latest ExtJS version (while ExtPascal does because as far as I read it "almost automatically updates itself to the latest ExJS version"), Raudus "seems" much RAD (much similar to Intraweb from the RAD point of view). Anyway why chose one or the other? Why Raudus since it is free cannot become Open Source?

    Read the article

  • CueText equivalent for a TMemo

    - by JosephStyons
    I have this Delphi code to set the cue text of a control on my form: procedure TfrmMain.SetCueText(edt: TWinControl; cueText: string); const ECM_FIRST = $1500; EM_SETCUEBANNER = ECM_FIRST + 1; begin SendMessage(edt.Handle,EM_SETCUEBANNER,0, LParam(PWideChar(WideString(cueText)))); end; I want the same effect on a TMemo, but the MSDN document says: You cannot set a cue banner on a multiline edit control or on a rich edit control. Is there a standard way to have a cuetext effect on a TMemo, or do I have to fiddle with the OnEnter/OnExit events and roll my own?

    Read the article

  • Why does my custom component raise AVs in the IDE?

    - by Mason Wheeler
    I'm trying to write a simple component that will allow you to embed one or more SDL rendering surfaces on a Delphi window, using the SDL 1.3 APIs. It will compile and install just fine, but when I try to use the component in the form designer, it raises AVs whenever I try to access its properties in the object inspector, save the form, or delete the component, and placing one on a form then trying to run gives a linker error: it apparently can't read the DFM properly for whatever reason. The DLL can be found at http://www.libsdl.org/tmp/SDL-1.3-dll.zip and the source code to my component can be downloaded here. SDL.pas is a JEDI-SDL header file; the rest is my own code. I don't see any reason for this to raise AVs in the form designer. If I dynamically create the control at runtime I don't have any stability issues. Can anyone take a look at this and maybe provide some feedback that might help me clear it up?

    Read the article

  • List service and services status under Win-7

    - by Ronaldo Junior
    I have a service monitor app that monitors the status of three other servers app - you know those kind of green, red status stuff, start, stop, etc. The problem is that it shows the wrong state in Windows 7 even if the user is the administrator. The start, stop buttons are disabled and the install button enabled, the status color is grey which is also wrong. The start button should be enabled with the service status showing green - the apps are running. If the application is run with the setting "run as administrator" then it behaves normally. The application is written in Delphi 7 and works perfectly in other versions of Windows. This line of code: OpenSCManager(PChar(sMachine),Nil,SC_MANAGER_ALL_ACCESS) always return 0 under Win7, causing the problem. Any ideas and if possible, any workaround apart from "run as administrator". Regards Ronaldo

    Read the article

  • Problem with writing if condition

    - by Himadri
    I have two decimal numbers. I want those number to be same upto 4 decimal points without rounding. If numbers are different I want 2nd number to be replaced by 1st. What if condition should I write? Eg, 1. num1 = 0.94618976 num2 = 0.94620239 If we round these numbers upto 4 decimal then we get 0.9462 same number, but I don't want to round these numbers. 2. num1 = 0.94620239 num2 = 0.94639125 The one way I found is take absolute difference of both numbers say diff and then check the value. My problem is of checking the range of diff. I am using delphi but you can answer in any language.Thank You.

    Read the article

  • How can I integrate graphs and JPEG images with RAVE Reports?

    - by JonDave of the Philippines
    I really love RAVE Reports in creating multiple reports especially with formulas and accounting systems... but recently I am having problems with integrating JPEG Pictures and Graphs with my newly Delphi Language developed Little ERP System. I bought some JPEG Components but it seems problematic. I also experienced some irregularities with my RAVE Reports now. When I run my program then try to preview some reports, it seems to be running fine, but when I close the program, the EXE file is still in the taskbar. I need to ctrl-alt-delete first for me to use Report Previews normally. If I don't, RAVE REPORT ERROR message will appear everytime I click the PRINT button; it says "STREAM READ ERROR" even though I used to "FreeAndNil" to free the memory stream when Report Preview Form closes. When I tried to run the My Applications without previewing RAVE reports, the program closes perfectly. Any suggestions and recommendations will be an enormous help. Thank you.

    Read the article

  • Adding a calculated field to a Query at run time.

    - by JamesB
    I'm getting data using a query in Delphi, and would like to add a calculated field to the query before it runs. The calculated field is using values in code as well as the query so I can't just calculate it in SQL. I know I can attach an OnCalcFields Event to actually make the calculation, but the problem is after adding the calculated field there are no other fields in the query... I did some digging and found that all of the field defs are created but the actual fields are only created if DefaultFields then CreateFields Default Fields is specified procedure TDataSet.DoInternalOpen; begin FDefaultFields := FieldCount = 0; ... end; Which would indicate that if you add fields you only get the fields you added. I would like all the fields in the query AS WELL AS the ones I Add. Is this possible or do I have to add all the fields I'm using as well?

    Read the article

  • Can I get a PTypeInfo from a string?

    - by Mason Wheeler
    This is probably going to be a "no", but is there any way I can use Delphi's RTTI, either old-school or the 2010 extended RTTI, to pass in a string containing the name of a type, specifically the name of an enumerated type, and have it give me the PTypeInfo for that type? I've looked through RTTI.pas and TypInfo.pas and I don't see any function that would do that, but I might have missed something. What I'm looking for: var info: PTypeInfo; begin info := GetTypeInfoFromName('TComponentStyle'); end; Or something like that. Thing is, the name of the enumerated type would be passed in; it wouldn't be known at compile time.

    Read the article

  • Service Application too visible

    - by Tom
    Working on a service application in Delphi 5 that is intended to run on Windows XP - 7. Most of the application is coming together nicely, but I'm running into one issue. Part of this service application is a form that displays data occasionally (similar to the slider box Avast uses to let you know its updated). When the service shows the form, the form displays on the taskbar, but we don't want it to. Does anyone have any suggestions as to how to hide the form's button on the taksbar? None of the standard methods I've found for regular applications have worked so far. Thanks.

    Read the article

  • Determine if a day of week and time fall in a custom weekend period

    - by Y Low
    I've been trying to come up with a method, that given a day of week and time of day, it will return if it falls under a custom weekend period. The weekend period is saved in 4 variables as follows: The day of week when it starts (0-6) The time of day when it starts (0-23) The day of week when it ends (0-6) The time of day when it ends (0-23) Based on these fields, the weekend period can be anything the user selected (even if it is well beyond a regular weekend) I've been banging this one for awhile but to no avail. I'm trying this in delphi but any language will do, as I'm looking for the algorithm and not the implementation.

    Read the article

  • The most elegant way to encapsulate WinAPI callbacks inside a class

    - by FractalizeR
    Hello. I am thinking about elegant way to encapsulate WinAPI callbacks inside a class. Suppose I am making a class handling asynchronous I/O. All Windows callbacks should be stdcall functions, not class methods (I need to pass their addresses to ReadFileEx WinAPI function for example). So, I cannot just pass method addresses as a callback routines to WinAPI functions. What is the most elegant way to encapsulate functionality of this type inside a class so that the class have events OnReadCompleted and OnWriteCompleted (I am using Delphi as a primary language, but I guess the situation must be the same in C++ because class methods are different from simple methods by the fact, that the first hidden parameter of them is this link. Of course this class is not a singleton and there can be many of them created by app at the same time. What do you think would be the good way to implement this?

    Read the article

  • Interface helpers or delegating interface parent

    - by Craig Peterson
    If I have an existing IInterface descendant implemented by a third party, and I want to add helper routines, does Delphi provide any easy way to do so without redirecting every interface method manually? That is, given an interface like so: IFoo = interface procedure Foo1; procedure Foo2; ... procedure FooN; end; Is anything similar to the following supported? IFooHelper = interface helper for IFoo procedure Bar; end; or IFooBar = interface(IFoo) procedure Bar; end; TFooBar = interface(TInterfacedObject, IFoo, IFooBar) private FFoo: IFoo; public procedure Bar; property Foo: IFoo implements IFoo; end; I'm specifically wondering about ways to that allow me to always refer to IFoo, IFooBar, or TFooBar, without switching between them, and without adding all of IFoo's methods to TFooBar.

    Read the article

  • alternative to check, whether a value is in a set

    - by stanleyxu2005
    Hi All, I have the following code. It looks ugly, if the value equals to one of the following value then do something. var Value: Word; begin Value := 30000; if (Value = 30000) or (Value = 40000) or (Value = 1) then do_something; end; I want to refactor the code as follows: var Value: Word; begin Value := 30000; if (Value in [1, 30000, 40000]) then // Does not work do_something; end; However, the refactored code does not work. I assume that a valid set in Delphi accepts only elements with type byte. If there any good alternative to refactor my original code (besides using case)?

    Read the article

  • TToolButton Height Grows with Style = tbsDropdown

    - by smartins
    I noticed that the height of a TToolButton increases when you set the button's Style to tbsDropdown. I can understand the width increasing, so the button has space to draw the down arrow, but I'm not sure a height increase is necessary. Steps to reproduce the issue (Delphi 2010, Windows 7 x64): Add TToolbar to a form, ShowCaptions=True Right click to add a button to the Toolbar Set button Style=tbsDropDown and notice the button grows in height The same height increase happens when there are images assigned to the toolbar, in which case there is already plenty more vertical space available in the button to draw the drop down. Here's a visual example: Is there a workaround for this without hacking the VCL, or is this hardcoded into the Windows control?

    Read the article

  • Setting User Access Rights in Windows

    - by user314282
    Can someone tell me how to set file permissions in Delphi 2006? I am using TINIFile.Create to create INI files in my application. The problem is that if I create the file while logged onto Windows as an administrator and then try to run the application as just a standard user and overwrite the INI file, I do not have permission to do so. I put the file in the AllUsers\ApplicationData\MyProduct folder. I'd like to set the permissions to this folder. I need AllUsers to have Full permissions to the MyProduct folder. If its possible to do this through a WindowsAPI that'd be great because I also need to do this in C++ and C#. I'd really appreciate any help. Thanks!

    Read the article

  • How to retrieve the file icons and file previews used by windows explorer?

    - by user193655
    I am developing a Delphi documents management application, so somehow I am giving the user some functionality similar to windows explorer. Currently I am using imagelists where I manually maintain the icons (like one for pdf, one for xls, ...) and when I need to display an icon for a filetype that I don't explicitly support I have a generic icon. Is there a way to retrieve the icon used by windows, like MyTImage := GiveMeDefaultIconForExtension('pdf'); In Vista and Seven this should be an icon with multiple resolutions I think. Moreover I would like to know if there is a way to get the preview used by windows explorer. For example windows explorer creates a small thumbnail for a pdf document for example, and displays it when the user chooses to view "big icons". Is there a way to retrieve that preview? MyTImage := GiveMePreviewForFile('C:\Test\File.pdf');

    Read the article

  • Adobe Acrobat API - How to skip opening password protected PDFs?

    - by Ryan
    Hi all, I've been using Delphi and the Adobe Acrobat 9 API. I'm simply opening a PDF and printing it, followed by closing it without saving anything. I'm having an issue while opening some PDFs though. If the PDF is password protected the Open method displays Adobe's "Input password" prompt. My application is running in an automated fashion, and therefor cannot proceed beyond this password prompt until somebody clicks cancel. I've been looking for something that will either notify me that the file is password protected prior to opening it, or a parameter or something that will skip password protected files. I need my program to assume it cannot open any passworded PDF. Does anyone know enough about the Acrobat API to provide any assistance here? Thank you, Ryan

    Read the article

  • installing Delphi5 pro in windows 64b

    - by Larry
    Please dont laugh . Over the past 15 years or so I've written all the software that runs my medical practice in D5. Last week when I went to DelphiArea to update a component I got attacked and my disk became unbootable/unrecoverable. I have my original D5p disk and all the components backed up but I want to migrate to W7. I don't care if my delphi apps look like vista/7, I just want to be able to install it and code on the machine again for maintenance purposes. 1) are there any tricks to install D5 so it works in W7? 2) is using a vm program really the only/best way? if so, which is suggested. Thanks in advance. My new Gateway zx6800-03 arrives tomorrow! Larry [email protected]

    Read the article

  • Undelete a contact in outlook

    - by Alister
    I have an application written in Delphi that adds / updates contacts in outlook. The problem I'm having is that if the contact has been deleted in Outlook, the code still finds the contact and updates it - and the contact still remains deleted. Is there a way I can determine if the contact is deleted or undelete the contact? Roughly the code looks something like: OutlookApp := CreateOleObject('Outlook.Application'); Mapi := OutlookApp.GetNameSpace('MAPI'); //..... try if ContactOutlookEntryID.AsString <> '' then aContact := Mapi.GetItemFromID(ContactOutlookEntryID.AsString); except end; //try to locate the contact if they have been synchro'd before if VarIsEmpty(aContact) then //if not found aContact := Contacts.Items.Add(2); //add a new contact to outlook aContact.LastName := ContactSurname.AsString; //.....

    Read the article

  • Streaming multiple TObjects to a TMemoryStream

    - by Altar
    I need to store multiple objects (most of them are TObject/non persistent) to a TMemoryStream, save the stream to disk and load it back. The objects need to be streamed one after each other. Some kind of universal container. I started to make several functions that store stuff to stream - for example function StreamReadString(CONST MemStream: TMemoryStream): string; StreamWriteString(CONST MemStream: TMemoryStream; s: string); However, it seems that I need to rewrite a lot of code. One of the many examples is TStringList.LoadFromStream that will not work so it needs to be rewritten. This is because TStringList needs to be the last object in the stream (it reads from current position to the end of the stream). Anybody knows a library that provide basic functionality like this? I am using Delphi 7 so RTTI won't help too much.

    Read the article

< Previous Page | 116 117 118 119 120 121 122 123 124 125 126 127  | Next Page >