1,302 Posted Topics
Re: Here you are [code=c#] static void Main(string[] args) { Console.WriteLine(GetDifferenceDate(new DateTime(2008, 11, 25, 10, 30, 2), new DateTime(2008, 6, 2, 6, 3, 5))); } static string GetDifferenceDate(DateTime date1, DateTime date2) { if (DateTime.Compare(date1, date2) >= 0) { TimeSpan ts = date1.Subtract(date2); return string.Format("{0} days, {1} hours, {2} minutes, {3} seconds", … | |
Re: You can code your own UI elements, without playing with InitializeComponent method, this way called creating controls at run time. But give me why you don't need to use VS Designer ??!!! | |
Re: Sorry, seems I didn't understand you well, you need to get last two characters and increment their value (means if input string xxxxAB so the result should be xxxxBC)? if yes get last 2 characters get each of which increment thier ascii value by 1. that's my solution, if you … | |
Re: What's the question??? You may need to look at string class! | |
Re: You may have to save it in cookie. Better go to asp.net forum [url]http://www.daniweb.com/forums/forum18.html[/url] and show your question there. | |
Re: [code=c#] System.Net.Sockets.TcpClient t1 = new Client(); [/code] | |
Re: Stream works in C#, just convert your file to binary data and save it into column of datatype that's for SQL Server 2000/2005 but if you use SQL Server 2008 you don't need to convert it to Binary as there's datatype called FileStream. | |
Re: why you need to develop it yourself as it exists? just add reference to System.Windows.Forms and use it in your web-based application. | |
Re: Sure, you use Windows Vista?? Right click on this program and Run as administrator. | |
Re: mmmm, let my think with you, I like such an idea, don't worry they won't delete this thread. I'll work on and reply with some info if got. | |
Re: Better move your thread to ASP.NET forum [url]http://www.daniweb.com/forums/forum18.html[/url] | |
Re: Expression blend generate xaml for your controls so you can embed them to your application | |
Re: step towards AOP architecture, sometimes you need to run something before calling the method. like if you want to just print to specific user [code=c#] [CheckUserPermission(userName, password)] void print() { //your code } [/code] | |
Re: It works with me :) try that Console.Beep(37, 1000); | |
Re: You can use regular expression to validate user input, in your case your regular expression'd be ^\d{3}-\d{4}$ So, on your btn validate click event handler you can check if user enters valid phoen number or not [code=vb.net] if Regex.IsMatch(txtPhoneNumber.Text, textBox1.Text) then MessageBox.Show("Correct") else MessageBox.Show("Wrong") [/code] | |
Re: A modal dialog which requires user to set his/her username and password when s/he i.e press Login call method to connect to SQL Server verfiy using try...catch try->login successed, else login failed | |
Re: No, you may have XML file has links text and their URLs, and you should loop on the nodes and create LinkedLabel @ runtime. | |
Re: Your client can disable it. | |
Re: What's the error? Error messages or nothing appears?? | |
Re: [code=c#] if (textbox1.InvokeRequired) { //txtFilePath.Invoke(ur delegate ); } else { //call ur method } [/code] | |
Re: Dear knowledgelover, Right click on your setup wizard project->View->Custom actions->and you've 4 points you can run any *.exe at. Say, when installation is Committed we need to create file in C:\ drive. So, we'd create the * .exe which creates the file in that drive and let back to the … | |
Re: Dear knowledgelover, Right click on your setup wizard project->View->Custom actions->and you've 4 points you can run any *.exe at. Say, when installation is [B]Committed[/B] we need to copy files to C:\ drive. So, we'd create the * .exe which copies the files to that drive and let back to the … | |
Re: you can't return more than object with different data type but may use yield it may help you. | |
Re: Where's your question? read in ADO.NET; your questions are simple, look at some samples on MSDN and you'd answer yourself. | |
Re: what do you need exactly?? to know how to search, match or to write in file? | |
Re: That's too hard to debug your code, please send us the exact problem you face. | |
Re: Just install them!! Or you need to develop yours??!! | |
Re: Treat with array of strings, and insert into this array and when you need to reflect this changes use foreach (string s in urArrayOfStrings) { Write in your txt file} | |
Re: Split the text in the TextBox by '\n' search for each index in output array in the string and by refering to index you got the line number i.e You were my strength when I was weak You were my voice when I couldn't speak You were my eyes when … | |
Re: I've searched how can you detect your speed and I got this piece of code [code=c#] System.Net.WebClient wc = new System.Net.WebClient(); DateTime dt1 = DateTime.Now; byte[] data = wc.DownloadData("http://google.com"); DateTime dt2 = DateTime.Now; return (data.Length * 8) / (dt2 - dt1).TotalSeconds; [/code] | |
Re: I don't know but it may trim the string before executing DML statement, it sure better than doing such via SQL engine. Jusing guessing good question (Y) And it may have no effect | |
Re: [code=c#] Response.Cookies["QueryCookie"].Value = listbox.SelectedIndex.ToString(); [/code] Try using ASP.NET forum in ASP.NET questions. | |
| |
Re: You need to save all UI controls settings in .settings file (which is located on the server) and on FormLoad read these settings. so when client opens its form it first goes to read UI settings (the color of button, the size of form, etc) this would be a solution. | |
Re: Read in you Acer scanner documentation it'd help you more. | |
Re: From DropDownList properties assign its DataSource to your created datasource, then choose which column to be shown and which to be the value of the items. All from properties or the smart arrow which located on the top left of the DropDownList. | |
Re: I don'y know Ajax well, but what I heared that you can't use it without updatepanel. | |
Re: Yes, there is [code=c#] foreach (ToolStripMenuItem item in menuStrip1.Items) { item.Checked = false; } [/code] | |
Re: Try searching on some Windows APIs help you regarding this, there is a program called API viewer may help... | |
Re: It's proper to write this code in OnStart method. | |
Re: Let WS1 checks the status of WS2 and use switch\case [code=C#] ServiceController sc = new ServiceController("WS2"); switch(sc.Status) { case Status.Start: ...... } [/code] | |
| |
Re: Sorry what do you mean by inherit? to use user control in a form or to use abstract user control and another user controls share some layout?? | |
Re: ASP.NET forum [url]http://www.daniweb.com/forums/forum18.html[/url] or ASP forum [url]http://www.daniweb.com/forums/forum62.html[/url] is better than here. | |
The End.