vb6

How to move the items from one listbox to another listbox

烈酒焚心 提交于 2021-02-20 04:25:47
问题 Using VB6 In a form, 2 listbox name as list1, list2 and 4 buttons name >, >>, <, << I want to add the list1 selected items to list2 I want to remove the selected items from list2 to list1 How to do this. Need Vb6 code Help 回答1: Generally, your approach will be to loop through the index values of all items in your source ListBox. If you're moving all items on the ListBox then for each item you'd call the AddItem method on your destination ListBox (using the index value to retrieve the text of

How to call a C++ DLL from VB6 without going through COM?

﹥>﹥吖頭↗ 提交于 2021-02-19 08:48:28
问题 OK, so I have a C++ project that compiles to a DLL file. I am able to reference this file in C# and see/use all of the objects and functions within the DLL file. What I need to do is to reference those objects and function through VB6. The C++ code has nothing in it that looks like it's creating a DLL. There are no '__declspec(dllexport)' modifiers, just C++ code. There are objects like this: String ^ Array^ I'm not entirely sure what they are. My knowledge of C++ is not very extensive and I

How do I convert a stdole.StdPicture to a different Type?

有些话、适合烂在心里 提交于 2021-02-19 05:02:48
问题 To receive the bounty, please provide an answer with working code. Thanks. I have a stdole.StdPicture Object of the Type vbPicTypeIcon. I need to convert it to Type vbPicTypeBitmap. Due to project contraints, I need to be able to do this using Win32 or VBA. I am trying to load a file's icon to a command bar button. Here is what I have so far. It produces a lovely black square:) I am really new to graphics land so pardon me if it's a basic question. Option Explicit Private Const

Remove Exceptions from a Series

浪子不回头ぞ 提交于 2021-02-19 02:39:12
问题 I have a series in Outlook with a few exceptions. What I would like to do is remove all exceptions from this series. Does anyone know if there is a way to do this? Since the exceptions list is read-only I have tried clearing the recurrence pattern and re-applying all of the values sans the exceptions list like this: Dim tRType As OlRecurrenceType Dim tRPSD As Date Dim tRPED As Date Dim tST As Date Dim tET As Date Dim tOcc As Integer Dim tInterval As Integer tRType = oAppointmentItem

VB6 App + .Net component working as compiled app but not in VB6 IDE

戏子无情 提交于 2021-02-19 02:36:07
问题 I have a VB6 App that uses a .Net component (via a .tlb reference in the VB6 app) which is working fine when executed as a compiled app, but it produces an error from the VB6 IDE a certain point when it is trying to use the .NET component. I should note that the error occurs when the .NET component is meant to be invoking a third party reporting component. The error is specific to the reporting component. Something about not being able to cast from String to some other type. The .tlb is in

How to insert a non-inline picture into a word document using VB6?

点点圈 提交于 2021-02-11 13:50:12
问题 I am trying to insert an image into a word document using the Microsoft word 15.0 objects library included with VB^ and the only way I've seen to insert a graphics file is through this: oDoc.Range.InlineShapes.AddPicture ("C:\Users\name\Desktop\file.jpg") But, I want a picture that can be positioned over the text and where I want it in the document... Is there any way to do this using VB6 Code? 回答1: Word has two different ways to manage images and other embedded objects: as InlineShapes and

How to play audio via a specific sound card?

可紊 提交于 2021-02-11 06:43:33
问题 I need to play a sound (.WAV file) from a Visual Basic 6 application. However, the PC is equipped with multiple sound cards and the user should be able to use it. Up till now a default sound card was supported and I would play a sound like this: CommandString = "Open " & Chr$(34) & mstrFilename & Chr$(34) & " type waveaudio alias MediaFile" mciSendString CommandString, vbNullString, 0, 0& If PlayFromPercent <= 0 Then CommandString = "play MediaFile" lngRetcode = mciSendString(CommandString,

Create VB6 application using a class in a DLL, then swap out that DLL after build?

非 Y 不嫁゛ 提交于 2021-02-08 13:36:01
问题 so my question is relatively simple, can I create VB6 application that references a class in a dll, and then substitute that dll for another at runtime? Now my intial guess is... no chance in VB6. So my thoughts turned to a VB.net interop dll. Could I do it in here, and then call the interop dll from the VB? Again, my guess would be no.... but I'd be happy if someone knew differently. The only thing that I think would actually work would be DI in .Net, but I'm limited to .net 2, or 3.5 at a

Microsoft DAO 3.6 object library missing

半城伤御伤魂 提交于 2021-02-08 08:22:31
问题 I tried to connect Microsoft Access 2013 with Visual Basic 6. Microsoft Access file extension use 2002-2003 file extension as a .mdb. But Microsoft DAO 3.6 object library missing in Visual Basic 6. How to add this library for program? 回答1: DAO is ancient technology and it would be beneficial for you to move to ADO if possible. But assuming it's somebody else's world and you're just living in it ... Copied directly from an MS KB article. To redistribute DAO 3.6 with an application, complete

Microsoft DAO 3.6 object library missing

雨燕双飞 提交于 2021-02-08 08:21:01
问题 I tried to connect Microsoft Access 2013 with Visual Basic 6. Microsoft Access file extension use 2002-2003 file extension as a .mdb. But Microsoft DAO 3.6 object library missing in Visual Basic 6. How to add this library for program? 回答1: DAO is ancient technology and it would be beneficial for you to move to ADO if possible. But assuming it's somebody else's world and you're just living in it ... Copied directly from an MS KB article. To redistribute DAO 3.6 with an application, complete