Search Results

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

Page 49/170 | < Previous Page | 45 46 47 48 49 50 51 52 53 54 55 56  | Next Page >

  • Office Word 2007 Interop - Header FieldCodes not showing up in my code, but are when viewed with Wor

    - by Ryan
    Hello, I'm writing an application in Delphi (have two over revisions of it written in both C# and Visual Basic, also). In my C# and Visual Basic version, I did something like the following to loop through the header/footer FieldCodes: // Supress filename, date and username field codes in headers fieldCount = WordApp.ActiveDocument.Sections[1].Headers[Microsoft.Office.Interop.Word.WdHeaderFooterIndex.wdHeaderFooterPrimary].Range.Fields.Count; for (Int32 x = 1; x <= fieldCount; x++) { if ((WordApp.ActiveDocument.Sections[1].Headers[Microsoft.Office.Interop.Word.WdHeaderFooterIndex.wdHeaderFooterPrimary].Range.Fields[x].Type == Microsoft.Office.Interop.Word.WdFieldType.wdFieldDate) || (WordApp.ActiveDocument.Sections[1].Headers[Microsoft.Office.Interop.Word.WdHeaderFooterIndex.wdHeaderFooterPrimary].Range.Fields[x].Type == Microsoft.Office.Interop.Word.WdFieldType.wdFieldFileName) || (WordApp.ActiveDocument.Sections[1].Headers[Microsoft.Office.Interop.Word.WdHeaderFooterIndex.wdHeaderFooterPrimary].Range.Fields[x].Type == Microsoft.Office.Interop.Word.WdFieldType.wdFieldUserName)) { WordApp.ActiveDocument.Sections[1].Headers[Microsoft.Office.Interop.Word.WdHeaderFooterIndex.wdHeaderFooterPrimary].Range.Fields[x].Select(); WordApp.Selection.TypeText("{ " + WordApp.ActiveDocument.Sections[1].Headers[Microsoft.Office.Interop.Word.WdHeaderFooterIndex.wdHeaderFooterPrimary].Range.Fields[x].Code.Text + " }"); } } In my Delphi one I'm doing the same kind of routine. But, I've got a Word file that I'm trying to process and it has a Date FieldCode in the Header. My code is not finding the field code for some odd reason. It says there's no Fields in the Header. Does anyone know if there's such thing as like hidden FieldCodes, or something that would cause these to not show up in my code? Thanks, Ryan

    Read the article

  • String trouble in Rave Reports 8

    - by Jørn E. Angeltveit
    We are currently working with Delphi 2006, but we are now very ready to move on to Delphi 2010. The problem lies in our Rave reports, though... We just get to many string errors when running our reports with Rave 8. And they just don't make any sense. (The reports compile with no error, and we can even run them without any error in Rave 6.) For instance: //This event causes access violation (in rtl14.bpl) at run time { Event for Page1.OnBeforeReport } function Page1_OnBeforeReport(Self: TRavePage); var s: String; begin s := 'My text in param'; s := s + ' and som more text'; s := copy(s,1,length(s)) + ' and then some more'; RaveProject.SetParam('MyTestParam', s); end OnBeforeReport; //This event works OK { Event for Page1.OnBeforeReport } function Page1_OnBeforeReport(Self: TRavePage); var s: String; begin s := 'My text in param'; s := s + ' and som more text'; s := copy(s,1,length(s)); // + ' and then some more'; RaveProject.SetParam('MyTestParam', s); end OnBeforeReport; //This event works OK too { Event for Page1.OnBeforeReport } function Page1_OnBeforeReport(Self: TRavePage); var s: String; begin s := 'My text in param'; s := s + ' and som more text'; s := copy(s,1,length(s)) + s; RaveProject.SetParam('MyTestParam', s); end OnBeforeReport; We really want to stick to Rave, because we have a lot of reports (150+) with a lot of functionality (sql statements, events etc). Besides, we have customers who have designed their own custom reports as well. Does anybody know the reason for these errors? Is there any solution or workaround to these problems?

    Read the article

  • Run an ActiveX through Web

    - by balexandre
    We have a webpage that works fine on the local computer as it uses a COM Object that is only available in the local computer. the program generates HTML code: <html> <head> <script type="text/javascript"> <!-- function ResizeControl(){Y = document.body.clientHeight;if (Y < 1) {Y = 1}X = document.body.clientWidth;if (X < 1) {X = 1}ActiveX.width = X;ActiveX.height = Y} --> </script> <style type="text/css">html, body { overflow:hidden; } </style> </head> <body OnResize="ResizeControl()" OnLoad="ResizeControl()" leftmargin="0" topmargin="0" rightmargin="0" bottommargin="0"> <object id="ActiveX" classid="CLSID:8EC68701-329D-4567-BCB5-9EE4BA43D358" width="14" height="14"> <PARAM NAME="tabName" VALUE="Complaints"> </object> </body> </html> and shows fine My question is, How can we port this into a web environment? As the Delphi developer has no idea and I'm not a Delphi fellow. I want to be able to use this "webpage" on a web address http://INTRANET/mysite/thispage.html Any idea, any though, any door to open is greatly appreciate :)

    Read the article

  • Does a VCL OrgChart component with decent features exists? Is there a viable alternative?

    - by user193655
    I am using DevExpress OrgChart component that is still maintained but not developed since 2003 (fortunately bugs are fixed, but nothing more). Honestly this component, even if it starts to look too old still suffices my requirements except for 2 things: 1) it doesn't support at all the staff feature, for understanding what I mean see this image (where the items in staff are Administration, Communication, IT, Special Projects). 2) it arranges the items without optimizing the space, for example if there are 3 items at top level, and only the second item has 2 childs, the top items items are drawn more distantly, because of the 2 childs, there is no an option for "shirinking" the diagram. Of course the component misses tons of the features one would expect from an OrgChart tool, but in my case Those 2, and expecially (1) are important, the rest is lack of eye-candy. I look for VCL components, but if (as I fear, since I never found it) such component doesn't exist) I can see the following alternatives: i) using Hydra with .net winforms components ii) using ActiveX components. Between the 2 I would prefer ActiveX because of the .NET deployment hell (what I like about Delphi is that you ship the exe to the customer witn Win2k and it works). Anyway I never used an activeX control and I don't know which are the deployment issues, but I fear I will lose the opportunity of replacing an exe and upgrading the software. iii) hire a delphi component develoeper that can customize the DevEx component by adding feature (1) and maybe (2). I am stuck.

    Read the article

  • Our GUI Situation

    - by shawn-harrison
    These days, any decent Windows desktop application must perform well and look good under the following conditions: 1) XP and Vista and Windows 7. 2) 32 bit and 64 bit. 3) With and without Themes. 4) With and without Aero. 5) At 96 and 120 and perhaps custom DPIs. 6) One or more monitors (screens). 7) Each OS has it's own preferred Font. Oh My! What is a lowly little Windows desktop application developer to do :(. I'm hoping to get a thread started with suggestions on how to deal with this Gui dilemma. First off, I'm on Delphi 7. a) Does Delphi 2010 bring anything new to the table to help with this situation? b) Should we pick an aftermarket component suite and rely on them to solve all these problems? c) Should we go with an aftermarket skinning engine? d) Perhaps a more html type gui is the way to go. Can we make a relatively complex gui app with html that doesn't require using a browser? (prefer to keep it form based) e) Should we just knuckle down and code through each one of these scenarios and quit bitching about it? f) And finally, how in the world are we supposed to test all these conditions? thanks, shawnH

    Read the article

  • Using ZLib unit to compress files vs using ZipForge

    - by user193655
    There are many questions on zipping in Delphi, anyway this is not a duplicate. I am using ZipForge for zip/unzip capability in my application. Currently I use 2 features of ZipForge: 1) zip and unzip (!) 2) password protect the archives Now I am removing the password from all the archives so I need only to zip and unzip files. I zip them just for minimizing bandwith when uploading/downloading files from the server. So my idea is to process all files once for unzipping them (with password) and rezipping them without password. I have nothing against ZipForge, anyway it is an extra component, every time I upgrade to a newest Delphi version I have to wait for the new IDE support and moreover the more components the more problems during the installation. So since what I do is very simple I'd like to replace ZipForge with 2 simple functinos using the ZLib unit. I found (and tested) the functions here on Torry's. What do you think of using Zlib unit? Do you see any potential problem that I would not have with ZipForge? Can you comment on speed?

    Read the article

  • How should developers cope with so many GUI configuration combinations?

    - by shawn-harrison
    These days, any decent Windows desktop application must perform well and look good under the following conditions: XP and Vista and Windows 7. 32 bit and 64 bit. With and without Themes. With and without Aero. At 96 and 120 and perhaps custom DPIs. One or more monitors (screens). Each OS has its own preferred font. Oh my! What is a lowly little Windows desktop application developer to do? :( I'm hoping to get a thread started with suggestions on how to deal with this GUI dilemma. First off, I'm on Delphi 7. a) Does Delphi 2010 bring anything new to the table to help with this situation? b) Should we pick an aftermarket component suite and rely on them to solve all these problems? c) Should we go with an aftermarket skinning engine? d) Perhaps a more HTML-type GUI is the way to go. Can we make a relatively complex GUI app with HTML that doesn't require using a browser? (prefer to keep it form based) e) Should we just knuckle down and code through each one of these scenarios and quit bitching about it? f) And finally, how in the world are we supposed to test all these conditions?

    Read the article

  • Fun with casting and inheritance

    - by Vaccano
    NOTE: This question is written in a C# like pseudo code, but I am really going to ask which languages have a solution. Please don't get hung up on syntax. Say I have two classes: class AngleLabel: CustomLabel { public bool Bold; // code to allow the label to be on an angle } class Label: CustomLabel { public bool Bold; // Code for a normal label // Maybe has code not in an AngleLabel (align for example). } They both decend from this class: class CustomLabel: Control { protected bool Bold; } The bold field is exposed as public in the descended classes. No interfaces are available on the classes. Now, I have a method that I want to beable to pass in a CustomLabel and set the Bold property. Can this be done without having to 1) find out what the real class of the object is and 2) cast to that object and then 3) make seperate code for each variable of each label type to set bold. Kind of like this: public void SetBold(customLabel: CustomLabel) { AngleLabel angleLabel; NormalLabel normalLabel; if (angleLabel is AngleLabel ) { angleLabel= customLabel as AngleLabel angleLabel.Bold = true; } if (label is Label) { normalLabel = customLabel as Label normalLabel .Bold = true; } } It would be nice to maybe make one cast and and then set bold on one variable. What I was musing about was to make a fourth class that just exposes the bold variable and cast my custom label to that class. Would that work? If so, which languages would it work for? (This example is drawn from an old version of Delphi (Delphi 5)). I don't know if it would work for that language, (I still need to try it out) but I am curious if it would work for C++, C# or Java. If not, any ideas on what would work? (Remember no interfaces are provided and I can not modify the classes.) Any one have a guess?

    Read the article

  • How can you change the font color of a theme-enabled control?

    - by Edouard Westphal
    Yes, this is again this question: How can I change the font color of a TCheckBox (or any handled control) with Delphi7-Delphi2007 on a themes enabled application? After reading a lot on the internet and on this site, I found 4 kinds of answer: and Most populare (even from QC): You can't, it's designed like that by Microsoft. Create a component that let you draw it like you want. Buy expensive component set that draws like you want. Do not use themes. OK, but I am still unhappy with that. Giving a user colored feedback for the status of a property/data he has on a form, seems legitimate to me. Then I just installed the MSVC# 2008 Express edition, and what a surprise, they can change the color of the font (property ForeColor of the check box) Then what? It does not seem to be a "it's designed like that, by Microsoft." then now the question again: How can I change the font color of a TCheckBox (or any handled control) with Delphi 7 through Delphi 2007 on a theme-enabled application?

    Read the article

  • Loading a Win32 control in C# (specifically WPF)

    - by Mmarquee
    I have written a set of Win32 dlls that encapsulate a Delphi Frame (see Snippet 1 below), and can load them into another Delphi program by loading the dll and assigning the right variables (Snippet 2). I now want to be able to do the same thing in C# (I can load the DLL in pinvoke, but am unsure how to connect up the control to the basic WPF 'form'. Snippet 1 var frame : TFrame1; function CreateFrame(hParent:TWinControl):Integer; stdcall; export; begin try frame := TFrame1.Create(hParent); frame.Parent := hParent; frame.Align := alClient; finally result := 1; end; end; exports CreateFrame name 'CreateFrame'; Snippet 2 DLLHandle := LoadLibrary('Library/Demo.Frame.dll'); If DLLHandle > 32 then begin ReturnValue := GetProcAddress(DLLHandle, 'CreateFrame'); end; ts1 := TTabSheet.Create(PageControl1); with ts1 do begin PageControl := PageControl1; Name := 'tsExternal'; Caption := 'External'; Align := alClient; ReturnValue (ts1); end; Any help would be greatly appreciated.

    Read the article

  • Regex for date.

    - by Harikrishna
    What should be the regex for matching date of any format like 26FEB2009 30 Jul 2009 27 Mar 2008 29/05/2008 27 Aug 2009 What should be the regular expression for that ? Edit I have regex that matches with 26-Feb-2009 and 26 FEB 2009 with but not with 26FEB2009. So if any one know then please update it. (?:^|[^\d\w:])(?'day'\d{1,2})(?:-?st\s+|-?th\s+|-?rd\s+|-?nd\s+|-|\s+)(?'month'Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)[uarychilestmbro]*(?:\s*,?\s*|-)(?:'?(?'year'\d{2})|(?'year'\d{4}))(?=$|[^\d\w])

    Read the article

  • PL/SQL Sum by hour

    - by Steve
    Hi, I have some data with start and stop date that I need to sum. I am not sure how to code for it. Here are is the data I have to use: STARTTIME,STOPTIME,EVENTCAPACITY 8/12/2009 1:15:00 PM,8/12/2009 1:59:59 PM,100 8/12/2009 2:00:00 PM,8/12/2009 2:29:59 PM,100 8/12/2009 2:30:00 PM,8/12/2009 2:59:59 PM,80 8/12/2009 3:00:00 PM,8/12/2009 3:59:59 PM,85 In this example I would need the sum from 1pm to 2pm, 2pm to 3pm and 3pm to 4pm Any suggestions are appreciated. Steve

    Read the article

  • how i group do this mysql query

    - by moustafa
    i want to make charts system and i think it must be like that 1 jan 2009 = 10 post 2 jan 2009 = 2 post 4 jan 2009 = 10 post 6 jan 2009 = 60 post and i have posts table that has id,user_id,date how i can select from posts to show it like that

    Read the article

  • MS Access Interop - How to set print filename?

    - by Ryan
    Hi all, I'm using Delphi 2009 and the MS Access Interop COM API. I'm trying to figure out two things, but one is more important than the other right now. I need to know how to set the file name when sending the print job to the spooler. Right now it's defaulting to the Access DB's name, which can be something different than the file's name. I need to just ensure that when this is printed it enters the print spool using the same filename as the actual file itself - not the DB's name. My printer spool is actually a virtual print driver that converts documents to an image. That's my main issue. The second issue is how to specify which printer to use. This is less important at the moment because I'm just using the default printer for now. It would be nice if I could specify the printer to use, though. Does anyone know either of these two issues? Thank you in advance. I'll go ahead and paste my code: unit Converter.Handlers.Office.Access; interface uses sysutils, variants, Converter.Printer, Office_TLB, Access_TLB, UDC_TLB; procedure ToTiff(p_Printer: PrinterDriver; p_InputFile, p_OutputFile: String); implementation procedure ToTiff(p_Printer: PrinterDriver; p_InputFile, p_OutputFile: String); var AccessApp : AccessApplication; begin AccessApp := CoAccessApplication.Create; AccessApp.Visible := False; try AccessApp.OpenCurrentDatabase(p_InputFile, True, ''); AccessApp.RunCommand(acCmdQuickPrint); AccessApp.CloseCurrentDatabase; finally AccessApp.Quit(acQuitSaveNone); end; end; end.

    Read the article

  • Translate SQL to OCL ?

    - by Roland Bengtsson
    I have a piece of SQL that I want to translate to OCL. I'm not good at SQL so I want to increase maintainability by this. We are using Interbase 2009, Delphi 2007 with Bold and modeldriven development. Now my hope is that someone here both speaks good SQL and OCL :-) The original SQL: Select Bold_Id, MessageId, ScaniaId, MessageType, MessageTime, Cancellation, ChassieNumber, UserFriendlyFormat, ReceivingOwner, Invalidated, InvalidationReason, (Select Parcel.MCurrentStates From Parcel Where ScaniaEdiSolMessage.ReceivingOwner = Parcel.Bold_Id) as ParcelState From ScaniaEdiSolMessage Where MessageType = 'IFTMBP' and not Exists (Select * From ScaniaEdiSolMessage EdiSolMsg Where EdiSolMsg.ChassieNumber = ScaniaEdiSolMessage.ChassieNumber and EdiSolMsg.ShipFromFinland = ScaniaEdiSolMessage.ShipFromFinland and EdiSolMsg.MessageType = 'IFTMBF') and invalidated = 0 Order By MessageTime desc After a small simplification: Select Bold_Id, (Select Parcel.MCurrentStates From Parcel where ScaniaEdiSolMessage.ReceivingOwner = Parcel.Bold_Id) From ScaniaEdiSolMessage Where MessageType = 'IFTMBP' and not Exists (Select * From ScaniaEdiSolMessage EdiSolMsg Where EdiSolMsg.ChassieNumber = ScaniaEdiSolMessage.ChassieNumber and EdiSolMsg.ShipFromFinland = ScaniaEdiSolMessage.ShipFromFinland and EdiSolMsg.MessageType = 'IFTMBF') and invalidated = 0 NOTE: There are 2 cases for MessageType, 'IFTMBP' and 'IFTMBF'. So the table to be listed is ScaniaEdiSolMessage. It has attributes like: MessageType: String ChassiNumber: String ShipFromFinland: Boolean Invalidated: Boolean It has also a link to table Parcel named ReceivingOwner with BoldId as key. So it seems like it list all rows of ScaniaEdiSolMessage and then have a subquery that also list all rows of ScaniaEdiSolMessage and name it EdiSolMsg. The it exclude almost all rows. In fact the query above give one hit from 28000 records. In OCL it is easy to list all instances: ScaniaEdiSolMessage.allinstances Also easy to filter rows by select for example: ScaniaEdiSolMessage.allinstances->select(shipFromFinland and not invalidated) But I do not understand how I should make a OCL to match the SQL above.

    Read the article

  • MSSQL: How to copy a file (pdf, doc, txt...) stored in a varbinary(max) field to a file in a CLR sto

    - by user193655
    I ask this question as a followup of this question. A solution that uses bcp and xp_cmdshell, that is not my desired solution, has been posted here: stackoverflow.com/questions/828749/ms-sql-server-2005-write-varbinary-to-file-system (sorry i cannot post a second hyperlink since my reputation is les than 10). I am new to c# (since I am a Delphi developer) anyway I was able to create a simple CLR stored procedures by following a tutorial. My task is to move a file from the client file system to the server file system (the server can be accessed using remote IP, so I cannot use a shared folder as destination, this is why I need a CLR stored procedure). So I plan to: 1) store from Delphi the file in a varbinary(max) column of a temporary table 2) call the CLR stored procedure to create a file at the desired path using the data contained in the varbinary(max) field Imagine I need to move C:\MyFile.pdf to Z:\MyFile.pdf, where C: is a harddrive on local system and Z: is an harddrive on the server. I provide the code below (not working) that someone can modify to make it work? Here I suppose to have a table called MyTable with two fields: ID (int) and DATA (varbinary(max)). Please note it doesn't make a difference if the table is a real temporary table or just a table where I temporarly store the data. I would appreciate if some exception handling code is there (so that I can manage an "impossible to save file" exception). I would like to be able to write a new file or overwrite the file if already existing. [Microsoft.SqlServer.Server.SqlProcedure] public static void VarbinaryToFile(int TableId) { using (SqlConnection connection = new SqlConnection("context connection=true")) { connection.Open(); SqlCommand command = new SqlCommand("select data from mytable where ID = @TableId", connection); command.Parameters.AddWithValue("@TableId", TableId); // This was the sample code I found to run a query //SqlContext.Pipe.ExecuteAndSend(command); // instead I need something like this (THIS IS META_SYNTAX!!!): SqlContext.Pipe.ResultAsStream.SaveToFile('z:\MyFile.pdf'); } } (one subquestion is: is this approach coorect or there is a way to directly pass the data to the CLR stored procedure so I don't need to use a temp table?) If the subquestion's answer is No, could you describe the approach of avoiding a temp table? So is there a better way then the one I describe above (=temp table + Stored procedure)? A way to directly pass the dataastream from the client application to the CLR stored procedure? (my files can be any size but also very big)

    Read the article

  • How to deploy a commercial portable application?

    - by plainth
    Hi, We plan to sell a Windows portable application. By 'portable' I mean that it can be run from any Windows computer without installing it. For example from an USB stick etc. However the application while (theoretically) it can work anywhere, is targeted to LAN environments. What solutions do you see that while keeping this advantage (in a more or a lesser degree) to still make money from it? PS: The application is/will be written in Delphi.

    Read the article

  • JEDI controls always recompile

    - by Larry Lustig
    I've just noticed that whenever I do an incremental compile (ctrl-F9) of any of my Delphi 2010 projects, all JEDI units referenced in my project are recompiling although they have not been changed in any way. In fact, if I create a new project, drop a JEDI control on the form and compile, I see all JEDI dependencies getting recompiled. If I think hit ctrl-F9 a second time without making any changes in my project, the same thing happens. Anyone know what's causing this?

    Read the article

  • Clipping users cursor around the X button.

    - by Nowayz
    This should be simple, and I was hoping to do it in Delphi. The purpose of this is just supposed to be a joke. On a windows form application I don't want the user to be able to clip the X button on the main form. I want the cursor to either clip around the X button or just set it's position elsewhere.

    Read the article

  • Stop VCL Child Controls from Inheriting Parent Popup Menu

    - by Anagoge
    I have a Delphi 2007 VCL TPanel with a TPopupMenu assigned to it. There are some TEdit controls on the panel. The edits inherit the popup menu of the parent panel. I want to not allow this popup inheriting, so the edits will show the default Windows TEdit popup menu with Copy, Cut, Paste, etc., but have not found a way to do it yet. There doesn't appear to be a "ParentPopupMenu" type property to set which controls inherit it from the parent component.

    Read the article

< Previous Page | 45 46 47 48 49 50 51 52 53 54 55 56  | Next Page >