|
Specify a date format.
dateToPut=DateTime.ParseExact(tbDateToPut.Text, "dd/MM/yy", CultureInfo.GetCultureInfo("he-IL"));
Why don't you use 4-digit years?
--------
"I say no to drugs, but they don't listen."
- Marilyn Manson
|
|
|
|
|
I want to create a calander tool which will allow user to create a message on a date when you click it on calander and when the day appears, I want it to play a alarm and display message in a Message box with OK button on it.
I also would like a USer.ini config to be generated to save the information so its not lost when the application is exited. Finally I want the user to be able to set the application to it loads up when windows starts. How would you do this?
In the end we're all just the same
|
|
|
|
|
How do i create TabStrip Control dynamically? without using IE Webcontrols. does any one know pls. reply to this.
|
|
|
|
|
I am currently designing a Application in C#.net 2003 that will have a lot of features in it. It looks a bit like the desktop of Windows Blackcomb and it has many features of a mini- operating system.How would I:
1) How would you get a button to link to the Recycle bin? or My computer?
2) on the information part, I have written a properties tab. I have three text boxes. I want the first one: txtBx1 to show the amount of RAM that the application is using while running and TxtBx2 to show the amount of Free RAM and TxtBx3 to show how much Space the Application takes up on disk and the Location of where the application is stored like:
Finally I made a way to change the background on Main Screen (Like wallpaper on desktop)and I made a Calander which has settings to save imoprtant day notes. How would I generate a .ini config file so when the application is closed, you don't loose the settings?
Cheers if you can help me.
In the end we're all just the same
-- modified at 5:45 Tuesday 31st January, 2006
|
|
|
|
|
Dave McCool wrote: 1) How would you get a button to link to the Recycle bin? or My computer?
Not sure about the Recycle Bin - there is probably an API for it. You can access many of the special folders with System.Environment.GetFolderPath()[^]
Dave McCool wrote: txtBx1
You might consider a more robust naming convention otherwise it will become a nightmare to maintain.
Dave McCool wrote: How would I generate a .ini config file so when the application is closed, you don't loose the settings?
.ini files? How very Windows 3.1 - You might better consider an XML file, for which there is plenty of documentation.
ColinMackay.net
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
|
|
|
|
|
Hi ,
I am using Byte array which I want to Convert to a string
I think that I can't use the GetString function , since the array holds zeros in it
Is there any other function I can use ?
Thanks
|
|
|
|
|
Take a look at the BitConverter class.
|
|
|
|
|
Is the byte array based on Unicode/ASCII characters, or is it just an array that you want to store as text?
If you just want to convert the byte array into a storable string (and then convert it back afterwards), try Convert.ToBase64String() to change them into a string, and Convert.FromBase64String() to change them back. The MSDN article for the former is here[^]
If the array is based on characters in text, then you can use the System.Text.Encoding.Unicode.GetString() method (or ASCII if you replace the relevant word).
Hope that helps.
Cheers,
Will H
-- modified at 7:23 Tuesday 31st January, 2006
|
|
|
|
|
Hi All
I want to creat a control which displays time in "hr:min AM/PM". If I click on the value the mouse control will go to "hr", "min" or "AM/PM" respectively. I want to add updown control to change the value of "hr", "min" and "AM/PM".
Can anyone suggest me how can I do it? Thanks in advance.
|
|
|
|
|
You should use a label or (if the user can enter the time via keyboard) a textbox for every part of the time: hr, min, am/pm
When you got a click you should remember what have been clicked. If the Up/Down Control is clicked you should read the value of the element, change it and then write it back like:
if (element == "hour") {
int hours = Convert.ToInt32(txtHour.Text);
hours++;
if (hours > 12) {
- to be done -
}
txtHour.Text = hours.ToString();
}
...
Greetings,
Ingo
|
|
|
|
|
hi,
I have developed the email sending application using SMTPMail class(.NET). My machine setup is like that I m working on the lan network. In our company we use MS Exchnage server. So can how can i send an email thru my spplication.
|
|
|
|
|
You should give us a little more points. When I read your question, I would say: "Press the send button!"
What does the application? Is an error thrown? Do you get contact to the server? Have you implemented the sending of the eMail?
Greetings,
Ingo
|
|
|
|
|
Ok here's the error
I am making a chat client. The user has to open a new windows for each client he wants to talk to. So if he clicks the button
if(TO[TOS[this.listBox1.SelectedIndex]].Visible)<br />
{<br />
TO[TOS[this.listBox1.SelectedIndex]].Focus();<br />
}<br />
else<br />
{<br />
TO[TOS[this.listBox1.SelectedIndex]].Show();<br />
}
I use that and it works. But I also want the program to open a window when it receives data from a client who's window is not opened(just like Yahoo Messenger).
if(TO[num].Visible)<br />
{<br />
TO[num].Receive(Got.Split(":".ToCharArray(),2)[1]);<br />
}<br />
else<br />
{ <br />
TO[num].Show();<br />
TO[num].Receive(Got.Split(":".ToCharArray(),2)[1]);<br />
}
And then i get something like the left-over of a window and the program exits, without pointing out an exceptio at least. Please help.
-- modified at 2:57 Tuesday 31st January, 2006
|
|
|
|
|
Did you put a breakpoint and step through the part where it gives you problems?
If you can find out which line breaks your code, it might be easier to fix it.
Cheers,
Vikram. "When I read in books about a "base class", I figured this was the class that was at the bottom of the inheritence tree. It's the "base", right? Like the base of a pyramid." - Marc Clifton.
i dont mind to be
a stupid,better than being a moron - Adnan Siddiqi.
|
|
|
|
|
Really, I'll try, altough until now I haven't used this method
|
|
|
|
|
Ok, It managed to jam the debugger. I am speechless
|
|
|
|
|
nc3b wrote: It managed to jam the debugger
What do you mean by that? How did it "jam" the debugger?
ColinMackay.net
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
|
|
|
|
|
Simple. I caused it to crash
|
|
|
|
|
How can you expect help when you make vague statements like this. What were the manifestations of the crash? By "jam" it suggests that maybe it hung. You also mentioned you were unused to setting breakpoints. Perhaps you mistook the breakpoint hitting for a hanging application, because that is essentially what it does.
ColinMackay.net
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
|
|
|
|
|
In deed I am unused with breakpoints, but I got that nice old error message, asking me if I want to send the error to microsoft..
|
|
|
|
|
Fair enough - but, if you'd said that to start with then we wouldn't have needed this exchange to determine that.
ColinMackay.net
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
|
|
|
|
|
Hi!
First I would use a 'try-catch' just like:
try {
-your code-
} catch (Exception expt) {
System.Windows.Forms.MessageBox.Show(expt.ToString());
} // try-catch
The Next Point is that inline-code is easy to programm but hard to debug, so it's no good style to do everytrhing in a single line. So split your code:
string[] strArrayGot = Got.Split(":".ToCharArray(),2);
TO[num].Receive(strArrayGot[1]);
The next thing you have todo is watch your debugger. Then you can find out where the program exists.
I just talk about your variable names. But its hard to read. What the hell is TO and what about TOS? And listBox1 isn't a good name, too. What is handled there? The Number '1'?
Ok, you can programm that way, but it's hard to read and hard to find errors, so you should try to code a little bit more readable.
Hope I didn't dumbfounded you, was just an idea.
Greetings,
Ingo
-- modified at 4:47 Tuesday 31st January, 2006
|
|
|
|
|
Ok, there's no secret about it. TO is an array of forms, TOS is an array of integers. So when I try to open a new form, first i must know which form to try to open. It's part of a dumb mechanism. My problem is with num. I am SURE I am not trying to open the wrong form, but I want to ask you, could the rest of the function that calls TO[num].Show() be the problem? And by the way, my program is full of try-catch but you see, this error doesn't throw any exception, it displays a part of the form it should display and it stops working. Then I get that nice message about sending the report and I wonder if microsoft's coders want to help me solve the problem...
|
|
|
|
|
Ok sounds good.
So TO[num] is available and not null?! the string you give to receive(...) is ok?
Then I see the problem, if you thought to check this. The programm should work, but it doesn't. I got a similar error a few weeks ago.
The application crushed while calling a method of an object which was definitivly ok. The solution - sound strange - was to build the project new. I started with an empty projectmap, added empty projects, copied the forms and classes in the directory added each class and compiled again. After that the programm runned whithout any mistake (did I mentioned that I hate .Net? ) !
Greetings,
Ingo
|
|
|
|
|
The solution to the problem remains illusive... please if anyone can help me... I wonder if the problem is that I am calling TO[num].Show() from
public void OnReceive(IAsyncResult ar) , now is have to go...
|
|
|
|