|
Hi all.
I have a simple question that I just can't get right.
When you create your deployment project, you set the version of your installer in the properties.
Now my question being is in my code, how can I retrieve that version number, the one you would assign to your own app?
I googled and searched and only version that I found to retrieve was the framework version, and that I don't need.
I'm sure it must only be a very simple statement....
Thanks in advance
He who laughs last is a bit on the slow side
|
|
|
|
|
If it is the assembly version you are looking for you can get it by doing Assembly.GetExecutingAssembly and doing a GetName on the returned assembly object. That will have the version.
--------------------------------------------------
|
|
|
|
|
I have two richtextbox out of two each one will be shown depending upon some condition.initially richtextbox1 will be there.and richtextbox2 will appear in some event.But when rich textbox2 is appearing the focus remains in the textbox1.How to use the setfocus function to set the focus at richtextbox2
|
|
|
|
|
when u show the second richtextbox, call the Focus() method of that
richtextbox.
Thanks & Regards,
Pramod
"Everyone is a genius at least once a year"
|
|
|
|
|
I want to open a text file so I am using this code
OpenFileDialog openFileDialog1 = new OpenFileDialog();
openFileDialog1.InitialDirectory = "c:\\" ;
openFileDialog1.Filter = "txt files (*.txt)|*.txt|All files (*.*)|*.*" ;
But my application contains a richtextbox where I want to show the contents of the file
How to do it
|
|
|
|
|
Your question not specify what do you want to do please add more info in to your question!
add:You have bad title!!
|
|
|
|
|
When I will click the open menu dialog box will appear where I will browse the text file.And contets of the text file will be shown in the richtextbox which the application contains
|
|
|
|
|
After the user selects the text file from the OpenFile dialog
use the richtextbox.loadFile() method and specify the filename in the method.
Thanks & Regards,
Pramod
"Everyone is a genius at least once a year"
|
|
|
|
|
But how to store the selected file name at run time,so that I can pass the parameter to load File method
|
|
|
|
|
if (openFileDialog1.ShowDialog() == System.Windows.Forms.DialogResult.OK)<br />
{<br />
richTextBox1.LoadFile(openFileDialog1.FileName);<br />
}
You can store FileName in registry
Chatura Dilan
SC Java Programmer
|
|
|
|
|
u can use a global variable to store the name of selected file (at the event the file is being selected) and then use that variable to pass it to the method.
sAqIb
|
|
|
|
|
Please I need to use the class of TapeOperator in .Net framework 2003.
|
|
|
|
|
Yes, and?
--------------------------------------------------------
My portfolio & development blog
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
how do we use global variables in C#???
reply soon
STABd
|
|
|
|
|
You don't, there is no such thing.
You can use static classes/variables for the same purpose.
|
|
|
|
|
1. Make sure that you really need the global variable.
2. Use a singleton with public properties, or a structure with public static variables.
____________________________________
There is no proof for this sentence.
|
|
|
|
|
:|everything is encapsulated inside objects. that being the case, no there are no global variables in .net.
you can make "global" variables with a singleton object:
public class Global {<br />
private static object syncLock = new object();<br />
private static Global instance;<br />
public static Global Instance {<br />
get {<br />
lock(syncLock) {<br />
if(instance == null) instance = new Global();<br />
}<br />
return instance;<br />
}<br />
}<br />
private Global() { <br />
one = 1;<br />
two = false;<br />
er = 0.2F;<br />
} <br />
private int one;<br />
private bool two;<br />
private float er;<br />
<br />
public int One { get { return one; } set { one = value; } }<br />
public bool Two { get { return two; } set { two = value; } }<br />
public Float Er { get { return er; } set { er = value; } }<br />
}<br />
<br />
<br />
<br />
Global.Instance.One = 7;<br />
<br />
<br />
int oneVal = Global.Instance.One;
STABd
|
|
|
|
|
You can use a global variable by declaring it as static member of the class. e.g
public static int var;
now the variable 'var' will be used as global variable.
Regards
sAqIb
|
|
|
|
|
Hi all,
I have created an windows application, now i want to embed this
application in a web browser.
The first question is whether this is possible?
and if possible, how do i do that?
Please direct me to some good source for the same.
Thanks & Regards,
Pramod
"Everyone is a genius at least once a year"
|
|
|
|
|
As far as I know that is not possible (99.99% shure).
--------------------------------------------------------
My portfolio & development blog
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
|
I heard something as "Click-Once" that allows you to use those Forms as Java applets in the web.
|
|
|
|
|
Hi,
I've been looking for like 2 hours for a method or anything that reads the text which is typed in a textbox.
I don't really know much about buttons and textfields. I usually work with the console.
Can anyone tell me how to read in text from a textbox plz?
Thanks in advance!
|
|
|
|
|
suppose that u want to retrieve the data of the textbox to a variable
u can do it by the foll code:
string data=textboxname.Text;
NEHA GUPTA
|
|
|
|
|
hi
textBox1.text will give you the text is typed in textBox1
Tamimi - Code
|
|
|
|