|
On assumes you should just provide DoSomething and not worry about the arguments. You can only start a thread that takes no arguments, or a single argument, of type object, AFAIK.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Christian Graus wrote: or a single argument, of type object, AFAIK.
You are correct sir.
Now, IIRC, that's only in .NET 2.0 and above. I think .NET 1.1- couldn't take any arguments at all and had to pick up any arguments from a third party object visible to the method being launched.
|
|
|
|
|
No, I think I wrote .NET 1.1 code that multithreaded with a parameter.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Really?? I haven't done any threading in quite a while. I've forgotten a bunch...
I thought ThreadStart didn't take an argument, but the 2.0 ParameterizedThreadStart took an Object. Hmmm... where's my MSDN...
|
|
|
|
|
hi everyone,
when i select Window Media Player from Components tab of Choose Toolbox Items form then toolbox show Window Media Player control but when we draw window media player on form then following error occured
"Failed to Import ActiveX Control.Please ensure it is properly Registered"
i have no idea about this error . Can anyone guide me that how can i resolve this problem ?
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
My Company
|
|
|
|
|
Rupesh Kumar Swami wrote: "Failed to Import ActiveX Control.Please ensure it is properly Registered"
Have you tried to register / re-register this control using the regsvr32 command? Find the full path to the ocx in question and register it using:
<br />
Syntax<br />
regsvr32 [/u] [/s] [/n] [/i[:cmdline]] dllname<br />
<br />
Examples<br />
To register ActiveX Library:<br />
<br />
regsvr32 "C:\path_to_activex\your_ocx_name.ocx"<br />
<br />
Parameters<br />
/u : Unregisters server. <br />
<br />
/s : Specifies regsvr32 to run silently and to not display any message boxes. <br />
<br />
/n : Specifies not to call DllRegisterServer. You must use this option with /i. <br />
<br />
/i:cmdline : Calls DllInstall passing it an optional [cmdline]. When used with /u, it calls dll uninstall. <br />
<br />
dllname : Specifies the name of the dll file that will be registered. <br />
<br />
/? : Displays help at the command prompt. <br />
Pete Soheil
DigiOz Multimedia
http://www.digioz.com
|
|
|
|
|
Hello to all,
I understand this is not a VB question, nor is related to it in any manner. But as being a Q. based on development, I request Moderator of this forum to let the Q. by here and I may get some idea on my requirements.
I have developed an application for a client. It is a Database Driven application. The client is trying to use to same application for many other databases with same structure. How can I avoid him from making such misuse of an application. After long tries, now he has comeup with just replacing the data; data struc. is same just del. all records & insert new records & use it with another copy of the software & sell for a new purpose.
Any ideas, how can I avoid him being successful in this case. Any idea is appreciated.
Thanks
Terry
|
|
|
|
|
Insert a record into one of the tables that is a marker record for you.
Then when the application kicks off get it to look for this record.
If this record is not present then lock the application.
Would this work with what you are trying?
The issue sounds like you don't want them to be able to redistribute your software - solution: use the registry, set the registry on first use, supply a key with the software.
Alternatively take the person to court for redistributing your software illegally - you did include a EULA with the software didn't you?
You always pass failure on the way to success.
|
|
|
|
|
Yes, you got it right. I don't want him to reuse my application for totally free of cost. Its not fair, the though he has paid me for the application which was designed for 1 DB only, but wants to use the same for several DBs.
I had given him with the easy way only - Hard coded the connection string. Thats why he is trying to use the same DB, not to even change the name, just to change records.
He wants to use the same application for other DBs with differnt clients. For eg. a Jeweller, a Parma Supplier, a Hospital, etc. I don't think, this way the registry can be of help. As it will be distributed to differnet clients, differnt machines. So registry will be different. Please correct me, If you feel i am wrong.
I didn't include the Copyright stuff, as he will be selling on his name.
I have created a setup package, but didn't add any key.
What do you guys say? How can I avoid him from using the same application for diffeernt purposes.
GuyThiebaut wrote: Then when the application kicks off get it to look for this record.
If this record is not present then lock the application.
That record will be visible to him in Access, though I hide it in the application stuff. Now I have to give hime v.2. So, i want to make sure, that this version he cannot use it.
Can you help me know with EULA
Thanks
Terry
|
|
|
|
|
the simplest way (I think) is to hard code the connectionstring
a more difficult way would be to manipulate the registry (like above)
a more expensive and perhaps dangerous way would be at the start of the programme it connects to a db on you'r server (=expensive part) and check wether or not he can boot the programme
(this is just of the top of my head so don't know how it would translate into code, if it is even possible)
If my help was helpfull let me know, if not let me know why.
The only way we learn is by making mistaks.
|
|
|
|
|
TDDragon wrote: a more expensive and perhaps dangerous way would be at the start of the programme it connects to a db on you'r server (=expensive part) and check wether or not he can boot the programme
(this is just of the top of my head so don't know how it would translate into code, if it is even possible)
Do you mean to say like Visio 2003 Product Activations?
|
|
|
|
|
yes something like it.
I once started on something like it but had to abbandon it due to lak of time and never really got far with it.
The draw back is that the client always has to be connected to the internet (at least in the way I did it)
But like I said don't know how good it would work since I never got to the point that I could really test it.
If my help was helpfull let me know, if not let me know why.
The only way we learn is by making mistaks.
|
|
|
|
|
OK here is a solution - use the registry key option and force him to mail you for the license key before the product can be used.
-Generate the registration key based on his computer's macaddress.
-In order for him to get the key your program will generate a code, based on his macaddress, that he will send to you.
-Then you send him back a key which is generated from the macaddress he sent you.
-Your software then checks this key against his macaddress and unlocks the software, making a note of this in the registry, if the key is correct.
-As the key is only needed at registration if his macaddress changes later this is not a problem.
This will stop the software from being installed on other computers unless the clever bugger works out what you have done (make the key generation algorithm complicated!). If he does work this out then I would say that he is entitled to use the software for free
Changing the registry is not at all difficult - google it and you will find plenty of articles.
I hope this is of help(let me know if it is or not;)).
You always pass failure on the way to success.
|
|
|
|
|
When I declare a WIN32 API like this
Private Declare Function GetScrollPos Lib "user32" (ByVal hWnd As IntPtr, ByVal nBar As Integer) As Integer
I receive an error message by the compiler -
"User-defined type not defined"
Do you know what it means?
P.S. This is VB6
modified 8-Mar-17 3:46am.
|
|
|
|
|
i think there is no primitive datatype named IntPtr invb6. u can use long instead of IntPtr in this function.
|
|
|
|
|
You may use (Byref hWnd As Long) instead.
|
|
|
|
|
This Declare is for VB.NET, not VB6. The VB6 equivilent would be:
Private Declare Function GetScrollPos Lib "user32" (ByVal hWnd As Long, ByVal nBar As Long) As Long
|
|
|
|
|
Consider using API Viewer or API Guide for determining API calls from whatever the language.
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios[ ^]
|
|
|
|
|
Hi guys,
I am writing a small VB.Net 2005 program that should connect to different databases at run time. I would like to include the windows/.net datasource configuration wizard in the system and get the connection string from the wizard control but I cant find control or way to achieve the goal, is it possible or maybe is there a workaround?
Thanks for you assistance.
|
|
|
|
|
Got the answer to my question
Add references of 2 assemblies, Microsoft.Data.ConnectionUI.dll and Microsoft.Data.ConnectionUI.Dialog.dll, located at C:\Program Files\Microsoft Visual Studio 8\Common7\IDE which by the way are not redistributable, then in code you have something like this...
Imports Microsoft.Data.ConnectionUI<br />
...<br />
<br />
...<br />
Dim myDataConnectionDialog As New DataConnectionDialog<br />
DataSource.AddStandardDataSources(myDataConnectionDialog)<br />
If DataConnectionDialog.Show(myDataConnectionDialog) = Windows.Forms.DialogResult.OK Then<br />
txtSourceConnection.Text = myDataConnectionDialog.ConnectionString<br />
End If
Thanks to all who cared to think about it
-- modified at 3:00 Thursday 6th September, 2007
|
|
|
|
|
That is good information to know! I have hear of people distributing connection strings by reading it from text file, XML file, INI file or a DSN file (.udl). I have to try your way. Thanks for the update.
Pete Soheil
DigiOz Multimedia
http://www.digioz.com
|
|
|
|
|
can any one help me to create an application and capable of adjusting Contrast & brightness In VB
i tried but i got problesms
i want picture to be streched to the size of a picture box
after that u can adjust brigh & contrast
pls send reply to my id :
jagdish_junjur@yahoo.co.in
jagdish_junjur@rediffmail.com
jagdish.junjur@gmail.com
jagdish
|
|
|
|
|
jackleela wrote: i tried but i got problesms
What problem you got? State it here so that we cna help you?
jackleela wrote: pls send reply to my id :
jagdish_junjur@yahoo.co.in
jagdish_junjur@rediffmail.com
jagdish.junjur@gmail.com
Who asked this did you notice there is an Email Link in that you will receive an email if someone answers it her in CP.
SSK.
|
|
|
|
|
I have developed an application in vb and have tried two ways of connectivity with oracle but none of them helped me.
once using the ADODC and A MSHgrid
second using an ODBC driver..
the error it shows is
"Test connection failed because of an error in initializing provider.[microsoft][ODBC]driver for [oracle](oracle)"
or it says
"error in initializing provider. The error from oracle cannot be retrieved."
Kindly Help.
|
|
|
|
|
Which VB? VB6, VB.NET 2002, 2003, 2005, ...?? Which version?
|
|
|
|