vb6

Store two Queries result in third variable

折月煮酒 提交于 2019-12-28 07:08:18
问题 What's wrong with this code: Visual Basic 6.0 With access 2007 Private Sub Command1_Click() Dim Sell_tbl, Stock_Bottle, res As String Sell_tbl = "SELECT Sum((Quantity)*12) FROM Sell_Detail Where Cateogry='Large'" Stock_Bottle = "Select Sum(No_Of_Bottle) FROM Add_Bottle Where Cateogry='Large'" res = ((Sell_tbl) - (Stock_Bottle)) Adodc1.RecordSource = Sell_tbl Adodc1.Refresh Adodc1.Caption = Adodc1.RecordSource End Sub Type Mismatch Error I try to convert its result in other data type but it

How to use VB6 debugger on Outlook property page OCX?

社会主义新天地 提交于 2019-12-28 04:33:14
问题 Using VB6, I have created an Outlook plugin, that has a property page. The property page is an OCX control. When I compile the project to an OCX file, and then run OUTLOOK, things work fine: I am able to see my OCX as a tab in the Outlook options. However, when I try to debug by running the OCX in VB6 I get an error. My debugging is started like this: 1) Debug options set to Wait for components to be created" 2) F5-RUN project in VB6. 3) Start Outlook. 4) Get the error: "Cannot display "MyOcx

any function for listing out all the files of a specified type in a folder in VB6

邮差的信 提交于 2019-12-28 04:33:11
问题 I would like to know if there are some in built functions for the scenario that is described below : The input is the path of a parent folder. Wat the function must do is , it should list out all the .zip files inside that parent folder.The parent folder can contain any number of subfolders, and the same applies to the subfolders too .. Can anybody help me out with that ? VB version is not a barricade. Any of the versions VB6 or VS2005 can do. Pls help me out. Also is there any other

Is it possible to retrieve the call stack programmatically in VB6?

别等时光非礼了梦想. 提交于 2019-12-28 04:23:08
问题 When an error occurs in a function, I'd like to know the sequence of events that lead up to it, especially when that function is called from a dozen different places. Is there any way to retrieve the call stack in VB6, or do I have to do it the hard way (e.g., log entries in every function and error handler, etc.)? 回答1: I'm pretty sure you have to do it the hard way. At a previous job of mine, we had a very elegant error handling process for VB6 with DCOM components. However, it was a lot

How to determine the Windows default browser (at the top of the start menu)

蓝咒 提交于 2019-12-28 04:14:32
问题 How can I determine the Windows default browser (at the top of the start menu)? I am using VB6 but can probably adapt other code no problem. There are similar questions on Stack Overflow, but they seem to provide incorrect answers. For instance the key HKEY_LOCAL_MACHINE\Software\Clients\StartMenuInternet\ lists both Internet Explorer and Firefox on my PC. And getting the .html association fails for me as well, as HTML files are associated with IE but Firefox is my default browser. Note that

Best Strategy for moving from VB6 to .NET [closed]

对着背影说爱祢 提交于 2019-12-28 03:06:12
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . My company has tons of legacy applications that are written in VB6. We are in transitions from moving VB6 applications to .NET (3.5

C# DLL cannot affect value of a number passed by reference from a VB6 application

大憨熊 提交于 2019-12-28 02:17:17
问题 I have a legacy VB6 application that calls a VB6 DLL, and I am trying to port the VB6 DLL to C# without yet touching the main VB6 application code. The old VB6 DLL had one interface that received a VB6 long (32-bit integer) by reference, and updated the value. In the C# DLL I have written, the updated value is never seen by the main VB6 application. It acts as though what was really marshalled to the C# DLL was a reference to a copy of the original data, not a reference to the original data.

Implementing String.Format() in VB6

烈酒焚心 提交于 2019-12-27 17:29:09
问题 Locked . This question and its answers are locked because the question is off-topic but has historical significance. It is not currently accepting new answers or interactions. Can String.Format() be implemented in VB6, at least a close-enough version of it that could be useful when programming in good ol' VB6? Good resource on the matter of VB6 string manipulation performance: http://www.aivosto.com/vbtips/stringopt2.html On a related not, I also came up with a couple string comparison

Unicode in vb.net [closed]

江枫思渺然 提交于 2019-12-25 21:06:13
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 7 years ago . How to use Unicode available in vb6 in vb.net? Is there any equivalent of vb6 Unicode in vb.net?? 回答1: Are you using vbUnicode in order to convert a Byte Array to a String? Like the following? StrConv(ByteArray,

How to select just one item from listview

偶尔善良 提交于 2019-12-25 18:46:06
问题 Using Listview with Checkbox ListView checkbox id 001 002 003 ... I want to select only one id at a time, and i want to show a selected item in the messagebox for example 001 id is checked, if i check 002 id means automatically 001 id check should remove, and display a messagebox "002 is Selected" 回答1: If you use a ListBox, the default behaviour is for only one item to be selected at a time. You can change that behaviour by setting or clearing the .MultiSelect property. Here is a tutorial you