Search Results

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

Page 11/170 | < Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >

  • Is it possible to use WIndows Speech Recognition Engine in a word pronounciation game?

    - 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. votes for best answer. is it posible or not? by the way i use delphi compiler on the projects....

    Read the article

  • Custom component creation - how to add small icon representing component in Tool Palette?

    - by Wodzu
    Please bear in mind that I've read all the instructions I could find about adding component icon to my custom component. And I am able to do this when we talk about the icon size which is 24x24 pixels. I see the icon when a component is dropped on the form. However I can not see the small 16x16 icon which should be displayed when browsing Tool Palette. I've read that I should name my two other BMP files which are contained in DCR file like this: MyComponentName16 [for 16x16 BMP file] MyComponentName32 [for 32x32 BMP file] Unfortunately this does not seem to work, I've tried to restart Delphi few times in hope that it might be the case of not refreshing something, but without any success. Any ideas?

    Read the article

  • Synapse and string problems with HTTPSend in Delphi 2010

    - by Mick
    I have been trying to get to the bottom of this problem off and on for the past 2 days and I'm really stuck. Hopefully some smart folks can help me out. The issue is that I have a function that I call in a thread that downloads a file (using Synapse libraries) from a website that is passed to it. However, I've found that every once in a while there are sites where it will not pull down a file, but wget or Firefox/IE will download it without issue. Digging into it, I've found some curious things. Here is the relevant code: uses //[..] HTTPSend, blcksock; //[..] type TMyThread = class(TThread) protected procedure Execute; override; private { Private declarations } fTheUrl: string; procedure GetFile(const TheUrl: string); public property thrd_TheUrl: string read fTheUrl write fTheUrl; end; implementation [..] procedure TMyThread.GetFile(const TheUrl: string); var HTTP: THTTPSend; success: boolean; sLocalUrl: string; IsSame : boolean; begin HTTP := THTTPSend.Create; try HTTP.UserAgent := 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727)'; HTTP.ProxyHost := 'MYPROXY.COM'; HTTP.ProxyPort := '80'; sLocalUrl := 'http://web.archive.org/web/20071212205017/energizer.com/usbcharger/download/UsbCharger_setup_V1_1_1.exe'; IsSame := SameText(sLocalUrl, sTheUrl); //this equals True when I debug /// /// /// THIS IS WHERE THE ISSUE BEGINS /// I will comment out 1 of the following when debugging /// HTTP.HTTPMethod('GET', sLocalUrl); // ----this works and WILL download the file HTTP.HTTPMethod('GET', sTheUrl); // --- this always fails, and HTTP.ResultString contains "Not Found" success := SysUtils.UpperCase(HTTP.ResultString) = 'OK'; if HTTP.ResultCode > 0 then success := True; //this is here just to keep the value around while debugging finally HTTP.Free; end; end; procedure TMyThread.Execute begin //fTheURL contains this value: http://web.archive.org/web/20071212205017/energizer.com/usbcharger/download/UsbCharger_setup_V1_1_1.exe GetFile(fTheUrl); end; The problem is that when I assign a local variable to the function and give it the URL directly, everything works. However, when passing the variable into the function, it fails. Anyone have any ideas? HTTP.HTTPMethod('GET', sLocalUrl); // ----this works and WILL download the file HTTP.HTTPMethod('GET', sTheUrl); // --- this always fails, and HTTP.ResultString contains "Not Found" I'm using the latest version of Synapse from their SVN repository (version from 2 days ago). NOTE: The file I am attempting to download is known to have a virus, the program I am writing is meant to download malicious files for analysis. So, don't execute the file once you download it. However, I'm using this URL b/c this is the one I can reproduce the issue with.

    Read the article

  • Delphi: How to respond to WM_SettingChange/WM_WinIniChange?

    - by Ian Boyd
    i need to know when my application recieves a WM_SETTINGCHANGE message (formerly known as WM_WININICHANGE). Problem is that the message pump in TApplication sends it down a black hole (default handler) before i can get a chance to see it: procedure TApplication.WndProc(var Message: TMessage); ... begin Message.Result := 0; for I := 0 to FWindowHooks.Count - 1 do if TWindowHook(FWindowHooks[I]^)(Message) then Exit; CheckIniChange(Message); with Message do case Msg of WM_SETTINGCHANGE: begin Mouse.SettingChanged(wParam); Default; <----------------------*poof* down the sink hole end; ... end; ... end; The procedure CheckIniChange() doesn't throw any event i can handle, neither does Mouse.SettingChanged(). And once the code path reaches Default, it is sent down the DefWindowProc drain hole, never to be seen again (since the first thing the WndProc does is set the Message.Result to zero. i was hoping to assign a handler to a TApplicationEvents.OnMessage event: procedure TdmGlobal.ApplicationEvents1Message(var Msg: tagMSG; var Handled: Boolean); begin case Msg.message of WM_SETTINGCHANGE: begin // Code end; end; end; But the OnMessage event is only thrown for messages that come through the message pump. Since the WM_SETTINGCHANGE message is "handled", it never sees the PeekMessage TranslateMessage DispatchMessage system. How can i respond to the windows broadcast WM_SETTINGCHANGE?

    Read the article

  • Problems with Aero Glass in Delphi 7 applications

    - by Cralias
    Hi everyone! I'm trying to remake some of my older projects to support Aero Glass. Although it's kinda easy to enable glass frame, I've encountered some major problems. I used this code: var xVer: TOSVersionInfo; hDWM: THandle; DwmIsCompositionEnabled: function(pbEnabled: BOOL): HRESULT; stdcall; DwmExtendFrameIntoClientArea: function(hWnd: HWND; const pxMarInset: PRect): HRESULT; stdcall; bEnabled: BOOL; xFrame: TRect; // ... xVer.dwOSVersionInfoSize := SizeOf(TOSVersionInfo); GetVersionEx(xVer); if xVer.dwMajorVersion >= 6 then begin hDWM := LoadLibrary('dwmapi.dll'); @DwmIsCompositionEnabled := GetProcAddress(hDWM, 'DwmIsCompositionEnabled'); @DwmExtendFrameIntoClientArea := GetProcAddress(hDWM, 'DwmExtendFrameIntoClientArea'); if (@DwmIsCompositionEnabled <> nil) and (@DwmExtendFrameIntoClientArea <> nil) then begin DwmIsCompositionEnabled(@bEnabled); if bEnabled then begin xRect := Rect(-1, -1, -1, -1); DwmExtendFrameIntoClientArea(FrmMain.Handle, @xRect); end; end; FreeLibrary(hDWM); end; So I got the pretty glass window now. Due to black being transparent color now (kinda stupid choice, why couldn't it be pink) anything that is clBlack becomes transparent, too. It means all labels, edits, button texts... even if I set text to some other color at design time, DWM still makes them that color AND transparent. Well, my question would be - whether it's possible to solve this somehow?

    Read the article

  • Delphi, ImageList that handles BOTH png and bitmaps.

    - by michal
    Recently I've found TPngImageList component ( http://cc.embarcadero.com/Item/26127 ) which is very good, but it handles only png images ... I'd like to have some imagelist that allows combining of pngimages with bitmaps, as I'm using lots of bitmaps, and I do not want to spend coming week converting those bitmaps to pngs, yet I want to use be able to add PNG images for coming features ... So far I used to convert the PNGs to bitmaps using GIMP if I wasn't able to find any replacement.

    Read the article

  • Delphi overwrite existing file on save dialog

    - by AfterImage
    Hello everyone, I am using the TSaveDialog component to save a file from a button click. However, I am having trouble with saving on an existing file name. Generally, when you want to save over an existing file in Windows, a message box pops up asking you if you really want to overwrite the file. This is not the case with the TSaveDialog component and it will go ahead and write over the file without asking. I was hoping there was a TSaveDialog function or event that I could use but I have not seen anything that looks like it handles this. So it could be that I simplely haven't found the correct method to use. If there is an event, I could use if FileExists(saveDialog.FileName) then //and so forth but the events TSaveDialog has are OnCanClose, OnClose, OnFolderChange, OnIncludeItem, OnSelectionChange, OnShow, OnTypeChange... My question is, how do I pop up a message box to ask the user if they want to overwrite the existing file using the TSaveDialog component. Thanks.

    Read the article

  • Accessing data stored in another unit Delphi

    - by Hendriksen123
    In Unit2 of my program i have the following code: TValue = Record NewValue, OldValue, SavedValue : Double; end; TData = Class(TObject) Public EconomicGrowth : TValue; Inflation : TValue; Unemployment : TValue; CurrentAccountPosition : TValue; AggregateSupply : TValue; AggregateDemand : TValue; ADGovernmentSpending : TValue; ADConsumption : TValue; ADInvestment : TValue; ADNetExports : TValue; OverallTaxation : TValue; GovernmentSpending : TValue; InterestRates : TValue; IncomeTax : TValue; Benefits : TValue; TrainingEducationSpending : TValue; End; I then declare Data : TData in the Var. when i try to do the following however in Unit1: ShowMessage(FloatToStr(Unit2.Data.Inflation.SavedValue)); I get an EAccessViolation message. Is there any way to access the data stored in 'Data' from Unit1 without getting errors?

    Read the article

  • Delphi TerminateThread equivalent for Android

    - by Martin
    I have been discussing a problem on the Indy forums related to a thread that is not terminating correctly under Android. They have suggested that there may be an underlying problem with TThread for ARC. Because this problem is holding up the release of a product a work around would be to simply forcibly terminate the thread. I know this is not nice but in this case I cant think of a side effect from doing so. Its wrong but its better than a deadlocked app. Is there a way to forcibly terminate a thread under Android like TerminateThread does under windows? Martin

    Read the article

  • Delphi debug a wrong unit

    - by Averroes
    This is an odd behaviour by my D2006 as it happens sometimes only. I have a project I want to debug. The file I want to debug is named 'Main.pas'. I have another unrelated project with the same Unit name and sometimes the Debug prompt me the wrong Main file instead of the Main unit from the current project. This have happened to me with other files with the same name. I can't debug then as the debug keys don't work (they just don't do anything). Do you have experienced the same problem? How can I fix it? Thanks.

    Read the article

  • Delphi - Frac function losing precision.

    - by PeteDaMeat
    I have a TDateTime variable which is assigned a value at runtime of 40510.416667. When I extract the time to a TTime type variable using the Frac function, it sets it to 0.41666666666. Why has it changed the precision of the value and is there a workround to retain the precision from the original value ie. to set it to 0.416667.

    Read the article

  • Delphi, VirtualStringTree - classes (objects) instead of records

    - by michal
    I need to use a class instead of record for VirtualStringTree node. Should I declare it standard (but in this case - tricky) way like that: PNode = ^TNode; TNode = record obj: TMyObject; end; //.. var fNd: PNode; begin fNd:= vstTree.getNodeData(vstTree.AddChild(nil)); fNd.obj:= TMyObject.Create; //.. or should I use directly TMyObject? If so - how?! How about assigning (constructing) the object and freeing it? Thanks in advance m.

    Read the article

  • how to update the table in sql database from a Paradox DB table using delphi

    - by Sreenath Krishnakumar
    I am doing a project in Delphi6 which enables the user to update the table in SQL server database ; if there is any changes in the table of Paradox DB. An update button has been created and whenever the user clicks it, all the changes made in the paradox db table have to be updated in the SQL server table. Only if there is any changes the table need to be updated else ; it should close automatically. For that I have created a table, "Schedule" ,both in Paradox DB and SQL server. But I am stuck with this Paradox DB thing. Which component can I drop in the form for connecting the table in Paradox DB ? For SQL server I used ado table component. For this Paradox also can I use that ? I am not a regular programmer so I am not well versed this Delphi6 also. So I am seeking a help for this. Can anybody give me an example coding also ?

    Read the article

  • Delphi App has "No Debug Info" when Debugging

    - by James L.
    We have built an application that uses packages and components. When we debug the application, the "Event Log" in the IDE often shows the our BPLs are being loaded without debug information ("No Debug Info"). This doesn't make sense because all our packages and EXEs are built with debug. _(each project) | Options | Compiling_ [ x ] Assertions [ x ] Debug information [ x ] Local symbols Symbol reference info = "Reference info" [ ] Use debug .dcus [ x ] Use imported data references _(each project) | Options | Linking_ [ x ] Debug information Map file = Detailed We have 4 projects, all built with runtime pacakges: Core.bpl Components.bpl Plugin.bpl (uses both #1 & #2) MainApp.exe (uses #1) Problems Observed 1) Many times when we debug, the Components.bpl is loaded with debug info, but all values in the "Local Variables" window are blank. If you hover your mouse over a variable in the code, there is no popup, and Evaluate window also shows nothing (the "Result" pane is always blank). 2) Sometimes the Event Log shows "No Debug Info" for various BPLs. For instance, if we activate the Plugin.bpl project and set it's Run | Parameter's Host Application to be the MainApp.exe, and then press F9, all modules seems to load with "Has Debug Info" except for the Plugin.bpl module. When it loads, the Event Log shows "No Debug Info". However, if we close the app and immediately press F9, it will run it again without recompiling anything and this time Plugin.bpl is loaded with debug ("Has Debug Info"). Questions 1) What would cause the "Local Variables" window to not display the values? 2) Why are BPLs sometimes loaded without debug info when the BPL was complied with debug and all the debug files (dcu, map, etc.) are available?

    Read the article

  • Rtti data manipulation and consistency in Delphi 2010

    - by Coco
    Has anyone an idea, how I can make TValue using a reference to the original data? In my serialization project, I use (as suggested in XML-Serialization) a generic serializer which stores TValues in an internal tree-structure (similar to the MemberMap in the example). This member-tree should also be used to create a dynamic setup form and manipulate the data. My idea was to define a property for the Data: TDataModel <T> = class {...} private FData : TValue; function GetData : T; procedure SetData (Value : T); public property Data : T read GetData write SetData; end; The implementation of the GetData, SetData Methods: procedure TDataModel <T>.SetData (Value : T); begin FData := TValue.From <T> (Value); end; procedure TDataModel <T>.GetData : T; begin Result := FData.AsType <T>; end; Unfortunately, the TValue.From method always makes a copy of the original data. So whenever the application makes changes to the data, the DataModel is not updated and vice versa if I change my DataModel in a dynamic form, the original data is not affected. Sure I could always use the Data property before and after changing anything, but as I use lot of Rtti inside my DataModel, I do not realy want to do this anytime. Perhaps someone has a better suggestion?

    Read the article

  • Restart Delphi Application Programmatically

    - by Smasher
    It should not be possible to run multiple instances of my application. Therefore the project source contains: CreateMutex (nil, False, PChar (ID)); if (GetLastError = ERROR_ALREADY_EXISTS) then Halt; Now I want to restart my application programmatically. The usual way would be: AppName := PChar(Application.ExeName) ; ShellExecute(Handle,'open', AppName, nil, nil, SW_SHOWNORMAL) ; Application.Terminate; But this won't work in my case because of the mutex. Even if I release the mutex before starting the second instace it won't work because shutdown takes some time and two instance cannot run in parallel (because of common resources and other effects). Is there a way to restart an application with such characteristics? (If possible without an additional executable) Thanks in advance.

    Read the article

  • Delphi - online technical tests

    - by RBA
    I have searched for some online Delphi programming tests, and except the small test for Delphi certification and several tests on Delphi.about.com I did find nothing. Any ideas where I can find some Delphi online tests? LE: defining online Delphi programming tests: - technical questions about Delphi fundamentals,Data types,classes, libraries, generics, database concepts, etc. Examples here (Delphi Developer Certification Exam Study Guide) and here. LE2: tests to take after you have read all the articles from this question: Questions every good Delphi developer should be able to answer?

    Read the article

  • Replacing a unicode character in UTF-8 file using delphi 2010

    - by Jake Snake
    I am trying to replace character (decimal value 197) in a UTF-8 file with character (decimal value 65) I can load the file and put it in a string (may not need to do that though) SS := TStringStream.Create(ParamStr1, TEncoding.UTF8); SS.LoadFromFile(ParamStr1); //S:= SS.DataString; //ShowMessage(S); However, how do i replace all 197's with a 65, and save it back out as UTF-8? SS.SaveToFile(ParamStr2); SS.Free; -------------- EDIT ---------------- reader:= TStreamReader.Create(ParamStr1, TEncoding.UTF8); writer:= TStreamWriter.Create(ParamStr2, False, TEncoding.UTF8); while not Reader.EndOfStream do begin S:= reader.ReadLine; for I:= 1 to Length(S) do begin if Ord(S[I]) = 350 then begin Delete(S,I,1); Insert('A',S,I); end; end; writer.Write(S + #13#10); end; writer.Free; reader.Free;

    Read the article

  • Adding files to the DPR file vs project paths in Delphi 2010

    - by Robert McCabe
    We are just migrating from D7 to D2010 and are having a debate about cleaning up the project paths. We have a number of directories with a large number of Pas files that are included on some project paths, but only a few of the files are actually used by any single project. One option is to eliminate the project paths completely and only have all used files in the dpr. The second option is to keep only the needed files in the dpr and have project paths to the directories for the rest of the files. Is there any argument for one option over the other?

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >