Search Results

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

Page 130/227 | < Previous Page | 126 127 128 129 130 131 132 133 134 135 136 137  | Next Page >

  • How to Create a Simple Dictation Pad in Delphi2009+Vista

    - by XBasic3000
    the code are not so complecated.. private { Private declarations } SpSharedRecoContext1 : TSpSharedRecoContext; fMyGrammar : ISpeechRecoGrammar; procedure SpSharedRecoContext1Recognition(ASender: TObject; StreamNumber: Integer; StreamPosition: OleVariant; RecognitionType: SpeechRecognitionType; const Result: ISpeechRecoResult); procedure SpSharedRecoContext1Hypothesis(ASender: TObject; StreamNumber: Integer; StreamPosition: OleVariant; const Result: ISpeechRecoResult); procedure TForm1.FormCreate(Sender: TObject); begin SpSharedRecoContext1 := TSpSharedRecoContext.Create(self); SpSharedRecoContext1.OnHypothesis := SpSharedRecoContext1Hypothesis; SpSharedRecoContext1.OnRecognition :=SpSharedRecoContext1Recognition; fMyGrammar := SpSharedRecoContext1.CreateGrammar(0); fMyGrammar.DictationSetState(SGDSActive); end; procedure TForm1.SpSharedRecoContext1Recognition(ASender: TObject; StreamNumber: Integer; StreamPosition: OleVariant; RecognitionType: SpeechRecognitionType; const Result: ISpeechRecoResult); begin Memo1.Text := Result.PhraseInfo.GetText(0,-1,true); end; procedure TForm1.SpSharedRecoContext1Hypothesis(ASender: TObject; StreamNumber: Integer; StreamPosition: OleVariant; const Result: ISpeechRecoResult); begin Memo1.Text := Result.PhraseInfo.GetText(0,-1,true); end; My Problem, was the vista-OS voice command will intercept on my program. if i say "START", instead of writing start on memo1 it press the start menu on my desktop. or what ever command like START CANCEL EDIT DELETE SELECT etc. please help..... sorry for my english

    Read the article

  • Limiting method access in protected section to few classes

    - by Bharat
    Hi, I want to limit the access of protected methods to certain inherited classes only. For example there is a base class like TBase = Class Protected Method1; Method2; Method3; Method4; End; I have two classes derived from TBase TDerived1 = Class(TBase) //Here i must access only Method1 and Method2 End; TDerived2 = Class(TBase) //Here i must access only Method3 and Method4 End; Then is it possible to access only Method1 and Method2 when i use objects of TDerived1 and Method3 and Method4 when i use objects of TDerived2

    Read the article

  • Avoiding "variable might not have been initialized"

    - by Mason Wheeler
    I recently ran across a routine that looks something like this: procedure TMyForm.DoSomething(list: TList<TMyObject>; const flag: boolean); var local: integer; begin if flag then //do something else local := ExpensiveFunctionCallThatCalculatesSomething; //do something else for i := 0 to list.Count do if flag then //do something else if list[i].IntValue > local then //WARNING HERE //do something else end; This gives Variable 'local' might not have been initialized even though you can tell by reading the code that you won't hit that line unless the code branch that initializes it has run. Now, I could get rid of this warning by adding a useless local := 0; at the top of the procedure, but I wonder if there might not be a better way to structure this to avoid the issue. Anyone have any ideas?

    Read the article

  • Stop image from tiling

    - by Glen Morse
    I have a procedure: procedure DrawSolidHexImage(Target: TCanvas; { Canvas to draw hex on } Fillstyle : TBrushStyle; { How to fill the hex } Fillcolor : TColor; { Color to fill it } fillimage : Tbitmap; { Image to show} Linestyle : TPenStyle; { What kind of lines } LineColor : Tcolor; { What color for lines } x,y,radius: integer; { Position and size of Hex } button : boolean); { Make hexes look like buttons? } When I use this, the image is tiled to fill the area. Is there something I can add or must remove to make it not tile? Thus not repeating the image. Maybe make it center? The Code in which I use DrawSolidHexImage looks like: procedure THexMap.ImageAHex(ImageWanted : TBitmap; HexPatternWanted: TBrushStyle; MapLocation:TPoint); var p0:TPoint; begin if FHexMapOn and FDrawSolidMap and (not UseSavedMap) then begin with TempMap.canvas do p0 := ConvertCoords(Point(MapLocation.x,MapLocation.y),ptROWCOL); DrawSolidHexImage(TempMap.Canvas,HexPatternWanted,clGray, Imagewanted,psSolid,LineColor,p0.x,p0.y,hexradius,hex3d); Refresh; end; end;

    Read the article

  • How to read ident from an ini file?

    - by user367856
    i have store a list of items from gridView into registry as below: * frmPOSConfigSet.tblCatItems.First; while not frmPOSConfigSet.tblCatItems.Eof do begin RegItemSetting.WriteString('stk Group\Candy', frmPOSConfigSet.tblCatItemsCODE.Text, frmPOSConfigSet.tblCatItemsSPHOTO.Text); frmPOSConfigSet.tblCatItems.Next; end; * [In Registry Editor] stk Group - Candy - YUPI_GUM_HB , c:\Users\chai\Pictures\POS Item Images\image1.jpg - YUPI_GUM_SBKISS , c:\Users\chai\Pictures\POS Item Images\image2.jpg After i close the form and open again, all values in gridView is gone, how do i retrieve the ident (eg. YUPI_GUM_HB) and it's value (eg.c:\Users\chai\Pictures\POS Item Images\image1.jpg) from registry to the gridView when load the form?

    Read the article

  • Is there a faster TList implementation ?

    - by dmauric.mp
    My application makes heavy use of TList, so I was wondering if there are any alternative implementations that are faster or optimized for particular use case. I know of RtlVCLOptimize.pas 2.77, which has optimized implementations of several TList methods. But I'd like to know if there is anything else out there. I also don't require it to be a TList descendant, I just need the TList functionality regardless of how it's implemented. It's entirely possible, given the rather basic functionality TList provides, that there is not much room for improvement, but would still like to verify that, hence this question.

    Read the article

  • What does Indy's HandleRedirect do?

    - by Robert Frank
    I'm having some trouble reading files with Indy from a site that has WordPress installed. It appears that the site is configured to redirect all hits to sitename/com/wordpress. Can I use HandleRedirect to turn that off so I can read files from the root folder? What is the normal setting for this property? Any downsides to using it for this purpose? (Edit: it appears that my problem may be caused by Windows cacheing of a file I've accessed before through Indy. I'm using fIDHTTP.Request.CacheControl := 'no-cache'; is that adequate?

    Read the article

  • insert number of days of year, months, days of month

    - by ml
    How can I insert in a database the number of days of the year and at the same time insert in the same record the month, day of the month, and the day of the week? This is my table: tabela/coluna.Dias_ano(registo 1...365) Year:=StrToInt(ano.Text); diasano.Text:= IntToStr( DaysInAYear(Year) ); diasAno| Mes |diames |dia semana | 1 | janeiro | 1 |Segunda | 2 | janeiro | 2 | Terça | ... 365 | Dezembro | 31 | Segunda

    Read the article

  • How to know user is dragging something when the cursor is not in my window?

    - by Edwin
    Hi folks, We all know you can implement drag-and-drop feature for your Window so that it accepts drag and drop operation, but my question is, how to detect a drag-and-drop operation that's is in progress in other windows, for example, dragging a file in the Windows Explorer? What I want to do is that when a user is dragging a file then my hidden window shows up. Thank you!

    Read the article

  • Check if a thread exists by it handle

    - by SaCi
    When I create a thread I save it handle in a list. After a time I want to check which of them still exists. I'm not looking for other kind of implementation, I want to know if is there some how to get a thread by it handle ?

    Read the article

  • TWebBrowser modal print dialog?

    - by Steve
    Hello all, I've found many ways to make the TWebBrowser show a modeless print dialog box, but how do I make it show a modal one? I would like to print an html page, that's why I need the modal dialog. I'd really appreciate your ideas on this one. Thanks!

    Read the article

  • Creating compound applications in Windows 7

    - by Mmarquee
    I need to port a suite of Windows applications (running under XP with little security turned on) to Windows 7 with various levels of security, depending on how our clients may configure it. Each functional area is a seperate executable or DLL that is downloaded and registered by a central 'compound' application. This means that the different parts are all joined together to form in effect a large single application. My problem is that the compound application knows about the other applications via COM registery, either as a typelibrary or as OCXs, where appropriate. I have tried several questions here to try and solve the problems I am getting, but I don't seem to be able to get around the problem of needing elevated access to register applications and access the registry. Our clients will be expecting the same (relatively) seemless download and activation process as current under XP. So does anyone have a solution for registering typelibraries and OCX controls without need to go through an elevation process. Thanks in advance

    Read the article

  • Word 2007 macros: is there an OnPrint event I can attach a macro to?

    - by notnot
    I'm looking to do a formatting check on word files before they get sent to the printer and it needs to be completely transparent to the user (no extra controls, just using the standard print options available through the UI). Is there an OnPrint or BeforePrint event, or something that can be used in that respect which I could attach a macro to, the same way I can with Open, Close, or Save? This feels like it should be simple... but those are famous last words. Thanks in advance, Rob

    Read the article

  • Grouping DLL's for use in Executable

    - by Peter Turner
    Is there a way to group a bunch of DLL's and still use them at run time (not zipped up). Sorry this question sounds terse and stupid, but I'm not sure what more to ask. I'll explain the situation though: We've had two standalone Windows Applications and now one of our Applications has swelled to such ungainly proportions that the other application cannot run outside of the scope of the first app. We want to maintain some of the encapsulation we had while letting the smaller program in on some of the bigger program's features. There is no problem in running the application, other than we don't want to send out all the 20-30 DLL's that the smaller project has.

    Read the article

  • In Powerpoint 2007, how can I position a Callout's Tail programatically?

    - by Rorschach
    I'm looking at the XML and this is what it has for the Callout object's coordinates and geometry: <p:spPr> <a:xfrm> <a:off x="2819400" y="5181600"/> // X,Y Position of Callout Box <a:ext cx="609600" cy="457200"/> // Width,Height of Callout Box </a:xfrm> <a:prstGeom prst="wedgeRectCallout"> <a:avLst> <a:gd name="adj1" fmla="val 257853"/> // X Position Of Tail <a:gd name="adj2" fmla="val -532360"/> // Y Position of Tail </a:avLst> </a:prstGeom> <a:solidFill> <a:schemeClr val="accent1"> <a:alpha val="50000"/> </a:schemeClr> </a:solidFill> </p:spPr> What I'm having trouble with is the formula for telling it to place the tail at a particular coordinate on the slide. I've tried this to calculate it, but it does not work correctly. //This gives me the distance between the Coordinate and the Center of the Callout. DistanceX = Coordinate.X - (Callout.X + Callout.X_Ext)/2 DistanceY = Coordinate.Y - (Callout.Y + Callout.Y_Ext)/2 But, the geometric value is not the distance between the two points. Anybody know what the formula is for calculating this?

    Read the article

  • Access denied from another thread

    - by Lobuno
    Hello! In a program I span a thread ("the working thread"). Hera I copy some files write some data to a database and eventually, delete some other files or directories. Everything works fine. The problem is now, that I decided to move the deleting operation to some other thread. So the working thread now copies the files or directories, writes to the database, and , if there is a need to delete some other files this thread spans another thread and that second thread deleted the needed files or directories. The problem is that,the deletion used to work 100% when done in the working thread, now when the same is done in the secondary thread, I sometimes get an "Access denied" error and the files cannot be deleted. And no, the working thread is definitely NOT acceding the files and directories to delete at this moment. Sometimes (but not always) the main thread is impersonating some user, so if needed , the deleting thread is also running under impersonation just to grant the needed permissions to delete the files, so that should not be the problem. Anybody has a clue why this could be happening?

    Read the article

  • How to show the elapsed time on a long Query execution?

    - by Salvador
    i need to show a popup window before the a query execution, and close that windows when the query ends. actually i do something like this var frm : tFrmPopupElapsed; // this form have a ttimer and a tlabel to show the elapsed time //but the tlabel is not updated, i tried using update; and refresh; but nothing happens //the timer is enabled. begin frm:=tform.create(nil); frm.Init;//this procedure set the timer to enabled:=true try frm.Show(); ExecuteMyVeryLongQuery(); finally frm.Close; end; end; wich is the best way using a ttimer? a Tthread ? thanks in advance.

    Read the article

  • Trouble passing a string as a SQLite ExecSQL command

    - by Hackbrew
    I keep getting the ERROR: near "PassWord": syntax error when trying to execute the ExecSQL() statement. The command looks good in the output of the text file. In fact, I copied & pasted the command directly into SQLite Database Browser and the commend executed properly. Here's the code that's producing the error: procedure TForm1.Button1Click(Sender: TObject); var i, iFieldSize: integer; sFieldName, sFieldType, sFieldList, sExecSQL: String; names: TStringList; f1: Textfile; begin //Open Source table - Table1 has 8 fields but has only two different field types ftString and Boolean Table1.TableName:= 'PWFile'; Table1.Open; //FDConnection1.ExecSQL('drop table PWFile'); sFieldList := ''; names := TStringList.Create; for i := 0 to Table1.FieldCount - 1 do begin sFieldName := Table1.FieldDefList.FieldDefs[i].Name; sFieldType := GetEnumName(TypeInfo(TFieldType),ord(Table1.FieldDefList.FieldDefs[i].DataType)); iFieldSize := Table1.FieldDefList.FieldDefs[i].Size; if sFieldType = 'ftString' then sFieldType := 'NVARCHAR' + '(' + IntToStr(iFieldSize) + ')'; if sFieldType = 'ftBoolean' then sFieldType := 'INTEGER'; names.Add(sFieldName + ' ' + sFieldType); if sFieldList = '' then sFieldList := sFieldName + ' ' + sFieldType else sFieldList := sFieldList + ', ' + sFieldName + ' ' + sFieldType; end; ListBox1.Items.Add(sFieldList); sExecSQL := 'create table IF NOT EXISTS PWFile (' + sFieldList + ')'; // 08/18/2014 - Entered this to log the SQLite FDConnection1.ExecSQL Command to a file AssignFile(f1, 'C:\Users\Test User\Documents\SQLite_Command.txt'); Rewrite(f1); Writeln(f1, sExecSQL); { insert code here that would require a Flush before closing the file } Flush(f1); { ensures that the text was actually written to file } CloseFile(f1); FDConnection1.ExecSQL(sFieldList); Table1.Close; end; Here's the actual command that gets executed: create table IF NOT EXISTS PWFile (PassWord NVARCHAR(10), PassName NVARCHAR(10), Dept NVARCHAR(10), Active NVARCHAR(1), Admin INTEGER, Shred INTEGER, Reports INTEGER, Maintain INTEGER)

    Read the article

  • Is it possible to simulate TMenuBreak functionality with Dev Express TdxBarSubItems?

    - by mcmar
    In my application I'm dynamically adding new TdxBarSubItems based off of a SQL query. In some cases the result set is rather large so the menu fills the entire screen and sometimes has a down arrow to scroll the list. In a previous version of the code before switching to Dev Express, I was able to add TMenuBreak objects to make the list divide into columns. Is there a way to do this with Dev Express components?

    Read the article

  • How to Integrate SharePoint 2007/2010 and Google Apps?

    - by goober
    Hello All, My (smaller) company has an existing Google Apps Deployment, used for E-Mail / Calendar, etc. I'm looking into a SharePoint setup (2010 most likely). One of the best features is that new events are added to one's Outlook Calendar, e-mails can be sent automatically, etc. Naturally, this works best out-of-the-box with Exchange. I know I can add my own OpenID login system via an OpenID provider for SharePoint and get my users into the system. My question is, can anyone recommend the best way to go about making sure that events automatically find their way into users' calendars and e-mails on the Google Apps system? This would enable us to deploy SharePoint without worrying about migrating our e-mail system to Exchange first (Google Apps is more cost-effective for our needs and I'm required to keep it.) Thanks in advance for any help!

    Read the article

  • What is the component a popup menu click originated from

    - by Ralph Rickenbach
    Having a popup menu attached to several components on a form (buttons, but also things like TCharts), I would like to know which component was right clicked to start the popup menu in the first place. The Sender parameter of the click method just points to the TMenuItem, its parent to the popup menu (or the parenting menu item). How do I get the originating component?

    Read the article

< Previous Page | 126 127 128 129 130 131 132 133 134 135 136 137  | Next Page >