forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


If there's a dll developer with some spare time.. check this

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Miscellaneous
View previous topic :: View next topic  
Author Message
Vic D'Elfant
Past Contributor
Past Contributor


Joined: 26 Jun 2002
Posts: 673
Location: The Netherlands

PostPosted: Fri Jun 11, 2004 2:11 pm    Post subject: If there's a dll developer with some spare time.. check this Reply with quote

Hello,
I was wondering if any of the vds dll developers has some spare time, and could turn this code into a simple vds dll:

Code:

var
  Info: PBitmapInfo;
  InfoSize: DWORD;
  Image: Pointer;
  ImageSize: DWORD;
  Bits: HBITMAP;
  DIBWidth, DIBHeight: LongInt;
begin
  Printer.BeginDoc;
  try
    Canvas.Lock;
    try
      { Paint bitmap to the printer }
      with Printer do
      begin
        Bits := bmp.Handle;
        GetDIBSizes(Bits, InfoSize, ImageSize);
        Info := AllocMem(InfoSize);
        try
          Image := AllocMem(ImageSize);
          try
            GetDIB(Bits, 0, Info^, Image^);
            with Info^.bmiHeader do
            begin
              DIBWidth := biWidth;
              DIBHeight := biHeight;
            end;
            StretchDIBits(Canvas.Handle, 0, 0, DIBWidth, DIBHeight, 0, 0,
              DIBWidth, DIBHeight, Image, Info^, DIB_RGB_COLORS, SRCCOPY);
          finally
            FreeMem(Image, ImageSize);
          end;
        finally
          FreeMem(Info, InfoSize);
        end;
      end;
    finally
      Canvas.Unlock;
    end;
  finally
    Printer.EndDoc;
  end;
end;

Source: http://www.scalabium.com/faq/dct0090.htm

This dll must print the bitmap to the default printer without any interference of Windows, and must also stretch the over the whole paper (A4, the normal paper size), because the size of the bitmap depends on the screen resolution of the computer, and my bitmaps need to cover the whole paper.
You can download an example bitmap (with barcodes) here: http://vic.vdsworld.com/dump/barcodes.zip

Tommy was creating such a print dll for me, but somehow it prints an empty paper at a Lexmark laser printer, and I don't feel comfortable bothering him for every tiny thing, especially because he's so busy with school Confused

I'm almost sure that it has something to do with way of printing he's using in his dll.... have a look at this quote:
http://www.scalabium.com/faq/dct0090.htm wrote:
But this code will work correctly not with any printer! For example, Epson Stylus 300 this code will print the image with very bad quality and on some printer you can receive a blank paper... The reason of this - using the StretchBlt function for output but in MSDN you can read that this function does not guarantee a correct outputing from one device to other.


I cannot use the 'shell print' command, because then my end-users would have to hit OK about 500 times to get all 500 pages printed.

Thanks in advance,
Vic

_________________
phpBB Development Team
Back to top
View user's profile Send private message Visit poster's website
vdsalchemist
Admin Team


Joined: 23 Oct 2001
Posts: 1448
Location: Florida, USA

PostPosted: Mon Jun 14, 2004 1:23 pm    Post subject: Reply with quote

Hi Vic,
The new version of Gadget already has this ability built in Wink Also the new version of Gadget has the ability to print your VDS Dialog like a form and other things directly to the default printer. I am working on the examples for this currently.

_________________
Home of

Give VDS a new purpose!
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Mon Jun 14, 2004 3:11 pm    Post subject: Reply with quote

Woh, with all the great things you are building into Gadget, I guess it will never be finished... Wink
_________________
[ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial!
Back to top
View user's profile Send private message
Vic D'Elfant
Past Contributor
Past Contributor


Joined: 26 Jun 2002
Posts: 673
Location: The Netherlands

PostPosted: Mon Jun 14, 2004 3:14 pm    Post subject: Reply with quote

I hardly can wait till it's finished Very Happy

Vic

_________________
phpBB Development Team
Back to top
View user's profile Send private message Visit poster's website
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Mon Jun 14, 2004 6:48 pm    Post subject: Reply with quote

Can we still buy it at the low price now and get the update when it comes out? Smile
_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
vdsalchemist
Admin Team


Joined: 23 Oct 2001
Posts: 1448
Location: Florida, USA

PostPosted: Mon Jun 14, 2004 7:31 pm    Post subject: Reply with quote

FreezingFire wrote:
Can we still buy it at the low price now and get the update when it comes out? Smile


Yes but you better hurry Wink I will put some temporary links so people who want to buy the beta may do so. Because once the final is released that price will be no longer.
Now I am not saying that I will be charging some crazy price for the final but I will be charging what I think would be fair for what it has taken to put this all together.
The reason this DLL has taken so long is because I wanted VDS to have many of the same abilities that most other languages already have. Where the other languages usually have the advantage of multiple programmers working on it I am only one so please be patient. Also for the most part my programming skills are not that great and it takes a lot of trial and error to get this stuff right. Did I mention that I was really really slow at programming Wink

_________________
Home of

Give VDS a new purpose!
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Tommy
Admin Team


Joined: 16 Nov 2002
Posts: 746
Location: The Netherlands

PostPosted: Mon Jul 05, 2004 5:32 am    Post subject: Reply with quote

Vic,

Please tell me if the DLL I released will do or if I would have to update it with the
code you posted in this topic.

Tommy
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Miscellaneous All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group