|
I use DTPicker for many years and never had a problem (with 32 bits PC).
Lately, I installed DTPicker (mscomct2.ocx) on a 64 bits machine.
After the normal install, this tool name appears as DTPicker2 instead of the normal name DTPicker.
For example, in my 32 bits I can use tools such as ListBox, ComboBox and DTPicker.
But my 64 bits shows the same tools as ListBox, ComboBox and DTPicker2.
Of course, when I wrote macros on my 32 bits and copy them on my 64 bits, the normal "DTPicker" is not reckognized as it is called DTPicker2.
The effect is that I have multiple errors when trying to run the macros in my 64 bits.
Any idea how to make sure DTPicker tool is named DTPicker in my 64 bits.
Note: Both DTPicker versions are the same.
Thanks
Daniel
|
|
|
|
|
You could wrap the control in a class called DTPicker which should satisfy the checks of (if typeof(ctl) is dtpicker).
public class DTPicker
Inherits DTPicker2
end class'Never argue with an idiot; they'll drag you down to their level and beat you with experience.' ~ anonymous
'Life's real failure is when you do not realize how close you were to success when you gave up.' ~ anonymous
|
|
|
|
|
Thanks for this quick reply.
I never used class before.
Any idea how these 3 lines should be input?
In a normal module or a class module?
In both, I receive error syntax.
I am using VBA with Excel.
Thanks again
Daniel
|
|
|
|
|
daniel houle wrote: I am using VBA with Excel.
That should have been in your first post. He assumed that you were using VB.NET.
The solution he gave does not apply to VBA/Excel. I don't know of a solution that does.
You may want to open up RegEdit and search for "DTPicker" and see if there is a second DTPicker control registered in the system. If it's there, it was done by the installation of another app, or you have Visual Studio 6 or VB6 installed.
|
|
|
|
|
Thank for your reply Dave
I beleive you are aware that mscomct2.ocx is not supplied with the OS since WIndows ME.
So I have to get it from the net and register it in my PC's.
When I register it on a 32 bits PC, the file creates a DTPicker tool.
When I register it on a 64 bits PC, the file creates a DTPicker2 tool.
Ever heard of such a thing?
If so any idea to fix it so that I could get a DTPicker on my 64 bits PC?
Thanks again
Daniel
|
|
|
|
|
daniel houle wrote: Ever heard of such a thing?
Nope.
daniel houle wrote: If so any idea to fix it so that I could get a DTPicker on my 64 bits PC?
I already gave you the only thing I can think of to see what might be causing this.
|
|
|
|
|
Hello All,
My application is using CryptGenRandom() API to get random numbers. This API is working in all 32-bit computers.
I recently installed my application in windows-7 64-bit computer. On this machine CryptGenRandom() API is throwing below error.
Problem Event Name: APPCRASH
Application Timestamp: 4b84b933
Fault Module Name: StackHash_6299
Fault Module Version: 0.0.0.0
Fault Module Timestamp: 00000000
Exception Code: c0000005
Exception Offset: 000007ff005880cb
OS Version: 6.1.7600.2.0.0.256.48
Locale ID: 1033
Additional Information 1: 6299
Additional Information 2: 6299b6a70d20c6215a02ce0a4291f9cc
Additional Information 3: 7130
Additional Information 4: 71302fa4a91436747a963f67bb2f095e
Sample Code:
ReDim bChallengeArray(127)
lres = CryptGenRandom(lhcsp, 128, bChallengeArray(0))
lres = CryptEncrypt(lhkey, 0, 1, 0, bCryptBufferArray(0), ldatalength, lBufferLength)
Please don't ask me to use managed code, because this is maintanance project client will not agree to change the code.
If anybody have any idea, please let me know the solution.
Thnaks in advance.
Srimodified on Friday, February 26, 2010 5:16 AM
|
|
|
|
|
The error you posted is useless. It doesn't provide any details that can be used to diagnose the problem. You need the error from GetLastError to have any meaningful error code.
We'd also need to see your PInvoke headers for these two functions. It's possible the wrong datatypes have been used to declare the parameters passed into the functions.
|
|
|
|
|
Just a thought as I had something similar. Did you compile for 32 bit? I had to specifically compile for 32 bit before an app would run on Windows 7 64 bit.
|
|
|
|
|
Thanks for the help.
I had compiled all the solution for 32 bit. Now it is working great.
Thanks,
Sri
|
|
|
|
|
Hi,
I am new to VB6,
I need to Create a object of VLicense class present in the XYZ namespace in the XYZ.dll. This will take path to license file, So i have to pass the path of the licence file while creating the object of VLicense. Next, I have to call two public methods of this class object - "IsLicenseValid" and "IsCorrectDate" both returning Boolean value.
Progress :
XYZ.dll is created in .net, So I have created XYZ.tlb to use in VB6. I have also added the reference of the .tlb in the project.
Dim myObject As XYZ.VLicense
(XYZ. is displaying all the methods of the dll)
Now how to proceed from here? I need to create a object of the class and set a path.Please help.
Thanks in Advance,modified on Tuesday, March 2, 2010 1:52 AM
|
|
|
|
|
karthickmani63 wrote: I am new to VB6
You should not be using this old technology. I would suggest you move to VB.NET immediately. You can download the free version of the VB.NET IDE from here[^].txtspeak is the realm of 9 year old children, not developers. Christian Graus
|
|
|
|
|
Richard MacCutchan wrote: You should not be using this old technology
What if he is maintaining legacy software? But yes I agree, I would not start a new project in VB6 and would even think hard about writing new modules/DLLs in VB6 when you can write them in VB.NET and make them COM visible.Steve Jowett
-------------------------
Real programmers don't comment their code. If it was hard to write, it should be hard to read.
|
|
|
|
|
Steven J Jowett wrote: What if he is maintaining legacy software?
A fair point which I did not take into account.
[edit]Judging by your avatar your team must take some controlling [/edit]txtspeak is the realm of 9 year old children, not developers. Christian Graus
|
|
|
|
|
Hi Richard & Steven,
Thanks for your response,
The Framework has already been developed using VB6. Now we are trying to provide a trial licence. The licencing dll is already created using .net
My job is to use this .dll and make the licencing for the VB application.
So I want to know how can i use the public functions of the dll in vb6.
Thanks,
Karthick.M
|
|
|
|
|
Sorry, I misunderstood your original question. If both parts are written in VB6 then just use standard function calls. txtspeak is the realm of 9 year old children, not developers. Christian Graus
|
|
|
|
|
No Richard,
The Appication was developed using VB6 and the DLL using Microsoft .NET
|
|
|
|
|
Your .DLL has to be written so that it is COM exposed. Without that, you cannot use it in your VB6 app.
You've written the apps backwards. Since the .NET .DLL code can be easily examined using .NET Reflector, you just made the most critical part of your licensing code easily readable. It should have been written in something than compiles to native code instead of managed code.
In any case, you have the reference to the .TLB file in your project. Then you just import it's namespace at the top of the code that's going to use the COM objects in it. Then it's just a matter of declaring an instance like any other object.
Dim x As New MyComClass
|
|
|
|
|
Thanks Dave,
I am now checking this in my project,
Dim TestObject As XYZ.VLicense
If TestObject.IsCorrectDate= False Then
MsgBox "Correct Date"
End If
But i am getting run time error '91'
Error :object variable or with block variable not set
What am I doing wrong? Should i also refer the path of the licence file to the created object?
FYI: VLicense is a class in the .dll and IsCorrect daet is the public methos of the calss,which checks if the sytem date is correct or is it back dated.
Thanks,modified on Tuesday, March 2, 2010 1:52 AM
|
|
|
|
|
karthickmani63 wrote: Dim TestObject As XYZ
Dim TestObject As New XYZ
The .IsLicenseValid is a method on the XYZ object, in which case, you can't make an instance of it.
Seriously, this is a VB 101 rookie mistake. How long have you been writing code??
karthickmani63 wrote: Should i also refer the path of the licence file to the created object?
I don't know. I have no idea how that library works. You'll have to read up on the documentation for it.
|
|
|
|
|
Sorry Dave,
I am working on VB only for past 2 weeks.
Also Please check the previous post I made a mistake while posting.
The developer who created the XYZ.dll asked me to refer the path of the .xml licence file while creating the object of VLicence class.
I dont think so this is possible in Vb, as this may require a constructor.
When I checked the XYZ.dll using Microsoft .Net Framework IL Disassembler.
I found that IsCorrectDate and IsLicenceValid are public methods defined in the VLicence class.
Now:
1.
Dim obj as XYZ.VLicence
obj.--- (Doesnt display the public Methods)
2.
Dim obj as new XYZ.Vlicence
(Trying to create a object of the class doesnt work as well)
3.
Dim obj as XYX.VLicenceInterface
obj.IsLicenceValid
.IsCorrectDate (I am getting the public methods displayed)
If obj.IsCorrectDate = True Then
(Here I am getting the Same error mentioned above)MsgBox "Correct Date"
End If
I am unable to use the functions using this XYZ class object. But the same can be accessed using XYZInterface class object.
suggest me a solution to over come this.
Thanks,
Karthick.Mmodified on Tuesday, March 2, 2010 1:54 AM
|
|
|
|
|
#3 seems to be the most appropriate, but I'm not the person to ask. You should be asking the guy who wrote the library.
|
|
|
|
|
Would a team small as mine benefit using Visual Studio ultimate?
We have 2 people at the moment and will probably add another soon.
Very small team but the thing that intrigues about ultimate is intellitrace... and my understanding is that it is only available in ultimate.
We are currently running VS2008Pro.
Also I am wondering if ultimate has built in source control and if so has anyone used it/like it?
Thank you allHumble Programmer
|
|
|
|
|
The Team Foundation Client is available as a separate download, and therefore, I assume, integrateable with all VS2010 editions, though I have not tried it myself. It appears that they are moving to it being an add-on component rather than part of a special team build. If anyone knows more about that side of the component packaging for VS2010 I would like to hear about it as well.
The Team Foundation Client can then access Team Foundation Server 2010 and Team Foundation Server 2008, though not Team Foundation Server 2005.
|
|
|
|
|
Hi CodeProject ,
I wrote a javascript to validate the fields on the contact form . But it is working in my system.
After deploying in Main server . I am getting BLANK fields values .
What is the problem ?
This the code
<%@language = "VBscript"%>
<%
set objMessage = createobject("cdo.message")
set objConfig = createobject("cdo.configuration")
' Setting the SMTP Server
Set Flds = objConfig.Fields
Flds.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 1
Flds.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "xyz"
Flds.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport")=25
Flds.update
dim b
b= "Name : " & Request.Form("Name") & vbCrLf
b= b & "Organisation : " & Request.Form("Organisation")& vbCrLf
b= b & "Title : " & Request.Form("Title")& vbCrLf
b= b & "Address : " & Request.Form("Address")& vbCrLf
b= b & "City : " & Request.Form("City")& vbCrLf
b= b & "Country : " & Request.Form("Country")& vbCrLf
b= b & "Email : " & Request.Form("Email")& vbCrLf
b= b & "Phone : " & Request.Form("Phone")& vbCrLf
b= b & "Interesed in : " & Request.Form("category")& vbCrLf
b= b & "Description : " & Request.Form("Description")& vbCrLf
Set objMessage.Configuration = objConfig
objMessage.To ="xyz@gmail.com"
'objMessage.CC ="xyz@xyz.in"
objMessage.From = "info@xyz.in"
objMessage.Subject = "Contact Form - " & Request.Form("Organisation") & vbCrLf
objMessage.TextBody = "High priority - See details below. " & vbCrLf & vbCrLf & b
on error resume next
objMessage.Send
if Err.Number <> 0 then
response.Write "Email sending failed: " & Err.Description & ".<br />"&vbcrlf
else
response.redirect("contact_submit.html")
end If
Response.End
set objMessage = nothing
set objConfig = nothing
%>
Regards,For1206
|
|
|
|