|
Hi again,
I found out that it works, when I start the application outside of VS2k3.
It definitly does not work, when I start it inside of VS2k3 by hitting the "play" button.
Maybe there is something wrong with my VS settings.
Anyway thx
~Humppaman
|
|
|
|
|
Hello everyone,
I have some data "Hour, Minute, second" which I would like to display in the format of "HH:MM:SS". As the digits can be a single and double I would like to put a "0" for a single digit.
Can anyone tell me how I can format this?
Thank you very much and have a great day.
Khoramdin
|
|
|
|
|
Example:
int a = 2;
string a_inOneDigit = a.ToString(); // 2
string a_inTwoDigit = a.ToString("D2"); // 02
|
|
|
|
|
strHours = Hours < 10 ? "0" + Hours.ToString() : Hours.ToString();
strMinutes = Minutes < 10 ? "0" + Minutes.ToString() : Minutes.ToString();
strSeconds = Seconds < 10 ? "0" + Seconds.ToString() : Seconds.ToString();
Smile: A curve that can set a lot of things straight!
(\ /)
(O.o)
(><)
|
|
|
|
|
Make a DateTime value out of it and format it:
DateTime time = new DateTime(0, 0, 0, hour, minutes, seconds);<br />
string formatted = time.ToString("HH':'mm':'ss");
---
single minded; short sighted; long gone;
|
|
|
|
|
hi,
I am having Form1 and Form2
Form 1 is maximized and From2 is Normal..
Now what I want is Form2 to be inside the Form1 always its boundary limit should be Form1 size..
I should no tin the position take out the Form2 from Form1 if i minimize Form1 the Form2 should be inside the Form1..
Help Me Pls
With Regards
Prasad
|
|
|
|
|
Hello everyone,
I want to know how ti bind data to data grid in c#.net 2005 through coding..
|
|
|
|
|
nivipandit wrote: Expecting the answer
That is a bit presumptious. This is a forum where the help comes from volunteers. No one is paid to answer questions here. If you expect an answer then you should look into paid for support.
Here your question will be answered if you provide good details to solve your problem and evidence that you have at least made an attempt yourself.
|
|
|
|
|
good morning everyone . iam a student learning c#
can any one suggest me a good book to learn c#.Please specify books which are available in India
(M.BALA SUBRAMANYAM)
|
|
|
|
|
u can go for c# professional by wrox publication.
rahul
|
|
|
|
|
C# and the .NET platform by Andrew Troelsen
Cheers,
Vikram.
The cold will freeze our stares
We won't care...
|
|
|
|
|
Hi
You can search and download from www.4shared.com.
Harini
|
|
|
|
|
hi,
I am creating a editor in RichtextBox and i have implemented a Find functionality.
But Find form is not a MDI child..
now if i minimize the MainForm only main form is minimizing..I want both should minimize..
Reference:like If we open a notepad and edit something and go to Edit and click on Find..
and minimize the notepad without closing the Find form..
Even findForm is getting minimized in notepad..
How can I implement this feature..
Help me pls
With Regards
Prasad
|
|
|
|
|
i have one solution for you! i don't know if it is the best solution but this is my solution:
private Form2 f;
private void button4_Click(object sender, EventArgs e)
{
f = new Form2();
f.Show();
}
private void Form1_Resize(object sender, EventArgs e)
{
if (f != null)
{
if (this.WindowState == FormWindowState.Minimized)
f.WindowState = FormWindowState.Minimized;
else
f.WindowState = FormWindowState.Normal;
}
}
|
|
|
|
|
hi,
Thank you friend
it is minimizing but the problem is it is coming out of the main form..
I wrote code like Form2.ShowIntaskBar=false;
now it is not showing..
|
|
|
|
|
Actually my need is like this
I am having Form1 and Form2
Form 1 is maximized and From2 is Normal..
Now what I want is Form2 to be inside the Form1 always its boundary limit should be Form1 size..
I should no tin the position take out the Form2 from Form1 if i minimize Form1 the Form2 should be inside the Form1..
Help Me Pls
With Regards
Prasad
|
|
|
|
|
Hi
Just do:
<br />
searchForm s = new searchForm();<br />
s.Owner = this;<br />
s.Show();<br />
now you can minimize the mainform or do whatever you want and the searchForm will do exactly what you want
greets
M@u
|
|
|
|
|
hi,
Thank you sir,
It is working..
Thanks a lot..
With regards
prasad
|
|
|
|
|
Good morning!
iam a student learning c#. Can any one tell me what is a property and whats the difference between property and method
(M.BALA SUBRAMANYAM)
|
|
|
|
|
I think property is the characteristics of a class which acts as identity of class.where as methods are various ways which class provide to manipulate its properties to provide desired result.
rahul
|
|
|
|
|
Properties control access to fields within a class:
//Field
private int number = 0;
//Property
public int Number
{
get { return this.number; }
set { this.number = value; }
}
this allows you to control wether a field can be written to or read from and can perform processing if needed.
A method contains code:
private string SomeMethod(strin input)
{
string output = input + "123";
return output;
}
|
|
|
|
|
Hi All,
I am writing a C# application and have exposed COM interfaces. This is all working. My problem is that if I start the application from the command line and then use VB to do a createobject it seems to start another instance of the application. What I want is to get a handle to the already running instance. I have looked around for some time and have not found a solution to this.
Can someone please shed some light on this?
Thanks,
Loren
|
|
|
|
|
Do you have to start it from the command line? Why can't you use CreateObject and the new instance?
VB also has a GetObject function, but your COM object has to be in the Running Object Table, and I don't know what that implies for a C# application. You could also look at Enterprise Services, i.e. COM+.
|
|
|
|
|
I have an application(C#) that is running on a piece of hardware. I then have a remote user that needs to connect to this application and control it through a COM interface. I have exposed the necessary interfaces and registered it with regasm. My problem is that when the user tries to connect to it with createobject it creates another instance. If they try and use getobject it returns an error saying "runtime error 423. File name or class name not found..."
Loren
|
|
|
|
|
Loren, I'm afraid I don't have time right now to further investigate COM+, but if you can, what I would recommend is factoring the object required by your remote client into a separate library. Then both your C# application and the remote COM client consume the library through COM+, and there you should be able to limit the instancing of your object. I'll try and find out more, but I'm sure you can as well.
|
|
|
|