Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Pro VB 6 For advanced Visual Basic coders working in version 6 (not .NET). Beginning-level questions will be redirected to other forums, including Beginning VB 6.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 3rd, 2005, 03:35 PM
Registered User
 
Join Date: Dec 2004
Location: Milano, , Italy.
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Peppiniello
Default object.cls via API

Hello everybody,
anybody knows how to substitute the .CLS command using only API !?!!?
Ex.
Picture1.Cls
or
Me.Cls
or
Usercontrol.Cls

Thanks guys !

Peppiniello
 
Old January 3rd, 2005, 06:59 PM
Friend of Wrox
 
Join Date: Nov 2004
Location: Port Orchard, WA, USA.
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts
Default

CLS is not a command.
Can you expand on what you have tried, why that didn't waork, and what it is that you want to have happen?
 
Old January 4th, 2005, 04:26 AM
Registered User
 
Join Date: Dec 2004
Location: Milano, , Italy.
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Peppiniello
Default

Brian...
I'm italian, :) and my mother language is italian, but i think i'm able to make my english writings quite simple...
So, if i write Picture1.Cls, i write "command", an alias for Method, the friend of Properties and the father of Events....
And i need to do exactly what i need: the same effects of the .Cls METHOD.
For example, for a "Redraw" we have either "LockWindowsUpdate" and/or "RedrawWindow", but what for ".Cls" ?
"DeleteDC" or playing around with regions still has no results...
Thanks guys!

Peppiniello
 
Old January 23rd, 2005, 02:30 PM
Authorized User
 
Join Date: Jan 2005
Location: Wales, UK, United Kingdom.
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

So lets get this right you want to do the same thing as CLS with an API call or a different name to CLS not sure if ya can do that. or maybe I just don;t understand your question anyway only other thing I can think of is below:

set picture1.picture = Nothing' other than that I don't know.

When ya dreams come true.
 
Old January 24th, 2005, 06:03 AM
Registered User
 
Join Date: Dec 2004
Location: Milano, , Italy.
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Peppiniello
Default

Tnx for reply, but i need to "CLS" a particular region or hWnd-ed object.
i.e.
Usercontrol.cls
form.cls
picture.cls...

If i'll find the API
Declare Public Function ClsTheObject lib "somthing.dll" (byval obj_hWnd as long) as long
i'll be an hannmpy man!
Btw, tnx for try helping me...

Fabio

Peppiniello
 
Old January 25th, 2005, 12:04 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Cardiff, , United Kingdom.
Posts: 231
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I am having a little trouble understanding what you want to do. Are you talking about accessing the methods and properties of your class (compiled as an AvtiveX DLL for example) in another project? If this is the case then you do not need to declare any API calls, you just need to add the ActiveX DLL project as a reference to your new project.

To do this first compile and register your ActiveX DLL project (compiling the project will automatically register it, however if you are moving the DLL over to another machine then you will have to use the RegSvr32 command to register it). Then in your new project click Project -> References... and place a tick next to the ActiveX DLL project. You will now be able to use the classes exposed by your ActiveX DLL simply by declaring an instance of them. This is very similar to the way in which ADO and DAO work, you add the reference and then you can just declare a variable of type Database for example
Code:
    Dim dbsDatabase As Database
I hope this helps.

Regards
Owain Williams




Similar Threads
Thread Thread Starter Forum Replies Last Post
API mallik C++ Programming 2 February 20th, 2008 04:03 AM
What is CLS(Compliant) True in Assembly info File jayakumar.cj ASP.NET 1.0 and 1.1 Basics 0 August 4th, 2006 06:03 AM
XPath API and DOM Document object nnravi XML 10 May 2nd, 2006 12:24 PM
Difference between CTS & CLS sumsin General .NET 1 March 18th, 2005 08:46 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.