vb6

pass adoconnection from vba to delphi

筅森魡賤 提交于 2020-01-02 04:54:07
问题 I'm looking to create a COM object in a VBA macro and then pass it to a Delphi DLL (D2009). What should my procedure declaration in Delphi look like? Background: I'm expecting (hoping) the VBA macro to: create the COM object, invoke the Delphi DLL, pass the COM object to the Delphi DLL procedure, stay alive until the Delphi DLL closes itself (the DLL will have embedded forms for the user to interact with). I think I'll need to create a callback function to let the VBA macro know that I'm done

Returning Multiple Results (UDT?) From An Interop Call - VB6 <--> VB.NET

耗尽温柔 提交于 2020-01-01 19:47:30
问题 I’d like an Interop user control (VB.NET) to return and to accept multiple values from a get/set call. I assumed a user defined type (UDT), would be the correct way but I keep getting a “Variable uses an Automation type not supported in Visual Basic” from the VB6 compile. How is passing multiple values between an interop control and the VB6 application done? VB.NET (Interop) code, a control with a .NET ListView Structure Employee Dim Firstname As String Dim Lastname As String End Structure …

Calculate the start and end date of a week given the week number and year in C# (based on the ISO specification)

此生再无相见时 提交于 2020-01-01 13:16:09
问题 I need to generate a report that shows the 52 weeks of a year (or 53 weeks as some years have) and their start and end dates. There is an ISO spec to do this but seems awfully complicated! Im hoping someone knows of a way to do it in C# or Visual Basic (its actually for Visual Basic 6 but I will try port it across) 回答1: You can use the Calendar.GetWeekOfYear method to get the week number of a date, with the CalendarWeekRule.FirstFourDayWeek value to specify how the weeks are determined, and

VB6 ActiveX exe - what is the proper registration sequence?

梦想与她 提交于 2020-01-01 12:03:12
问题 I have recently updated a Visual Basic 6 application that is an ActiveX exe, running on Windows XP. I have a couple of testers for this application who have received a copy of the exe and are attempting to run it. However, they are getting an error message "Unexpected error;quitting" when trying to do so. A key difference between their testing and my testing is that on the machines I tested on, I have admin rights and was able to register the application using the appname.exe /regserver

VB6 ActiveX exe - what is the proper registration sequence?

China☆狼群 提交于 2020-01-01 12:03:09
问题 I have recently updated a Visual Basic 6 application that is an ActiveX exe, running on Windows XP. I have a couple of testers for this application who have received a copy of the exe and are attempting to run it. However, they are getting an error message "Unexpected error;quitting" when trying to do so. A key difference between their testing and my testing is that on the machines I tested on, I have admin rights and was able to register the application using the appname.exe /regserver

How to save breakpoint in visual basic 6

孤街浪徒 提交于 2020-01-01 09:50:12
问题 How can I save my breakpoints in Visual Basic 6? Are there any add-ins? For now I have MZ-Tools, but unfortunately they don't save breakpoints. 回答1: I'm not sure about third party tools, but you could always use: Debug.Assert False Just remember to remove it when you're done. 回答2: Here is a nice VB6 add-in to save breakpoints on exit. http://www.darinhiggins.com/bookmarksave-addin-for-vb6 回答3: This is what the Stop statement does, i.e. act as a persistent unconditional breakpoint. 来源: https:/

How to save breakpoint in visual basic 6

不羁岁月 提交于 2020-01-01 09:50:03
问题 How can I save my breakpoints in Visual Basic 6? Are there any add-ins? For now I have MZ-Tools, but unfortunately they don't save breakpoints. 回答1: I'm not sure about third party tools, but you could always use: Debug.Assert False Just remember to remove it when you're done. 回答2: Here is a nice VB6 add-in to save breakpoints on exit. http://www.darinhiggins.com/bookmarksave-addin-for-vb6 回答3: This is what the Stop statement does, i.e. act as a persistent unconditional breakpoint. 来源: https:/

Equivalent of “Dim As String * 1” VB6 to VB.NET

被刻印的时光 ゝ 提交于 2020-01-01 09:34:09
问题 I have some VB6 code that needs to be migrated to VB.NET, and I wanted to inquire about this line of code, and see if there is a way to implement it in .NET Dim strChar1 As String * 1 Intellisense keeps telling me that an end of statement is expected. 回答1: That's known as a "fixed-length" string. There isn't an exact equivalent in VB.NET. Edit : Well, OK, there's VBFixedStringAttribute , but I'm pretty sure that exists solely so that automated migration tools can more easily convert VB6 code

Is object clearing/array deallocation really necessary in VB6/VBA (Pros/Cons?)

夙愿已清 提交于 2020-01-01 08:53:27
问题 A lot of what I have learned about VB I learned from using Static Code Analysis (Particularly Aivosto's Project Analyzer). And one one of things it checks for is whether or not you cleared all objects and arrays. I used to just do this blindly because PA said so. But now that I know a little bit more about the way VB releases resources, it seems to me that these things should be happening automatically. Is this a legacy feature from pre VB6, or is there a reason why you should explicitly set

Is object clearing/array deallocation really necessary in VB6/VBA (Pros/Cons?)

梦想与她 提交于 2020-01-01 08:51:31
问题 A lot of what I have learned about VB I learned from using Static Code Analysis (Particularly Aivosto's Project Analyzer). And one one of things it checks for is whether or not you cleared all objects and arrays. I used to just do this blindly because PA said so. But now that I know a little bit more about the way VB releases resources, it seems to me that these things should be happening automatically. Is this a legacy feature from pre VB6, or is there a reason why you should explicitly set