Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB Components
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
VB Components Issues specific to components in VB.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB Components section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old February 6th, 2004, 01:50 AM
Registered User
 
Join Date: Feb 2004
Location: Chennai, Tamilnadu, India.
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Calling an ActiveX DLL in a UserControl

Hi all,

we have been looking out for a solution for the problem mentioned below.... PLEASE HELP

We have a problem with us here. We have created a dll which will externalize the font for an internationalization project. Based on the LocaleID it will change the language for the form.. This works perfectly in the form once the DLL is registered and referenced.

We would like to implement the same in a Usercontrol which we have by the dozen in each VBP. We are trying to do this in the UserControl_Initialize which gives an error

The code in the externalization in the class module is as follows:
ChangeFont.dll > Class Module
Public Sub SetFont(ByRef objClient As Object)
  If TypeOf objClient Is Form Then
    Call mdlChangeFont.SetFormFonts(objClient) 'For Forms
  Else
    Call mdlChangeFont.SetControlFonts(objClient) 'For UserControl
  End If
End Sub

For the Form we implement it in the Form_Load() as:
Private Sub Form_Load()
   Dim ext As New ChangeFont.clsChangeFont
   ext.SetFont Me
End Sub

Please let me know in which event of the UserControl should this be put whether UserControl_Initialize or UserControl_InitProperties or UserControl_ReadProperties or should we go ahead with the tedious process of changing the Font and the script in the UserControl to MS UI Gothic and Japanese.

This is an urgent requirement... HELP.............................

Regards
Arvind Krishnan
Reply With Quote
  #2 (permalink)  
Old February 6th, 2004, 12:28 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Sparks, NV, USA.
Posts: 101
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to jlick
Default

What error does it give?

John R Lick
JohnRLick@hotmail.com
Reply With Quote
  #3 (permalink)  
Old February 6th, 2004, 04:13 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Alameda, ca, USA.
Posts: 627
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I set the font in the Initialize event with no problems at all... what error do you get?
Marco
Reply With Quote
  #4 (permalink)  
Old February 8th, 2004, 11:26 PM
Registered User
 
Join Date: Feb 2004
Location: Chennai, Tamilnadu, India.
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,

   The user control has got a text box and a label and a command button... The command button transfers what is presnt in the Textbox to the Label.... The point I am tyring to make here is my LocaleID and the associated Regional IDs are all in Japanese... When I put the code in the Form Load
Private Sub Form_Load()
   Dim ext As New ChangeFont.clsChangeFont
   ext.SetFont Me
End Sub
   the code works for a form i.e when i enter japanese characters in the textbox it takes it as Japanese but when the same code
Dim ext As New ChangeFont.clsChangeFont
ext.SetFont Me
    is set to any control event of the user control and the code is run... and when Japanese characters are inserted in the Text box it gives out strange gibberish characters.

I want to know how to set this right... So that when Japanese Characters are eneterd in the Textbox of the user Control it appears in Japanese and does not give out gibberish characters.

Arvind

Reply With Quote
  #5 (permalink)  
Old February 9th, 2004, 03:38 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Alameda, ca, USA.
Posts: 627
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Maybe the problem is in the clsChangeFont itself, that works for Forms but not for UserControls. Revise you code, or add ChangeFont to yout project and debug it.
Marco
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Calling a dll inside from a dll tiredcat Visual Basic 2005 Basics 2 August 30th, 2007 11:02 PM
Advantages /Disadvantages of ActiveX DLL & ActiveX priyank Beginning VB 6 6 February 19th, 2007 11:34 AM
Calling activeX from c# jinohere Beginning VB 6 1 August 29th, 2006 10:39 AM
HOW TO - Calling an ActiveX DLL in a UserCont arvindkrishnan VB How-To 2 August 3rd, 2005 01:14 PM
Calling an ActiveX.EXE in C++ xgbnow Visual C++ 4 March 31st, 2004 08:12 AM



All times are GMT -4. The time now is 05:17 AM.


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