|
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!
|
|
|
|
|
leckey wrote: I am virtually hitting your nose with my rolled up TechNet magazine
Too bad I couldn't tie a rock or brick to my message I posted hurled earlier
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
How can i kill a module without terminating its process?....
|
|
|
|
|
what do you mean by module here ?
you can abort or kill a thread (not a very good idea).
you cant unload a class or assembly, but you can create a new AppDomain, load it, then
remove it (with everything thats in it).
|
|
|
|
|
Then how can I know if a thread belongs to a cirtain dll/module. Its very important to me since a dll that I activate causes a crash at shotdown.
|
|
|
|
|
A thread does not belong to anything, it is a living being.
It gets created by some code, that code probably sits inside an EXE or a DLL file.
Tossing out the code at run-time will not achieve the result you are after.
whay do you mean by shotdown: is it the app wanting to terminate by itself,
is it you telling the app to terminate, or is it you telling the PC to shut down (and
then the PC telling all the apps and services of this fact) ?
Did you create the EXE and the DLL files, so you can change the source files (and
correct whatever you did wrong in the first place, if anything) ?
Things to do depend on the answers.
|
|
|
|
|
You can load that dll into its own app domain. Then you can shut down that app domain.
Ben
|
|
|
|
|
You can load this DLL, or whatever it is, into it's own AppDomain, but that's not going to stop it from crashing. And, it's more than likely not going to stop an error message from popping up either.
|
|
|
|
|
Hi,
I have some .html templates, when the Form is submitted the code creates the document and modifies certain portions of the document with information obtained from the fields in the code.
What is a better way to do this, will XML help at all? I'm presently using StringBuilder to develop the content. Ideally I could reopen the documents and quicky make changes rather than re-create them each time.
|
|
|
|
|
One way would be to have a template file with the sections that you want to replace marked out with unique text, then do a find/replace on this.
private string Replace(string item, string replace, string text)
{
if (item == null || item.Trim() == string.Empty)
return string.Empty;
return Regex.Replace(item, replace, text, RegexOptions.CultureInvariant | RegexOptions.IgnoreCase);
} This is a method to do a replace based on a regular expression. Call this as:
text = Replace(text, "^^ Unique Text ^^", "My replacement text");
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Hi,
how do i programmatically add a link to a css file e.g.
to a xml file?
Thats my code so far:
XmlWriterSettings settings = new XmlWriterSettings();<br />
settings.Indent = true;<br />
settings.IndentChars = (" ");<br />
using (XmlWriter writer = XmlWriter.Create(logFileXml, settings))<br />
{<br />
writer.WriteStartElement("log");<br />
writer.WriteEndElement();<br />
writer.Flush();
|
|
|
|
|
Errm - you don't link CSS to XML. You link CSS to your generated (X)HTML.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Ok now i'm confused. I just want to style my xml-files so i can view it like a nice html table
|
|
|
|