Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. bobbie100

    Free TBitmap palette

    I have some code for converting a color bitmap to 8-bit grayscale bitmap (GrayBmp: TBitmap) which includes the following: var GrayPalette: TMaxLogPalette; begin GrayBmp.PixelFormat := pf8Bit; SetGray256Palette(GrayPalette); // Set palette colors GrayBmp.Palette :=...
  2. bobbie100

    Hints not displaying for TMainMenu

    Clive, Your reply has been invaluable! I used it to persuade my customer that this really was a BAD idea, even though he had originally insisted that was what he wanted (the customer is always right!). I had thought it was easy from reading the Delphi help and the fact that Hint was a...
  3. bobbie100

    Hints not displaying for TMainMenu

    I have several forms that use a TMainMenu. I want to display the Hint item for the various menu and (where applicable) submenu items. However none of the hints I set are displayed. I have buttons on the same forms that correctly display their hints. I have checked that Application.ShowHint is...
  4. bobbie100

    Resizing issues with TAcroPDF

    I'm trying to use the ActiveX PDF component that comes with Delphi 7. All works fine, EXCEPT the area used by the component to display the document on the form doesn't change as the form size changes. The component reports the correct changed size for both the width/height and...
  5. bobbie100

    Lost component palette toolbar

    In the end bit the bullet and went through a full Delphi 7 reinstall. After reinstalling various associated packages and customizing the toolbars (again!) everything seems to be back to normal. Thanks to all for spending the time to read and respond. Please learn from my problem - Exit...
  6. bobbie100

    Lost component palette toolbar

    Tried renaming directories and deleting files, but all to no avail. Problem occurs with all projects, even if I just open Delphi with blank project. I have never saved any desktops and don't even have any .dst files on my disks. Any other suggestions gratefully received. Bob "To err is...
  7. bobbie100

    Lost component palette toolbar

    I made the mistake of doing some testing on the effects of changing the user setting of the windows Font Size while having Delphi 7 open. After I changed from Normal to Extra Large my Delphi toolbar layout had been thrown into complete disarray. Worst of all after I changed back to Normal the...
  8. bobbie100

    Compressed data in a .res file

    Many thanks to you all for your suggestions. Plenty of options for me choose from. Bob "To err is human, but you have to be a programmer to really screw things up!"
  9. bobbie100

    Compressed data in a .res file

    The program I am working on incorporates a large amount of ascii data which is input as RC_Data within a .res file. This data dominates the size of the executable. Is there any way of storing the data in a compressed format (e.g. zip) within a res file, and then uncompressing when it is loaded...
  10. bobbie100

    Restore form given handle

    Forgot to mention a problem I encountered while implementing Pikkunero's code. At first the ShowWindow and SetForegroundWindow lines weren't doing anything. After much investigation found that the problem was because the program name and Application.Title were the same. For example the...
  11. bobbie100

    Restore form given handle

    Many thanks Pikkunero for your help (I have given you a star for your efforts!). Obviously I should have been looking for the handle to TApplication rather than the main window. I have now implemented the multiple instance checking with the Mutex check and using a single FindWindow of the form...
  12. bobbie100

    Restore form given handle

    Searching more through other threads and looking more into the API seem to suggest IsIconic(PrevHandle) should return True when the window is minimized. However, inserting PrevIconic := IsIconic(PrevHandle); before ShowWindow(PrevHandle, SW_RESTORE); in my earlier example returns False...
  13. bobbie100

    Restore form given handle

    SetActiveWindow doesn't do it and I'm not sure how to use WM_ACTIVATEAPP and WM_ACTIVATE (even after reading the Win32API help!). Maybe it would be best if I showed a very simplified example of the problem. Open a new project and replace Project1 with the following and compile.program Project1...
  14. bobbie100

    Restore form given handle

    Unfortunately SW_RESTORE has the same effect! Although the window is being displayed correctly, if you right click on the symbol in the task bar the Restore item is bold and Minimize is greyed out. It's as though windows hasn't realised the window is no longer minimized. I am running Win XP if...
  15. bobbie100

    Restore form given handle

    I have the handle of another application's main form of a known type. I want to display that form in the foreground in the Default (Normal) condition. The current state of the form is either Minimized or Normal. The best I have achieved is by using: ShowWindow(FormHandle, SW_SHOWDEFAULT)...
  16. bobbie100

    Convert pf24Bit truecolor bitmap to pf8Bit grayscale

    I want to convert a truecolor bitmap with HandleType bmDIB and PixelFormat pf24Bit into a 256 grayscale with PixelFormat pf8Bit. I have a function for converting a pf24Bit bitmap to grayscale procedure ConvertBmpToGrayscale(var Bmp: TBitmap); const MaxPixelCount = 32768; type...
  17. bobbie100

    jpg to bitmap?

    jb Could you include some of the code you have tried that does not work. It is much easier to understand and solve the problems if real code is included. Bob
  18. bobbie100

    jpg to bitmap?

    I can use the bitmap canvas in a CopyRect using the following code. Just open Delphi and add a button and a TImage to the form, then insert this code in Unit1. You will need to insert a file path to a .jpg on your hard disk. unit Unit1; interface uses Windows, Messages, SysUtils, Variants...
  19. bobbie100

    LoadFromFile and SaveToFile exceptions

    Thanks guys, but my emphasis was on generating useful messages instead of the annoying "failed" with no hint what caused it. For instance failures to save a file might include file access problems, or problems during the write process (e.g. disk full). Any ideas what exceptions to catch to...
  20. bobbie100

    Graphics

    I'm not clear from your post what you are what you are trying to do. Assuming you are trying to print from a bitmap, I have successfully used something similar to the following code. Note: The input bmp must be a device independent bitmap (Bmp.HandleType := bmDIB) { Print a device independent...

Part and Inventory Search

Back
Top