vb6

Vb6 type mismatch with random number generator

依然范特西╮ 提交于 2020-01-07 03:23:13
问题 I wanted to generate a random number between 1 and 20 for a game that I am creating and for some reason this code has stopped working and gives me a type mismatch error, I have tried other generators in the game but I get the same error. Public Counter1 As Integer ' Counters for each reel Public ArrayImgMid1 As Integer ' Store number to iterate over image arrays Public ReelPic1 As Variant ' Array of images for each reel Public Reel1Spin As Long ' Spins for each reel Public ImgBeth, ImgWallow,

how to create group email with CDO Using VB6

怎甘沉沦 提交于 2020-01-07 02:02:08
问题 How can I send an email to a group of recipients with CDO? I'm using VB6. 回答1: You can list multiple recipients on the .To line by separating them with ";", for example: Set m = Server.CreateObject("CDO.Message") m.Subject="subject..." m.From="sender@example.com" m.To="some@email.com;other@email.com;third@email.com" m.TextBody="Message" m.Send 回答2: This works in Office 97 and whatever Exchange we had back then: Dim oOApp As Outlook.Application Dim newMail As Outlook.MailItem Set oOApp =

Could not find installable ISAM when importing Access table to Excel

耗尽温柔 提交于 2020-01-06 20:27:07
问题 I have a module that imports an Access table to MS Office Excel. This module has been implemented for almost 6 months and has worked well, but suddenly yesterday the module started giving an error message "External table is not in expected format" I've searched the answer through this site and found that for Excel 2007 I must use syntax "Excel 12.0" not "Excel 8.0". I changed my script and got a new error message: "Could not find installable ISAM" (code below) Others information: I try to

Could not find installable ISAM when importing Access table to Excel

╄→гoц情女王★ 提交于 2020-01-06 20:26:27
问题 I have a module that imports an Access table to MS Office Excel. This module has been implemented for almost 6 months and has worked well, but suddenly yesterday the module started giving an error message "External table is not in expected format" I've searched the answer through this site and found that for Excel 2007 I must use syntax "Excel 12.0" not "Excel 8.0". I changed my script and got a new error message: "Could not find installable ISAM" (code below) Others information: I try to

Read text from .txt by the listbox request

落花浮王杯 提交于 2020-01-06 19:53:55
问题 I want to make something like this Example : Something like planer i write things i need to do for specific days and when i choose in a listbox day it show's me what i need to do. So because it will remember data it need's to be saved on some kind of .txt or database . I can add/load items from listbox like this Private Sub Command1_Click() Open "Listbox.txt" For Output As #1 For i = 0 To list1.ListCount - 1 Print #1, list1.List(i) Next Close End Sub Private Sub Form_Load() list1.AddItem

What image types does VB6 support?

亡梦爱人 提交于 2020-01-06 07:57:16
问题 What specific picture or image types & formats does VB6 support? I can find specific examples here on SO but I haven't seen any comprehensive information. I am mainly interested in what can be used "natively" by VB6, though I am sure there are third-party libraries and/or other methods of loading additional image types. 回答1: The function LoadPicture (loosely) defines what graphics formats are "supported by VB6" in a native sense. Here are the relevant details: Loads a graphic into a forms

My vb.net code can not Call my VB6 DLL when deployed

我们两清 提交于 2020-01-06 05:07:13
问题 I have some code that creates a reference to a vb6 dll and Uses that reference to call the object. I am having a problem because in Debug and on my machine it works great. But when i deploy it to the server which is a windows 2008 64 Server it doesn't work. I get this error: "Retrieving the COM class factory for component with CLSID {C259F578-EC04-4C0F-A13B-AA440F13CB73} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))

how to upload images in vb6 and put it in the mysql database?

柔情痞子 提交于 2020-01-06 04:33:30
问题 does any one know how to upload images in vb6 and can put it in the mysql database?? sample codes will be fine. 回答1: I don't know how you are connecting VB6 and MySQL but the solution is as below: Step 1. Create a table with Mediumblob to store file as below CREATE TABLE files( file_id SMALLINT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY, file_name VARCHAR(64) NOT NULL, file_size MEDIUMINT UNSIGNED NOT NULL, file MEDIUMBLOB NOT NULL ); Step 2. Connection to MySQL as you can use your method

How to check if a date is between two given date

為{幸葍}努か 提交于 2020-01-06 04:24:05
问题 how to check if a date is between two given date in vb Like : If ( BirthDate Between T1 and T2) Then Label5.Caption = " Your Horoscope Sign is LIBRA" End If 回答1: You will need to compare it between both T1 and T2. Something like this should work. Keep in mind the years will have to be the same or the comparison will not work, also this comparison includes the endpoints if you do not wish that remove the equals sign, this is also supposing that you are using date objects If (BirthDate >= T1

How to check if a date is between two given date

浪尽此生 提交于 2020-01-06 04:24:05
问题 how to check if a date is between two given date in vb Like : If ( BirthDate Between T1 and T2) Then Label5.Caption = " Your Horoscope Sign is LIBRA" End If 回答1: You will need to compare it between both T1 and T2. Something like this should work. Keep in mind the years will have to be the same or the comparison will not work, also this comparison includes the endpoints if you do not wish that remove the equals sign, this is also supposing that you are using date objects If (BirthDate >= T1