|
Hello,
You can use following code for each ID....
VB.net
Private str As String = "2005/" + ID.ToString("000")
C#
string str = "2005/" + ID.ToString("000");
HTH. cheers.
Maqsood Ahmed [MCP,C#]
Kolachi Advanced Technologies
http://www.kolachi.net
|
|
|
|
|
You can also use CStr(ID)
CompleteID = strYear & "/" & CStr(ID)
Lost in the vast sea of .NET
<a href="http://www.komputing.com/Pricelist.html">Visit my website at www.komputing.com</a>
|
|
|
|
|
Hi
I am trying to create a command in a data environment that would be an SQL with input parameter/s.
I want to give the parameter a value entered by the user in a form.
How do we give the parameter this value?
- Lostris
|
|
|
|
|
|
Hi, anyone know how to set a particular cell text color in datagrid for .Net Compact Framework?
Thanks in advance!
|
|
|
|
|
|
I have a project(can be compiled to .dll) of VB.6. I want to use the "strong names" to set: version, ProductName, Copyright...on it as in Assembly file in DotNet, but I do not know how to do it. Pls help me!
I look foward from your idea.
If you have any comments, pls send me soon my Email as below:
Hungnv@vidagis.com or Hungnv43t@yahoo.com
Thank!
Best Regards.
Hung Nguyen Viet
|
|
|
|
|
The VB6 IDE provides an interface to assign Version, ProductName, CopyRight etc. I don't think you can install non NET assemblies in the GAC. If you need strong naming and installation to the GAC, the only viable solution I know of is to re-write the dll in NET.
Robert
|
|
|
|
|
What your referring to is not "strong naming". Strong names are only supported by .NET Framework assemblies, and VB6 doesn't qualify. What your talking about are just properties and can be set in the Project Properties dialog in the VB6 IDE.
Also, you can't install a non-.NET assembly in the GAC and expect it to work like a .NET assembly.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
So if I have a dll file that was written on Visual Basic 6.0 environment, how to use it on strong names (mabe use some .NET's tool) ?
Best Regard,
Hung Nguyen Viet.
|
|
|
|
|
There's no such thing as strong naming a VB6 .DLL. The .NET tools won't work on it either.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
hello friends,
i have design an application in VB6.0.
i use the package and deployment option of VB6.0 to create the setup for the application.
it was created successfully.
but i have a problem that if any computer has already installed my application then it does not update with the new version of my application.
can you tell me how can i uninstall the previous version in the setup wizard.
or how can i prompt user that application is already installed and uninstall that first.
please reply me as soon as possible...
i am in big trouble..
thanx
Gagan Deep Singla
Chandigarh - INDIA
|
|
|
|
|
VB6 Setup does not support this functionality. However, the source code is also in VB6 and is easily modified. You can find the source code of the setup in the folder:
\Program Files\Microsoft Visual Studio\VB98\Wizards\Setup1
Basically what you do is modify the Setup1 program to search for the program's registry key, usually found under:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Program Name
If the program is installed, launch a new process with the uninstall parameters found in the registry. Use the CreateProcess API and wait until the uninstall ends. Then continue the setup.
Robert
|
|
|
|
|
Thanx for responsing sir,
i opened the project and check there that if the folder exist in the program file then this will call the exit module of the project.
i complete the modifications but i am not able to execute the project directly to create the exe file.
while deployment it take the setup1.exe file which is outside the setup1 folder as you told.
how can i run the modified setup1 project and create a exe file of that so that i can use that exe file while deployment.
please reply ASAP..
Thanx again..
Gagan Deep Singla
Chandigarh - INDIA
|
|
|
|
|
One way to do this is to compile the modified setup1 project to create a new Setup1.exe. Copy the compiled Setup1.exe into the folder named "PDwizard". The P& D wizard includes the version of Setup1.exe found in this folder.
The problem with doing this is that you probably do not want to use the modified version in all your setups, so you have to remember to save the old Setup1.exe and switch the two files again when you are done.
A better approach is to rebuild the CAB file with the modified Setup1 exe. You can include a different version of Setup1 in a CAB by copying the new Setup1.exe into the project specific Support folder, and rebuilding the cab using the batch file automatically created by the wizard for building the project CAB file.
Robert
|
|
|
|
|
hello sir,
you are not giving me the solution of my problem.
my problem is how to compile the modified setup1 project. when i compile this project this will give error.
error is not in the changes which i have made. it needs some predefined variable values, which i am not able to provide.
please tell me how to compile the setup1 project. rest every thing i know that how to use the new compiled setup1.exe.
i am again repeating that i want to know just how to compile the setup1 project. please try it on ur own pc without any change in it then u will find my situation.
thanx for responsing me..
Gagan Deep Singla
Chandigarh - INDIA
|
|
|
|
|
It compiles correctly on my pc as is. On the Project Properties screen, under the Make tab, you need to add the following Conditional Compilation Argument:
LOGGING = -1 : SMS = 0
There are also a number of C++ files that must be in the application folder, but those should all be there. The non-VB files required are:
COMMONRC.H
COMMONRC.RC
SETUP1.RES
SETUPRES.H
VBSHELL.ODL
VBSHELL.TLB
Other than that, without a specific error message I cannot offer any other suggestions.
Robert
|
|
|
|
|
All the conditions which you have wrote are already there. i am having the statemant LOGGING = -1 : SMS = 0 at appropriate place as you told.
All files which you are specifing are also present in the same folder as in the setup1.vbp.
Error Message is:
Application removal logfile 'c:\winnt\st6unst.001' not found. Unable to continue.
How can it find the file because there is not folder in C of Winnt. i have installed the Win-XP and it has the Windows folder in the C drive.
This error message comes in the ProcessCommandLine function of the bassetup1(setup1.bas) when called in Form_Load of Frmsetup1(setup1.frm).
please find if you can trace the error....
thanx for communicating me..
bye
Gagan Deep Singla
Chandigarh - INDIA
|
|
|
|
|
OK, just to clarify things - this is not a problem with compiling the Setup1.exe, but rather a problem that occurs when trying to step through the Setup1.vbp in the IDE.
What happens when you actually run a setup is that the setup.exe bootstrapper does some preliminary system setup before it calls Setup1.exe, and it also passes in a command line. The setup.exe moves the .CAB file to the Windows directory, extracts the st6unst.exe and Setup.Lst files to the Windows directory, and creates a new uninstall log (st6unst.00n) file in the Windows directory. Then it creates a command line with the file locations as parameters.
In order to run Setup1 by itself in debug mode, you must first manually perform the same steps that the bootstrapper ordinarily does to prepare the setup to run.
1)Make sure the file st6unst.exe exists in the C:\WINNT folder. If it does not copy the file to the folder.
2)Copy the Setup.LST file for the package to C:\WINNT.
3)Copy the .CAB file for the package to C:\WINNT.
4)Create a text file with notepad, save it as C:\WINNT\st6unst.001, and add the following lines of text:
NOTE: Beginning of the bootstrapper section
CONFIG:
Title: [insert your application name here]
5)In the make tab of the Setup1.vbp project, add the required command line:
"C:\WINNT" "C:\WINNT\st6unst.001" "C:\WINNT\st6unst.exe"
The command line arguments MUST include the quotes, and each must be separated by exactly ONE blank space.
You can now run in the IDE.
HOWEVER, make sure you save all your work before trying to debug Setup1.vbp in the IDE. The Setup1 project makes some API calls that will crash the IDE and may completely lock up your machine. At best you will lose the VB6 IDE and at worst you will have to cold reboot yourt machine.
Robert
|
|
|
|
|
how can i create a new table in sql server database by visual basic command
|
|
|
|
|
|
CREATE TABLE table_name
(
column_one varchar(25),
column_two varchar(20),
column_three int,
column_four int
)
|
|
|
|
|
I want to be able to print all of the property settings to all of my forms so I dont have to go back and forth from project to project. I cant remember how I set things.
gcody
|
|
|
|
|
You could just print the code for it. Look in the Region labeled "Windows Forms Designer generated code". You'll find all the properties that are not set to default values listed in there.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Does anyone know how to change the startup form in a windows app??
|
|
|
|