Search Results - VBForums

Search:

Type: Posts; User: Jonney

Page 1 of 13 1 2 3 4

Search: Search took 0.04 seconds.

  1. Re: [RESOLVED] IStorage,IStream,IStorage.CreateStorage

    I created BIFF8. A bit hard for me. I try my best but my back is painful.
    Take care as well. Thanks!
  2. Re: [RESOLVED] IStorage,IStream,IStorage.CreateStorage

    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...
  3. Re: PNG transparency weird: GDI+ Draw into Meta DC

    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,...
  4. Re: PNG transparency weird: GDI+ Draw into Meta DC

    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.
  5. Re: PNG transparency weird: GDI+ Draw into Meta DC

    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.
  6. Replies
    92
    Views
    50,693

    Re: [VB6] GDI+ Usage & Samples

    I can't get sleep in whole night for this GDI+ matter.
    Thanks for this analyst. I learned the lesson.
    Thank you Sir.
  7. PNG transparency weird: GDI+ Draw into Meta DC

    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.



    The Steps...
  8. Replies
    92
    Views
    50,693

    Re: [VB6] GDI+ Usage & Samples

    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...
  9. Replies
    92
    Views
    50,693

    Re: [VB6] GDI+ Usage & Samples

    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?...
  10. Replies
    92
    Views
    50,693

    Re: [VB6] GDI+ Usage & Samples

    I miss the check. :D

    I am troubleshooting why the alpha doesn't work: hGraphics bind to hImage.


    GdipGetImageGraphicsContext hImage, hGraphics
    imgAttributesHandle =...
  11. Replies
    92
    Views
    50,693

    Re: [VB6] GDI+ Usage & Samples

    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...
  12. Re: [RESOLVED] IStorage,IStream,IStorage.CreateStorage

    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...
  13. Re: How to read a unicode text file line by line.

    Why nobody give API solution? Is API ReadFile less efficiency because it hardly distinguish (VBCRLF) line?
  14. Re: IStorage,IStream,IStorage.CreateStorage

    I mark this thread resolved.
    I think I need more study before raising this question.
  15. Re: IStorage,IStream,IStorage.CreateStorage

    Just tasting...

    Dim oStorage As IStorage
    Dim oStream As IStream
    Set oStorage = StgCreateDocfile(StrPtr(App.Path & "\test.xls"), &H10& Or &H2& )
    Set oStream =...
  16. Re: IStorage,IStream,IStorage.CreateStorage

    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.
  17. [RESOLVED] IStorage,IStream,IStorage.CreateStorage

    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...
  18. Replies
    3
    Views
    187

    Re: [RESOLVED] UShort in VB6

    Dual Conversion:



    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
    If...
  19. Replies
    3
    Views
    187

    Re: UShort in VB6

    Good solution. My mind is stubborn.
  20. Replies
    3
    Views
    187

    [RESOLVED] UShort in VB6

    .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...
  21. Replies
    17
    Views
    580

    Re: Boost-like library for VB6?

    I don't understand,it looks like a hack. Some antivirus software may consider virus. The 360 Antivirus reports virus <prjTestStaticLink.exe>.
  22. Replies
    17
    Views
    580

    Re: Boost-like library for VB6?

    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...
  23. Replies
    8
    Views
    305

    Re: Base64 Decode error

    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....
  24. Replies
    8
    Views
    305

    Re: Base64 Decode error

    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
    Dim...
  25. Replies
    8
    Views
    305

    Re: Base64 Decode error

    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:

    ...
  26. Replies
    8
    Views
    305

    Re: Base64 Decode error

    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.
  27. Replies
    8
    Views
    305

    [RESOLVED] Base64 Decode error

    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...
  28. Re: [RESOLVED] DPI-Awareness and VB - Nice idea but...

    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()

    ...
  29. Replies
    12
    Views
    348

    Re: GDI+ GdiplusShutdown timing

    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...
  30. Replies
    12
    Views
    348

    Re: GDI+ GdiplusShutdown timing

    yes. totally agree.


    I saw someone using this technique in .NET:


    How apply the same thing in VB6?


    Private hMemoryDCClone As Long
  31. Re: DPI-Awareness and VB - Nice idea but...

    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.

    Edited:
    More testings...
  32. Re: DPI-Awareness and VB - Nice idea but...

    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...
  33. Re: DPI-Awareness and VB - Nice idea but...

    Below is result on my laptop in 200% (192 dpi):
  34. Replies
    12
    Views
    348

    Re: GDI+ GdiplusShutdown timing

    OK. I found the crash by calling GdipDeleteGraphics hMemoryGraphics.

    A little complicated I describe:
    hMemoryGraphics is created by:

    GdipCreateFromHDC hMemoryDC, hMemoryGraphics

    hMemoryDC...
  35. Re: How to distinguish between a unicode and an ASCII string?

    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
    Dim bLen...
  36. Replies
    12
    Views
    348

    Re: GDI+ GdiplusShutdown timing

    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.

    We know...
  37. Replies
    20
    Views
    467

    Re: [RESOLVED] VB6 IsKnownColor

    .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.
  38. Replies
    12
    Views
    348

    Re: GDI+ GdiplusShutdown timing

    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...
  39. Replies
    42
    Views
    2,423

    Re: [RESOLVED] Per-Monitor DPI Awareness & VB

    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...
  40. Replies
    12
    Views
    348

    [RESOLVED] GDI+ GdiplusShutdown timing

    VBIDE crashed during UserControl Terminate. I investigated the problem and found GdiplusShutdown caused the crash.


    Private Sub Dispose()

    If Not hMemoryGraphics = 0 Then
    GdipDeleteGraphics...
Results 1 to 40 of 500
Page 1 of 13 1 2 3 4



Featured


Click Here to Expand Forum to Full Width