Graphics.FromImage VBNet to VBA Excel
Graphics.FromImage VBNet to VBA Excel
Graphics.FromImage VBNet to VBA Excel
Graphics.FromImage VBNet to VBA Excel
Graphics.FromImage VBNet to VBA Excel
Graphics.FromImage VBNet to VBA Excel Graphics.FromImage VBNet to VBA Excel Graphics.FromImage VBNet to VBA Excel Graphics.FromImage VBNet to VBA Excel Graphics.FromImage VBNet to VBA Excel Graphics.FromImage VBNet to VBA Excel Graphics.FromImage VBNet to VBA Excel Graphics.FromImage VBNet to VBA Excel
Graphics.FromImage VBNet to VBA Excel Graphics.FromImage VBNet to VBA Excel
Graphics.FromImage VBNet to VBA Excel
Go Back  Xtreme Visual Basic Talk > > > Graphics.FromImage VBNet to VBA Excel


Reply
 
Thread Tools Display Modes
  #1  
Old 05-18-2017, 04:38 PM
doriangrey doriangrey is offline
Newcomer
 
Join Date: Jan 2014
Posts: 3
Default Graphics.FromImage VBNet to VBA Excel


Hi Parters,

please, how i can adapt this code from VBNet to VBA Excel (maybe GDI32) ??


Dim G As Graphics
G = Graphics.FromImage(picDest.Image)
G.Clear(Color.FromArgb(255, 255, 0, 0))
G.Dispose()


thank you very mutch !
Reply With Quote
  #2  
Old 05-19-2017, 02:16 AM
Flyguy's Avatar
FlyguyGraphics.FromImage VBNet to VBA Excel Flyguy is offline
Lost Soul

Super Moderator
* Guru *
 
Join Date: May 2001
Location: Vorlon
Posts: 19,151
Default

Hahaha xman2000, are you now trying some other forum? ;-)

In this case you can not just convert it to VBA/VB6, it's a huge VB.Net graphic library.

Reference on vbForums with the origin of the question and I gave a a lot of links with samples and explanations about what you need to do in post #13 of the thread.
ImageControl Brightness propertie on Excel Worksheet-VBForums
Reply With Quote
  #3  
Old 05-20-2017, 09:03 AM
doriangrey doriangrey is offline
Newcomer
 
Join Date: Jan 2014
Posts: 3
Default

Hi, Flyguy,

thank you,

I'm not malicious

I just asked in more than one forum because it is an issue that requires knowledge in more than one language (VB, Vb.Net and VBA and Excel) and there may be few people who have all this knowledge and want to help.

I did a vast search on the internet and did not find anything about it.
You answered me, I thank you, but your answers are vague, I do not understand what I need to do to solve this problem.

The codes I shared I could not have shared because it is an important project for me, and my knowledge of Englishe Languague is poor.

I'm not an expert on Programmig.
I know that you should not do cross-posting but in some situations you can not wait too long.

I need to figure out what I can use to replace this snippet of code, since the rest of the code I can use, my problem is just replacing that snippet:

Code:
Dim G As Graphics 
G = Graphics.FromImage(picDest.Image) 
G.Clear(Color.FromArgb(255, 255, 0, 0)) 
G.Dispose()
edit:
I no expert, but i look if i can use like this:

access2007
"http://accessoft.com/blog/article-show.asp?userid=61&Id=3787"

Code:
                ret = GdipCreateHICONFromBitmap(lThumb, hBitmap)
Code:
'Load image file with GDIP
'It's equivalent to the method LoadPicture() in OLE-Automation library (stdole2.tlb)
'Allowed format: bmp, gif, jp(e)g, tif, png, wmf, emf, ico
Function LoadPictureGDIP(sFilename As String) As StdPicture
    Dim hBmp As Long
    Dim hPic As Long
    Dim ret As Long
    If Dir(sFilename) = "" Then
        '??????????
        'Err.Raise 53, "modOGL2007", "?? " & sFilename & " ????"
        
        Exit Function
    End If
    If lGDIP = 0 Then InitGDIP: If lGDIP = 0 Then Exit Function
    ret = GdipCreateBitmapFromFile(StrPtr(sFilename), hPic)
    If ret = 0 Then
        ret = GdipCreateHBITMAPFromBitmap(hPic, hBmp, 0&)
        If hBmp <> 0 Then
            Set LoadPictureGDIP = BitmapToPicture(hBmp)
            GdipDisposeImage hPic

Last edited by doriangrey; 05-20-2017 at 09:18 AM.
Reply With Quote
Reply

Tags
excel, g.clearcolor.fromargb255, graphics, vba, vbnet, graphics.fromimage


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Graphics.FromImage VBNet to VBA Excel
Graphics.FromImage VBNet to VBA Excel
Graphics.FromImage VBNet to VBA Excel Graphics.FromImage VBNet to VBA Excel
Graphics.FromImage VBNet to VBA Excel
Graphics.FromImage VBNet to VBA Excel
Graphics.FromImage VBNet to VBA Excel Graphics.FromImage VBNet to VBA Excel Graphics.FromImage VBNet to VBA Excel Graphics.FromImage VBNet to VBA Excel Graphics.FromImage VBNet to VBA Excel Graphics.FromImage VBNet to VBA Excel Graphics.FromImage VBNet to VBA Excel
Graphics.FromImage VBNet to VBA Excel
Graphics.FromImage VBNet to VBA Excel
 
Graphics.FromImage VBNet to VBA Excel
Graphics.FromImage VBNet to VBA Excel
 
-->