microsoft.public.vb.com
  Home FAQ Contact Sign in
microsoft.public.vb.com only
 
Advanced search
March 2008
motuwethfrsasuw
     12 9
3456789 10
10111213141516 11
17181920212223 12
24252627282930 13
31       14
2008
 Jan   Feb   Mar   Apr 
 May   Jun   Jul   Aug 
 Sep   Oct   Nov   Dec 
2008 2007 2006  
total
microsoft.public.vb.com Profile…
RELATED GROUPS

POPULAR GROUPS

more...

 Up
  VB6: strange Err object behavior.         


Author: Dedalus
Date: Mar 27, 2008 05:52

I have a routine with this prototype in a *.dll
Public Sub RaiseError(ByRef vError As Variant, _
ByVal sRoutine As String, _
ByVal sApplicationVersion As String, _
Optional ByVal sDetail As String =
VBA.Constants.vbNullStrin

'Verifica la congruenza dell'input.
If AndAlso(VBA.ObjPtr(vErrore) <> VBA.ObjPtr(Err), _
Not TypeOf vErrore Is IObjectError) Then
Exit Sub
End If
'Verifica se è necessario segnalare un errore.
If vErrore.number = 0& Then Exit Sub

...
End Sub

In:: vError can be vb6 object Err singleton or an personalized class
that
support my IObjectError interface.
Show full article (0.98Kb)
1 Comment
  Com interop -> IUnknown from hWnd         


Author: Chris Mierzejewski
Date: Mar 25, 2008 05:20

Here is the deal:

I have got quite old application which was written in VB 6 using some
ActiveX Controls. My task is to perform some automatic test using Quick Test
Pro, which doesn't recognize those ActiveX controls, but it doesn't matter.

What I want to attain is to get control over an another application ActiveX
control using its window's (control's) handle.
http://rotanes.pl/Project1.exe <- here is really simple application
(requires VB 6 runtime) with a data grid (microsoft Data Grid Control 6.0,
MSDATAGRID.OCX) and one button, which changes data grid height. I want to be
able to do the same from, for example, .net application. Just pass the
handle (I can take it from any spy software) and perform the action.

What I discovered:

This ActiveX grid implements some COM interfaces, which are defined in the
same dll (ocx) file, just use OLE/COM Viewer and everything is visible. So I've
spent more then one week trying (using .net and C#) grab this interface
knowing only controls hwnd.

My attempts (I used to be a .net developer so I wrote everything in C#):
Show full article (3.72Kb)
no comments
  the Me object can't put in paramarray?         


Author: ΢Èí
Date: Mar 24, 2008 22:19

i wrote some the following code in vb6

there's a member function in the class clsA
public function fncA(method as string,ParamArray par())
...
end function

in another procedure i called this member func
dim clsTest as clsA
set clsTest = new clsA

call clsTest.fncA("1",Me) 'error
call clsTest.fncA("1", 1, 2) 'no errors

sounds like the Me can't put in a pramarray
why?
30 Comments
  VB Excel automation slow.         


Author: michael
Date: Mar 18, 2008 12:09

Hi All,

Automating excel 2003 (sp2) on windows 2003 (sp2) is slow on network
printers. It seems to slow down while trying to change font attributes of a
cell. If I change the default printer to something like image writer, the
application improves drastically. I've seen references to driver issues,
however, I haven't seen any resolutions yet.

I've created a driver program if anyone is interested, however it basically
just fills cells in a loop and changes fonts, when I turn off change fonts it
speeds up. Also, if I make changes to margins and page setup at the begging
it's also slow (this makes more sense).

Any information would be great

thanks
michael
3 Comments
  Com+ Pooled comp. deadlocked starting at W2003 with 2 or + process         


Author: dscelzo
Date: Mar 14, 2008 10:00

Hi,
This it's the case:
server side: Com+ component (neutral or both), conbepooled = true
(min 10 max 250), com +application (package)
lifetime = 0.
cient side: W32 app, every 6 seconds (enough to allow the package
to stop, it may more fore slow machines)
create and release the component (even without calling any method)
hardware: Athlon X2 4800 or Core2Duo 6650

Problem: After a time between 20 seconds and 10 minutes, the application
start but the component isn’t created, the
client app hangs.

Cause: we found that the code freezes in the call to LoadTypeLibrary API.

We detect this problem with W2003 multiprocessor machines, Sp2 and fully
updated. Xp and Vista works fine. The failure can be reproduced if the
lifetime it's set to 1 minute and the client call every 1 minute and a few
seconds more.
The com+ object was created in Delphi.
I paste at the end of this post part of the debug diagnostic tools report.
Show full article (3.93Kb)
no comments
  Access to iTunes Library         


Author: Keith
Date: Mar 11, 2008 15:02

Hi,

I'm trying to access my iTunes library in VB6. If I add the itunes.exe
reference to my project, I can access the itunes classes. I can't seem to
come up with the right syntax for scrolling through my itunes library. I
can access the itunesapp class, which allows me access to the current track,
but I can't get all of the tracks in a collection that I can use. If anyone
has done this, could you help me with some code?

Thanks,

Keith
no comments
  Setting Borders in Excel         


Author: Keith
Date: Mar 11, 2008 14:58

I'm using a VB6 app to create and excel spreadsheet. I'm getting the same
error I try to turn on the borders for a selected range:

Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.ColorIndex = xlAutomatic
End With

Run-time error 429, ActiveX component can't create object

Note: I got the code above from recording a macro and viewing the contents.

The code below was derrived from the VB intellisense:

Selection.Borders(wdBorderDiagonalDown).LineStyle = wdLineStyleNone
Selection.Borders(wdBorderDiagonalUp).LineStyle = wdLineStyleNone

With Selection.Borders(wdBorderLeft)
.LineStyle = wdLineStyleSingle
.ColorIndex = xlAutomatic
End With

I get the same error message as noted above. Any idea what's going on or
does anyone have any working sample code to turn on borders in excel?

Thanks,
Show full article (0.94Kb)
1 Comment
  Possibility of calling function in dll(MFCAppWizardDLL) from VB Ac         


Author: KSMH
Date: Mar 7, 2008 01:51

Greetings,

when i call a function of a VB activeX DLL which interns call the VC++ MFC
DLL function, results in error .I am using the late binding to access the
ActiveX DLL from my VB application . Can you help me regarding this?

Run Time error Message displayed:
Run-time error '-2147417848(80010108)':
Method 'Add' of the object '_AddNumbers' failed'

If I use the early binding also result in
Runtime error’-2147221231(80040111)’
ClassFactory cannot supply requested class

I can able to directly access the MFC DLL function from my VB application .
But i need to call the function through the wrapper VB ActiveX DLL function.
Please help me.

(SimpleCalculator )VB ActiveX DLL code:

Option Explicit
Private Declare Function pstrGetHostName _
Lib "C:\WINDOWS\system32\DLLExDEF.dll" _
() As String
Show full article (1.15Kb)
1 Comment
  Info if you should wish to report this         


Author: Twayne
Date: Mar 2, 2008 11:43

f'ups not set on purpose for max complaints:

From: yenc@yenc-news.co.uk

Newsgroups:
microsoft.public.vb.addins,microsoft.public.vb.bugs,microsoft.public.vb.com,microsoft.public.vb.controls,microsoft.public.vb.controls......
Show full article (2.08Kb)
no comments
  IB TWS Risk Management Utility         


Author: sudhakar t
Date: Mar 1, 2008 03:51

Hi,

I am building a Risk Management utility for IB TWS and am facing the
following issue:

i) I have to disable the IB software once a drawdown limit is reached.
The issue I am having is this:

The user will be using IB manually - meaning will transmit the order
manually. At this point, I have to either allow or deny the order to be
transmitted based the dollar amount of the order.

To be able to do this I either need to override the IB Transmit method;
or have access to an event that will be fired BEFORE the system actually
transmits the order.

In the latter case, I will write some messaging code to transmit the
event back to my Risk Management system.

M problem is that I am unable to find any relevant event or find a way
to override the Transmit method.

Am I in the right direction? Is there a way to achieve this? Any help on
this will be greatly appreciated.

I look forward to your help.

*** Sent via Developersdex http://www.developersdex.com ***
no comments