Type: Posts; User: Jonney
Search took 0.04 seconds.
I created BIFF8. A bit hard for me. I try my best but my back is painful.
Take care as well. Thanks!
Right now Plain text and some common cell Attributes (Font/Alignment/borders/Number Formats) can export, Pictures haven't yet. I have to study OpenOffice's pdf again and again and using HexEditor to...
Now it looks OK though GdipCreateHBITMAPFromBitmap API fill transparency with a color. For Printing case, I will fill Grid1.Cell(Row,Col).BackColor.
GdipCreateHBITMAPFromBitmap hImage, hDIB,...
The main purpose is For WYSIWYG.
If I can create a DC of EmfPlus, then the above issue is no more, I guess. But I don't know how to do at this moment.
I found a related question at StackOverFlow: http://stackoverflow.com/questions/62663/gdi-drawimage-with-transparent-bitmap-to-a-printer
But seems no solid solution given.
I can't get sleep in whole night for this GDI+ matter.
Thanks for this analyst. I learned the lesson.
Thank you Sir.
I made a print preview control. I used GDI+ for pictures. But PNG's transparency Part and none AntiAlias edge got weird effect when draw on Meta DC which created from Printer.hDC.
OK. I expose the return of pvModifyAttributes to my Image Class Public Property: Image.gdpiAttributes so that the attributes can be applied when calling gdipStretchPicture. My Image Class will take...
Please refresh the page, I have edited my writing.
I think this rung has problem. They overide each other?
my usage is not correct I think. But why others like Lightness and GrayScale work?...
I miss the check. :D
I am troubleshooting why the alpha doesn't work： hGraphics bind to hImage.
GdipGetImageGraphicsContext hImage, hGraphics
In " Private Sub pvModifyAttributes() ", If We set m_GrayScale > 0 and m_Lightness <>0, the clrMatrix(1,1) and clrMatrix(2, 2) will conflict ? If so, should we separate them into two Sub or Call...
Finally I see the beautiful Excel table...
The StgCreateDocfile created a Structured Storage Compound File. With Interface of IStorage and IStream, it is very easy to do that.
For Microsoft Excel...
Why nobody give API solution? Is API ReadFile less efficiency because it hardly distinguish (VBCRLF) line?
I mark this thread resolved.
I think I need more study before raising this question.
Dim oStorage As IStorage
Dim oStream As IStream
Set oStorage = StgCreateDocfile(StrPtr(App.Path & "\test.xls"), &H10& Or &H2& )
Set oStream =...
OK. I have a start point at PAS sample at http://www.atbcode.com/cn/19c01686-589546 and https://msdn.microsoft.com/en-us/library/windows/desktop/aa380323(v=vs.85).aspx.
Let me say something why I needed.
I want to implement ExportToExcel feature for my UserControl. Now, preparation has almost done. I used Put/Get/Seek command to create a binary file,and filled...
private const ushort_1 As Long = 61462
Public Function CUShortToInt(ByVal value As Long) As Integer
Const OFFSET_2 As Long = 65536
Const MAXINT_2 As Integer = 32767
Good solution. My mind is stubborn.
.NET has UShort which is UInt16/2 bytes/0 through 65,535 (unsigned). But VB6 doesn't have. I can't use Integer.
In my .NET app, I write UShort into binary file, For uniform, how to do the same of 2...
I don't understand,it looks like a hack. Some antivirus software may consider virus. The 360 Antivirus reports virus <prjTestStaticLink.exe>.
I have many words to say but I don't know how to say.
For simplicity, we can design the Boost-like-Library like .NET Class.
I prefer separable classes or less inter-depend.
I saw some VB Code...
Just for testing the formatted XML. only reason is fast to jump to c:\.
.NET set the "whitespace" at the final call .Save or return DOM.InnerXml. But for MSXML3.dll we have manually use command....
I found one problem with API version. It adds a CR and LF char at the end. The VBase64 class is OK.
Public Function Encode(ByRef BinaryBuf() As Byte) As String
Dim bytBuf() As Byte
You are genius. The foreign characters caused the error. base64 class is OK.
In my XML String, between the pair of node <Image>xxxx</Image>,there're space,CR and LF. It comes from:
The original code is written by dilettante. I don't understand base64.
I put your fix in, now decode is OK. I am waiting for some feedback from dilettante.
yes, octal for computation.
On my hand, I had few base64 decoding class. But from what I tested, one is silently failed, one is partially failed with 'Overflow' error at final stage but ‘On Error Resume Next’ works though. So I...
For Windowed uc, my experiment is MoveWindow as you indicated. There's no necessary calculation such as 1440 or Screen.TwipsPerPixelX:
Private Sub UserControl_Resize()
I saw few professioner in C# doing such thing. I tried to find the code but no luck.
I will keep in mind. I am just a bit worried about the cost of "create-use-destroy". After Changed all...
yes. totally agree.
I saw someone using this technique in .NET:
How apply the same thing in VB6?
Private hMemoryDCClone As Long
Look like MoveWindow is better than .Move.
In my uc, the scrollbar is out of position in 192dpi (200%). I change .Move to MoveWindow, the scrollbar goes to right position.
I tested an application in VB6 and C#.
VB6 has problem, but .NET is OK. C# use .SetBounds.
.NET Reflector shows SetWindowPos and AdjustWindowRectEx API.
Look like .NET first call...
Below is result on my laptop in 200% (192 dpi):
OK. I found the crash by calling GdipDeleteGraphics hMemoryGraphics.
A little complicated I describe:
hMemoryGraphics is created by:
GdipCreateFromHDC hMemoryDC, hMemoryGraphics
On CyberActiveX website (I remember it comes from Lavolpe):
'Purpose:Returns True if string has a Unicode char.
Public Function IsUnicode(s As String) As Boolean
Dim i As Long
Confirm that the token is different. For multiple UCs, each uc call GDI+ startup once.
AlphaImage has center management, I know it is very good method. But I just leave it at first.
.NET has similar grammar like VB6. There're so many Classes programmed/wrapped by MS, just like famous RichClient5. It make programming easier but the problem is to know how to use those classes.
Very good guess. The GdipToken is Private Long in UserControl. UserControl itself used GDI+ and some Classes associated with UserControl also used GDI+.
Please examine my Code. (I will read...
I had a PrintPreview. I borrowed Printer.hdc and scaled all margins (cm) and Coordinates (e.g. Printer 600dip vs screen 96 dpi, read by GetDeviceCaps API, so ratioX is 600/96=6.25) then drew...
VBIDE crashed during UserControl Terminate. I investigated the problem and found GdiplusShutdown caused the crash.
Private Sub Dispose()
If Not hMemoryGraphics = 0 Then
Click Here to Expand Forum to Full Width