![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
![]()
i look at that page but i can't do:
Set oPic = LoadPicture(App.Path & "\circle.bmp") because I can't find 'LoadPicture' in VB.net as my project is a COM add-in for outlook 2003 thanks again Donald |
#2
|
|||
|
|||
![]()
Because you don't have a reference to the Win32 library where that method
lives or because of http://support.microsoft.com/kb/150034/? -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm "donald" wrote in message oups.com... i look at that page but i can't do: Set oPic = LoadPicture(App.Path & "\circle.bmp") because I can't find 'LoadPicture' in VB.net as my project is a COM add-in for outlook 2003 thanks again Donald |
#3
|
|||
|
|||
![]()
'LoadPicture' is just not available in vb.net so how do i get round
this? Donald |
#4
|
|||
|
|||
![]()
Thaddaeus gave you an example of the only known way to do this in .NET. It's
the only way to get an IPictureDisp from a System.Drawing.Image object. Your reply to him stated that you didn't want to use Copy/Paste but his example showed you how to use Picture and Mask, not Copy/Paste. -- Josh Einstein Einstein Technologies Microsoft Tablet PC MVP Tablet Enhancements for Outlook 2.0 - Try it free for 14 days www.tabletoutlook.com "donald" wrote in message oups.com... 'LoadPicture' is just not available in vb.net so how do i get round this? Donald |
#5
|
|||
|
|||
![]()
Also note that if you are using the Word editor, PasteFace is your only
option: IPicture object cannot be marshaled across thee process boundaries: Word inspectors live in the ewinword.exe process space rather than outlook.exe Also note that you can save the clipboard contents before copying a bitmap to the clipboard and restore it afterwards. Babelfish sample COM add-in source code (url below) has a utility class to do that (Delphi) - see uSaveClipboard.pas file. Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "Josh Einstein" wrote in message ... Thaddaeus gave you an example of the only known way to do this in .NET. It's the only way to get an IPictureDisp from a System.Drawing.Image object. Your reply to him stated that you didn't want to use Copy/Paste but his example showed you how to use Picture and Mask, not Copy/Paste. -- Josh Einstein Einstein Technologies Microsoft Tablet PC MVP Tablet Enhancements for Outlook 2.0 - Try it free for 14 days www.tabletoutlook.com "donald" wrote in message oups.com... 'LoadPicture' is just not available in vb.net so how do i get round this? Donald |
#6
|
|||
|
|||
![]()
Be cautious about saving/restoring the clipboard contents because it can
have unintended side effects. For example, if the data object is a large object on another machine (like in RDP) or in another process (like a 300mb bitmap in photoshop) then you might introduce long unexpected blocks in your application and spikes of memory use and the user will have no idea what is going on since they didn't initiate a clipboard operation. -- Josh Einstein Einstein Technologies Microsoft Tablet PC MVP Tablet Enhancements for Outlook 2.0 - Try it free for 14 days www.tabletoutlook.com "Dmitry Streblechenko" wrote in message ... Also note that if you are using the Word editor, PasteFace is your only option: IPicture object cannot be marshaled across thee process boundaries: Word inspectors live in the ewinword.exe process space rather than outlook.exe Also note that you can save the clipboard contents before copying a bitmap to the clipboard and restore it afterwards. Babelfish sample COM add-in source code (url below) has a utility class to do that (Delphi) - see uSaveClipboard.pas file. Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "Josh Einstein" wrote in message ... Thaddaeus gave you an example of the only known way to do this in .NET. It's the only way to get an IPictureDisp from a System.Drawing.Image object. Your reply to him stated that you didn't want to use Copy/Paste but his example showed you how to use Picture and Mask, not Copy/Paste. -- Josh Einstein Einstein Technologies Microsoft Tablet PC MVP Tablet Enhancements for Outlook 2.0 - Try it free for 14 days www.tabletoutlook.com "donald" wrote in message oups.com... 'LoadPicture' is just not available in vb.net so how do i get round this? Donald |
#7
|
|||
|
|||
![]()
I try very think in this topic but i still can't get it working. I
don;t want to use the copy and paste because the user will loss there clipboard and if you try so save it, it could be 300mb as explain above. So could some one who got it working post there code up. The code i have is: Dim path As String = "C:\Visual Studio Projects\DC\DMCRM\icons\AddTelephoneCall.ico" Dim imgconv As ImageConverter Dim img As System.Drawing.Image img = System.Drawing.Image.FromFile(path) Dim a As stdole.IPictureDisp = imgconv.ImageToIPicDisp(img) .Picture = a Public Class ImageConverter Inherits System.Windows.Forms.AxHost Public Sub New(ByVal pGUID As String) MyBase.New(pGUID) End Sub Public Shared Function ImageToIPicDisp(ByVal value As System.Drawing.Image) As stdole.IPictureDisp Return System.Windows.Forms.AxHost.GetIPictureDispFromPic ture(value) End Function Public Shared Function IPicDispToImage(ByVal value As stdole.IPictureDisp) As System.Drawing.Image Return System.Windows.Forms.AxHost.GetPictureFromIPicture Disp(CType(value, Object)) End Function End Class the code get a error on this line ' .Picture = a' any help please Donald |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
custom menu command | Melissa m | Outlook - Using Contacts | 1 | February 27th 06 08:27 PM |
Custom icon superseded by tracking icon | Vaughan | Outlook - Using Forms | 4 | February 24th 06 01:47 PM |
Outlook Shutdown - command line | Pete | Outlook - Installation | 1 | February 7th 06 09:28 PM |
Outlook command-line switches | Brad Nowlin | Outlook - General Queries | 1 | January 27th 06 06:00 PM |
Command button not working on read page | jbtempe | Outlook - Using Forms | 2 | January 14th 06 12:25 AM |