1 Attachment(s)
I got the idea from PDF File
Guy's :wave:
I'm facing problems with my team when I try to send to them messages to them emails
because I'm writing that messages with the attached font but that font is not available in them PCs so when they receive any message from me they will receive it with garbage fonts "confusing message" unclear
also I do not like to install that font in them PCs
because I'm looking for another solution to solve this problem
is it possible to create application to let that message as the image like the PDF File can I select the text inside the PDF File also it'll let the text like the image without any confuse inside the PDF file despite that fonts is not available in the fonts folder
http://www.ar4up.com/uploads/258d34e6e8.gif
is it possible to create application and write the message in side the application then copy the texts from the application to the message to let the message like the image
I hope to get my point :wave:
Re: I got the idea from PDF File
:wave: I'm waiting your reply
Re: I got the idea from PDF File
Heres one way to do it, though note it captures the area where the textbox is, so if anything is on top of the textbox it would also get captured!
Code:
Option Explicit
Private Type RECT
Left As Long
Top As Long
Right As Long
Bottom As Long
End Type
Private Declare Function GetWindowRect Lib "user32" (ByVal hwnd As Long, lpRect As RECT) As Long
Private Declare Function BitBlt Lib "gdi32" _
(ByVal hDestDC As Long, ByVal X As Long, _
ByVal Y As Long, ByVal nWidth As Long, _
ByVal nHeight As Long, ByVal hSrcDC As Long, _
ByVal xSrc As Long, ByVal ySrc As Long, _
ByVal dwRop As Long) As Long
Private Declare Function GetDC Lib "user32" _
(ByVal hwnd As Long) As Long
Private Declare Function ReleaseDC Lib "user32" (ByVal hwnd As Long, ByVal hdc As Long) As Long
Code:
Private Sub Command1_Click()
' // Example: Capture Text area and save to BMP file //
Dim TxtArea As RECT
Dim MyDC As Long
MyDC = GetDC(0)
If MyDC Then
Picture1.AutoRedraw = True
Picture1.BorderStyle = 0
Picture1.Height = Text1.Height
Picture1.Width = Text1.Width
GetWindowRect Text1.hwnd, TxtArea
' copy text box area to pic box.
BitBlt Picture1.hdc, 0, 0, TxtArea.Right - TxtArea.Left, _
TxtArea.Bottom - TxtArea.Top, MyDC, TxtArea.Left, TxtArea.Top, vbSrcCopy
' Save as BMP file.
SavePicture Picture1.Image, "C:\TEST.BMP"
ReleaseDC 0, MyDC
End If
End Sub
If you rather save it as a JPG so it's a smaller size you could use this module.
and change
Code:
SavePicture Picture1.Image, "C:\TEST.BMP"
to
Code:
SaveJPG Picture1.Image, "C:\TEST.JPG", 100 ' 100 = best quality
Re: I got the idea from PDF File
it's very beautiful code :wave:
http://www.ar4up.com/uploads/53fe266016.gif
but i want to when i try to press to Save As to ask me to where do you want to save the image , I do not like to save the image directly in C drive
how to can I do that ?
and is it possible to save the text as PDF , I'd like to create another button to Save it As PDF
is it possible to do that :ehh:
Re: I got the idea from PDF File
Why don't you just create PDf from your text file and send it to your friends ?
Re: I got the idea from PDF File
Quote:
Originally Posted by alkater
it's very beautiful code :wave:
but i want to when i try to press to Save As to ask me to where do you want to save the image , I do not like to save the image directly in C drive
how to can I do that ?
For a "Save As" dialog personally I prefer using API code like this, or you could use the Common Dialog control in VB.
Quote:
and is it possible to save the text as PDF , I'd like to create another button to Save it As PDF
is it possible to do that :ehh:
I think there is, offhand don't know, did you try searching? Check out Planet Source Code .com too, lots of code there.
Re: I got the idea from PDF File
I'd like to do the step of PDF file by VB6 if that possible
I'd like to get solution
Re: I got the idea from PDF File