Greetings All
I am currently attempting to pass an STDPicture object to the Picture
property of a class module within a DLL. However, none of the usual methods
seem to apply. The Microsoft Knowledge base has very little on the
STDPicture object.
Does anyone know if there is a build-in limitation that prevents you from
passing this type of object? If so, is there a work around method I've
missed? If anyone could point me toward some documentation that would
explain this I would greatly appreciate it.
Thanks.
Bruce 7 3396
"Bruce A. Wilkinson" <bw******@grole n.com> wrote Greetings All
I am currently attempting to pass an STDPicture object to the Picture property of a class module within a DLL. However, none of the usual methods seem to apply. The Microsoft Knowledge base has very little on the STDPicture object.
Does anyone know if there is a build-in limitation that prevents you from passing this type of object? If so, is there a work around method I've missed? If anyone could point me toward some documentation that would explain this I would greatly appreciate it.
What problems are you having?
If you actually mean a picture PROPERTY then are you using the Set keyword?
LFS
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =----- http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
The dll is part of a graphics program I have written. The "Picture"
property is defined in the dll as an StdPicture object... (The Variable
"PreviewIma ge " is also Globally dimensioned within the dll as an StdPicture
object)
Public Property Set Picture(ByVal vData As StdPicture)
PreviewImage = vData
End Property
When the object is assigned to an image control within the Exe program it
works fine. But when it is passed to the dll's "Picture" property it
generates an error. Any other type of object passes without problem as long
as the Exe and the Dll objects are defined the same. However, with the
StdPicture object, an error is generated. This occurs even when the property
is left vacant of code.
Has anyone else ran into this problem?
You're into an area of VB that I've never played with before; so, if this
question seems silly, you will have to forgive me... and, if it works, I'll
not have an explanation as to why.<g> What happens if you pass the
StdPicture object ByRef instead of ByVal?
Rick - MVP
"Bruce A. Wilkinson" <bw******@grole n.com> wrote in message
news:sM******** *********@newsh og.newsread.com ... The dll is part of a graphics program I have written. The "Picture" property is defined in the dll as an StdPicture object... (The Variable "PreviewIma ge " is also Globally dimensioned within the dll as an
StdPicture object)
Public Property Set Picture(ByVal vData As StdPicture)
PreviewImage = vData
End Property
When the object is assigned to an image control within the Exe program it works fine. But when it is passed to the dll's "Picture" property it generates an error. Any other type of object passes without problem as
long as the Exe and the Dll objects are defined the same. However, with the StdPicture object, an error is generated. This occurs even when the
property is left vacant of code.
Has anyone else ran into this problem?
"Bruce A. Wilkinson" <bw******@grole n.com> wrote The dll is part of a graphics program I have written. The "Picture" property is defined in the dll as an StdPicture object... (The Variable "PreviewIma ge " is also Globally dimensioned within the dll as an StdPicture object)
Public Property Set Picture(ByVal vData As StdPicture)
PreviewImage = vData
End Property
Has anyone else ran into this problem?
I repeat:
If you actually mean a picture PROPERTY then are you using the Set keyword?
Public Property Set Picture(ByVal vData As StdPicture)
Set PreviewImage = vData
End Property
LFS
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =----- http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
Thanks very much Rick. Passing the image ByRef instead of ByVal was the
answer. It funny when you get involved in a large project how the little
things can elude you.
Thanks for the suggestion. It was much appreciated.
Bruce
Yes I am using the Set keyword. The problem was that I was trying to pass
the object ByVal instead of ByRef.
Thanks for your help. Have a great week.
"Bruce A. Wilkinson" <bw******@grole n.com> wrote Yes I am using the Set keyword. The problem was that I was trying to pass the object ByVal instead of ByRef.
Thanks for your help. Have a great week.
In a property Set assignment, ByVal or ByRef would not matter,
they both point to the same object. What does matter is whether you
use Set in the assignment. Whenever you are using objects, expect to
use Set. What you posted, should not have compiled without the Set
keyword...
(The Variable "PreviewIma ge " is also Globally dimensioned within the dll as an StdPicture object)
Public Property Set Picture(ByVal vData As StdPicture) PreviewImage = vData End Property
If PreviewImage is in fact declared as a StdPicture object, you should
have gotten the 'Invalid use of Property' error on compile because it
is missing the Set keyword. In this case, ByVal or ByRef only pertain
to the actual variable being passed, not the object it points to.
LFS
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =----- http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =----- This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: trojacek |
last post by:
I'm trying to load image data stored in an OLE field into an image
list, that will be used by a treeview to show icons. This is at run
time.
To do this, I'm trying to load the field which contains the picturedata
into my image list by using a function that converts the picturedata
into what I believe is a stdpicture.
The Access errors out with "invalid picture".
|
by: bin liu via DotNetMonster.com |
last post by:
I want to create a object of stdPicture in C#, so that I can render it to other object's prosperity.
the VB6 code maybe as follow:
Dim pic as Picture;
pic = LoadPictureFile(strPath);
then, how can I use C# to express the same idea? I want to know what is "Picture" means in C#, and how can I construct it!
--
|
by: Sagaert Johan |
last post by:
How can i put the image in a stdole.StdPicture object in a Picturebox.Image
?
|
by: Metallicore |
last post by:
Does anyone know how to load a vb6 stdPicture (in an
existing DLL) from vb.net?
System.Drawing.Image is not the same thing as stdPicture
in vb6.
|
by: Steve |
last post by:
Hello,
I created a public Structure in a Standard Module and also
an array of Structures. Then I load data into the array
of structures in a public sub that I call on the Form load
event. Next I have a class, and I want to pass a
structure member from my array of Structures to the class
constructor. In the form I instantiate a class object.
Module1
| |
by: Geoff |
last post by:
In this code I am trying to pass an image, as a parameter, out of the
procedure PickCard. The code will not support this. How do I pass an image
as a parameter?
Thanks again
Geoff
|
by: fyderniX |
last post by:
Hey;
I'm using the Document Imagine API from Office 2003. I need to get
away from the proprietary MDI/TIFF formats it produces. It looked
pretty simple, but it's giving me grief when I try to convert the
IPictureDisp object it creates into an Image for use with .NET:
-----begin source (C#)-----
//Take page 1
MODI.Image page_1 = (MODI.Image) doc.Images;
|
by: VaBa |
last post by:
Hi,
Need some help.. I have a VBA class module in MS ACCESS. In the same MS ACCESS app, I am calling a .NET DLL (which i have exposed as COM-visible) and passing BYREF an instance of the VBA class module as an argument to one of the .NET DLL method. Step by step, here's what i am doing:
1. Create vba class module in MS ACCESS
Option Compare Database
Option Explicit
...
Public Function DoSomething(ByVal S as String, ByRef RetVal as...
|
by: The Frog |
last post by:
Hi Guys,
Just wanting some opinions on best method to approach this. I am
working on an Access97 db and we have two forms and an ADO connection
object to contend with.
The desired state is this-
first form has the functionality for the user to choose an MDB file to
connect to, the user does as such, and the ado connection object is
set up and the connection is opened.
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |