vb6

Need help on debugging of vb6 code that is used in .net application

旧城冷巷雨未停 提交于 2019-12-30 10:57:13
问题 My .Net Application is using some vb6 controls and libraries. I can not debug the vb6 code through my .net application. Can anybody help me out, how I can debug vb6 code that is using a s user control in .net application. 回答1: I am not sure you can do it or not, but I have gotten some ideas from following link: If you double-click My Project in Solution Explorer and go to the Debug tab you'll see an option that says "Start External Program." Select this option and type in "C:\Program Files

Need help on debugging of vb6 code that is used in .net application

吃可爱长大的小学妹 提交于 2019-12-30 10:57:07
问题 My .Net Application is using some vb6 controls and libraries. I can not debug the vb6 code through my .net application. Can anybody help me out, how I can debug vb6 code that is using a s user control in .net application. 回答1: I am not sure you can do it or not, but I have gotten some ideas from following link: If you double-click My Project in Solution Explorer and go to the Debug tab you'll see an option that says "Start External Program." Select this option and type in "C:\Program Files

How to get the days for the date

会有一股神秘感。 提交于 2019-12-30 10:03:16
问题 Part 1 Dim totdays as long totdays = DateDiff("d", "01/2011", DateAdd("m", 1, "01/2011")) The above code will return "31" I want to get the days for that 31 Expected Output Monday (31/01/2011) Need VB6 Code Help Part 2 I want to find the sundays on the particular month.... For Example, If i select the month 01/2012, The query should give the result like this 01 08 15 22 29 The above dates are sunday. Expected Output for 01/2012 Month 01 08 15 22 29 回答1: something like this (tested in vba)

How do I check for an object being Nothing in VB6?

只谈情不闲聊 提交于 2019-12-30 07:56:14
问题 In my VB6 application I have an array of objects declared thus... Dim MyArray() as MyClass This array is filled in as processing goes on Set MyArray(element) = passed_object and as elements are no longer wanted, Set MyArray(otherelement) = Nothing When using the array, I want to use a loop like For i = 1 To Ubound(MyArray) If MyArray(i) <> Nothing Then ' Doesn't compile ...do something... End If Next i But I can't get anything likely-looking to compile. I've also tried If MyArray(i) Is Not

C# to VB6 COM events (“object or class does not support the set of events”)

断了今生、忘了曾经 提交于 2019-12-30 06:46:48
问题 Really pulling my hair out with this one... I have a C# project with an interface defined as: /* Externally Accessible API */ [InterfaceType(ComInterfaceType.InterfaceIsIDispatch)] public interface ISerial { [DispId(1)] bool Startup(); [DispId(2)] bool Shutdown(); [DispId(3)] bool UserInput_FloorButton(int floor_number); [DispId(4)] bool Initialize(); } /* Externally Accesssible Event API */ [InterfaceType(ComInterfaceType.InterfaceIsIDispatch)] public interface ISerialEvent { [DispId(5)]

C# to VB6 COM events (“object or class does not support the set of events”)

帅比萌擦擦* 提交于 2019-12-30 06:46:05
问题 Really pulling my hair out with this one... I have a C# project with an interface defined as: /* Externally Accessible API */ [InterfaceType(ComInterfaceType.InterfaceIsIDispatch)] public interface ISerial { [DispId(1)] bool Startup(); [DispId(2)] bool Shutdown(); [DispId(3)] bool UserInput_FloorButton(int floor_number); [DispId(4)] bool Initialize(); } /* Externally Accesssible Event API */ [InterfaceType(ComInterfaceType.InterfaceIsIDispatch)] public interface ISerialEvent { [DispId(5)]

How to use WithEvents keyword with global variable?

旧巷老猫 提交于 2019-12-30 06:43:07
问题 I am trying to declare a variable in a VB6 module as follows: Public WithEvents MyObject As MyClass The help files say that WithEvents can only be used in class modules. Why can't it be used in .bas modules? The legacy code I am working has an object declared globally in a module. I want to add WithEvents to this declaration but I need to keep the object global because many other forms etc refer to the object. How can I achieve this with minimal disruption to the code? 回答1: Write a class that

Use 32-bit version of ODBC on 64-bit Windows 7?

浪子不回头ぞ 提交于 2019-12-30 06:17:06
问题 I'm having problem with ODBC and an application written with Visual Basic 6 (so it's 32-bit). It seems that the ODBC library of VB6 is not compatible with the 64-bit ODBC of Windows 7. The error code returned is -2147220992 and it's rambling about incompatible architectures. Can I install a 32-bit version of ODBC? Or any other alternatives? 回答1: use the 32-bit odbc manager to add your DSN: C:\Windows\SysWOW64\odbcad32.exe that should be able to see the 32-bit odbc driver. 回答2: You need to use

vb6 equivalent to list<someclass>

╄→尐↘猪︶ㄣ 提交于 2019-12-30 06:06:28
问题 I want to know if exist a equivalent of (.net) list<somefixedclass> in vb6 I know that exist collection in vb6 but it uses object (variant) instead of a specific object. thanks. 回答1: There is no direct equivalent in VB 6 to the generic List<T> found in VB.NET. However, there is such a thing as a Collection in VB 6, which provides similar functionality. The primary difference is that a VB 6 Collection is not strongly-typed , which means that all objects are stored as Variants in the collection

Updated: Interacting with the user on the windows logon screen

白昼怎懂夜的黑 提交于 2019-12-30 05:26:09
问题 @UPDATE: OK FOR ANYONE ELSE WHO IS SEEKING ADVICE ON THIS ISSUE... So far, the best thing i have found is to download yourself a cpy of pGina (http://www.pgina.org/) and for 2k/xp modify the GINA, and for vista/win7 you will need to create custom login credentials (pGina have the tools/samples to interface with the vista/win7 architecture). to confirm -- it appears that this is what Novell are doing with vista/win7 rather than the traditional method of replacing the GINA (like in 2k/xp) If