|
student_rhr wrote: 1- Should I make three different Projects and apply necessary settings accordingly?
That is a bit of redundancy.
student_rhr wrote: Should I make two different projects (one for home and pro and one for corp.) and use the settings (the license key) to find out which version user has Installed?
You could, but you may run into versioning nightmares.
student_rhr wrote:
3- Should I make just one project and use the product key to distinguish which version was installed?
You could, but someone could look into the code and try to hack a workaround.
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
What is the best industry practice?
|
|
|
|
|
I am not 100% sure. It is something that does vary from software shop to software shop.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
|
|
|
|
|
Hi Friends,
I need help. I have C#.Net 2005 DLL(COM Introp), and I want to use/call it in VB.Net 2003.
I have tried various posibillites but it doesnt work. Following are some of them.
1) Give project reference (Not allowed)
2) Add reference (Not allowed)
Is anybody help me how to do that?
Thanks in Advance
|
|
|
|
|
Why would you want to use it in 1.1 when you could code it in 2.0 and have all the advantages of the extra features and better IDE?
You'll need to install the .Net 2.0 framework anyway so why not just use that?
|
|
|
|
|
I have some applications which is already developed in Framework 1.1 and as of now its not posible to move to Framework 2.0.
|
|
|
|
|
Bhavik Solanki wrote: which is already developed in Framework 1.1 and as of now its not posible to move to Framework 2.0.
Have you tried running the solution from 1.1 through the converter to make it 2.0?
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
The simple answer is you can't. C# 2.0 (from VS 2005) uses .NET 2.0 while VB.NET 2003 uses .NET 1.1. These are different runtimes and are not compatible with each other. Beyond that, you can't have one application that loads two different versions of the runtime.
|
|
|
|
|
|
As a hack you could load it as an out of process COM server, but it's bad and wrong, just upgrade the damn app already :P it'll be worth it in the long run. There were very few breaking changes between 1.1 and 2.0 so theres not much excuse for not upgrading.
|
|
|
|
|
Thanks to All of you.
After doing lot of R&D and Spending lot of time on it, finally I come to the decision that I will upgrade existing applications to Framework 2.0.
Thanks Again.
|
|
|
|
|
I have a GUI utility and it connects to a sql server 2005 database. All of the connection code has been generated by the IDE.
I have 2 databases one for produciton and one for development. How can I switch the connection string? I am currently doing it in the Settings.Designer.cs file and checking for
#if DEBUG
//use the dev server
#else
//use the prod server
#endif
however everytime i alter the settings.settings file the IDE rewrites the Settings.Designer.cs file.
this is how the code currently works:
currently when i start my application the connection string is initialized like this:
this is called:
internal System.Data.SqlClient.SqlConnection Connection {
get {
if ((this._connection == null)) {
this.InitConnection();
}
return this._connection;
}
which calls this:
private void InitConnection() {
this._connection = new System.Data.SqlClient.SqlConnection();
this._connection.ConnectionString = global::DGView2.Properties.Settings.Default.ProdConnectionString;
}
which calls this:
public string ProdConnectionString {
get {
return ((string)(this["ProdConnectionString "]));
}
}
app.config file:
<connectionStrings>
<add name="DGView2.Properties.Settings.ProdConnectionString"
connectionString="Data Source=localhost;Initial Catalog=MyDatabase;Integrated Security=True"
providerName="System.Data.SqlClient"
<add name="DGView2.Properties.Settings.DevConnectionString" connectionString="Data Source=localhost\DEV;Initial Catalog=MyDatabase;Integrated Security=True" />
</connectionStrings>
I guess part of the problem is that this line of code:
this._connection.ConnectionString = global::DGView2.Properties.Settings.Default.ProdConnectionString;
is always calling: public string ProdConnectionString
so in my Settings.Designer.cs file I have set it up this way:
public string ProdConnectionString {
#if DEBUG
get { return ((string)(this["DevConnectionString"]));}
#else
get { return ((string)(this["ProdConnectionString"]));}
#endif
}
I am not convinced that this is the best way to do it. The ideal situation I think would be to use the desired property based on DEBUG or RELEASE in the call to the connection string:
#if DEBUG
this._connection.ConnectionString = global::DGView2.Properties.Settings.Default.DevConnectionString;
#else
this._connection.ConnectionString = global::DGView2.Properties.Settings.Default.ProdConnectionString;
#endif
however there are just to many instances of this therefore making it less efficient.
any suggestions?
thx
|
|
|
|
|
You may need to look in the App.Config file...
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
i am looking in the app.config file that's where the settings are stored...that's not the problem
thx for your help tho
|
|
|
|
|
The normal way of doing this is to just use one setting. You change the config file, so that you have a debug version and a release version.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
I second what Pete said - use one setting, called ConnectionString and edit the file depending on whether you want it to work on Dev or Prod.
Cheers,
Vıkram.
After all is said and done, much is said and little is done.
|
|
|
|
|
thanks to all for the replies...i will stick with one connection string
|
|
|
|
|
Heres a simple one im making a startup forum which asks for a password when the user clicks on the trey icon , if the password is accpted the value Authenticated is set to true and the trey icon menu is enabled
the problem being the whole multi form thing i cant change the value of Authenticated in the native form , Can anyone tell me how to get this working ?
//Native form
private bool Authenticated;
private void TreyIcon_Click(object sender, EventArgs e)
{
Authenticated = false;
if (Authenticated == true)
{
this.TreyIcon.ContextMenuStrip = this.TreyMenu;
}
else
{
Authentication form = new Authentication();
form.ShowDialog();
}
}
//remote form
private bool Authenticated;
private void Authenticate(object sender, EventArgs e)
{
if (Password1.Text == "pass")
{
MessageBox.Show("Password accpted", "Exception", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1);
Authenticated = true;
}
else {
Application.Exit();
}
}
|
|
|
|
|
Raymond_P* wrote: i cant change the value of Authenticated in the native form , Can anyone tell me how to get this working ?
Not sure, but as an observation, I wouldn't have the password out in plaintext when you have your program go live
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
well its just some basic protection the app has my ftp credentals it updates a flash websites xml files . Its manly to detur anyone who uses my laptop like family. I wont be giving it to anyone else
im sure its simple ive dine this before but ive forgoton how
|
|
|
|
|
Raymond_P* wrote: Its manly to detur anyone who uses my laptop like family. I wont be giving it to anyone else
Okay, simple enough
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
|
|
|
|
|
Dear All,
Need help to get the root/home directory of an FTP site configured on IIS 6.
Now so far i have been able to get each and every information such allowed via the WMI provider but am still unable to find any information to get home/root directory for ftp site.
Thank you!
M. Nauman Yousuf
|
|
|
|
|
Hi all?
Can IIS 7.0 be installed on windows vista?
Is there an option called Windows authentication on IIS 7.0?
Regards
|
|
|
|
|
Google search: IIS 7.0 on Windows Vista[^] should be of help. As long as you have Vista Business or Ultimate.
BTW, do you have a C# question? You are in the wrong forum...
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
Seems like you have cross-posted before and not gotten the message. I am virtually hitting your nose with my rolled up TechNet magazine. Now go to the corner and read the forum guidelines.
_____________________________________________
Flea Market! It's just like...it's just like...A MINI-MALL!
|
|
|
|