1,302 Posted Topics
Re: Sorry! but is it in Windows application or web-based application? If you want to convert it to array of bytes so... [CODE=C#] System.Drawing.Image img; ....//any operation on img instance ....//any operation on img instance ....//any operation on img instance System.IO.FileStream fs = new System.IO.FileStream(imagePath, System.IO.FileMode.Open); img.Save(fs); byte[] imageAsBytes = new … | |
Re: Handle Keypressed event of the textbox [CODE=C#] private void textBox1_KeyPress(object sender, KeyPressEventArgs e) { char lastChar = e.KeyChar; //MessageBox.Show(((int)e.KeyChar).ToString()); if (e.KeyChar != 32 && e.KeyChar !=8) //allows space and backspace { if (char.IsControl(lastChar) || char.IsDigit(lastChar) || char.IsNumber(lastChar) || char.IsPunctuation(lastChar)) e.Handled = true; else if (lastChar < 1575)//the start of ascii … | |
Re: [CODE=c#] System.IO.File.Delete(FilePath); [/CODE] | |
Re: What's the edition you are using + did you install server tools or client tools? | |
Re: Can you replace [CODE=C#]Thread th = new Thread(DoWrok); th.Start(strList);[/CODE] by [CODE=C#] ThreadStart thrdStrt = new ThreadStart(methodName); //void method without parameters Thread th = new Thread(thrdStrt); th.Start(params...); [/CODE] Please debug your code to know where the problem is. | |
Re: [QUOTE=nick.crane;1232217]What type of database are you using?[/QUOTE] Thread name SQL in C# :) | |
I got yesterday a question how to get average date from list of dates, and here's my answer. | |
Re: Hope it helps [url]http://www.codeproject.com/KB/string/pdf2text.aspx[/url] | |
Re: First create shared folder on HCTADMINS and set read\write permission. Let's say we called the shared folder [b]Database Folder[/b] So, connection string be [code=C#] string strconnection = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\\HCTADMINS\Database Folder\c#.accdb"; [/code] | |
Re: What do you mean by Clear the table layout? to reset all controls value i.e all textboxs Text property = null or to set the visibility = false You can access all TableLayoutPanel controls by [iCODE]tableLayoutPanel1.Controls[/iCODE] | |
Re: What do you need exactly is to run windows defragment application or you defragment the hard yourself? | |
Re: I didn't completely figure it out but did you try this? [CODE=C#] comboBox1.SelectedIndex = comboBox1.FindString("UserName"); [/CODE] | |
Re: Use AddRange method instead [CODE=c#] ListBox2.Items.AddRange(ListBox1.Items); [/CODE] | |
Re: Can you please show us the exception? or try [iCODE]currentEntry.EndDateTime.Date.ToShortDateString();[/iCODE] | |
Re: [url]http://www.c-sharpcorner.com/UploadFile/mahesh/printfile06062007133250PM/printfile.aspx[/url] | |
Re: Let's start it over... [CODE=C#] string fileData = File.ReadAllText(@"file path"); checkedListBox1.Items.AddRange(fileData.Split(new string[] { "\r\n" }, StringSplitOptions.RemoveEmptyEntries)); [/CODE] | |
Re: please clarify or tell us the scenario... | |
Re: From program.cs [CODE=c#] /// <summary> /// The main entry point for the application. /// </summary> [STAThread] static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new Form1());//the name of the form :) } [/CODE] [iCODE]Application.Run(new Form1());[/iCODE] | |
Re: What's taxableIncome? please use code tags! To solve second error [CODE=c#] taxLBL.Text = Convert.ToDouble(taxLBL.Text).ToString(); [/CODE] | |
Re: use generics... [CODE=C#] List<string> personsData = new List<string>(); string personData = "name,phone,number,postcode"; personsData.Add(personData); //use System.IO.File class to store personsData content... [/CODE] | |
Re: Friend.. I can suggest another design [CODE=C#] class User { //user properties, methods on the user instance } [/CODE] [CODE=C#]class UserCollection : IList<User> { //users properties, methods on the users instance like add/remove... }[/CODE] | |
Re: Add two buttons btnAdd, btnDelete.. create event handler (onClick) for both [CODE=C#] private void btnAdd_Click(object sender, EventArgs e) { TreeNode selectedNode = treeView1.SelectedNode; selectedNode.Nodes.Add("New node"); //prompt it as textbox or by any way you see.. } private void btnDelete_Click(object sender, EventArgs e) { TreeNode selectedNode = treeView1.SelectedNode; if (selectedNode.Parent == … | |
Re: [url]http://bytes.com/topic/c-sharp/answers/722688-codedomprovider-createcompiler-obsolete-fix[/url] | |
Re: What the field datatype? plus can you show us how you pick it up? and save it in database? | |
Re: .mdt file? please clarify your question... | |
Re: To be aligned I'll illustrate what I got you mean you want to get distinct characters from string into array Ex. Input: RAMY MAHROUS Output: {R A M Y H O U S} correct? | |
How can I change windows 7 from enterprise to ultimate edition after installation? | |
Re: It's already exist. if you go to add\remove program you'll find it + if you install the application and RErun the install file it gives you an option to uninstall the application. All in all nothing called uninstall file. uninstall option by default in install project. | |
Re: Man.. come on it's easy by implementing IComparer [url]http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridview.sort.aspx[/url] | |
Re: Can you please try SQL authentication not Windows authentication, it may be problem of provisioning | |
Re: or SMS provider, which provides you with web service or so to call it to send SMS... | |
Re: Look you should have SMS provider, which provides you with web service or so to call it to send SMS... | |
Re: I also nominate Danny (ddanbe) and adatapost, please take this issue into your consideration. | |
Re: Debug, because I'm pretty sure it don't enter "if" block //no condition because DialogResult.No should be DialogResult.Cancel Please try it.. | |
Re: I didn't get you but of you need to just compare if the 2 arrays are equal or not convert them to strings and comapre, please clarify to suggest better solutions | |
Re: You can programatically edit it by iTextSharp [url]http://sourceforge.net/projects/itextsharp/[/url] | |
Re: You can't, simply when you add a column all rows before this adding have this column = null, so you can remove all rows and add a non-nullable column. | |
Re: Welcome Kelba to C#, Try to apply OOP concepts on c# applications then get involved with business applications, read more articles on MSDN, you will gain perfect experience May ALLAH with you, friend | |
Re: I think if you changed the DropDownStyle from DropDown to DropDownList* it may help you *: from ComboBox control properties window | |
Re: Try to solve people questions in Daniweb C# forum :) | |
Re: Excuse me I've another solution :) due to being fan of SMO I'll do it using it [code=C#] public void (string databaseName, string filePath) { try { Server localServer = new Server(); //local using windows athuentication Backup backupMgr = new Backup(); backupMgr.Devices.AddDevice(filePath, DeviceType.File); backupMgr.Database = databaseName; backupMgr.Action = BackupActionType.Database; backupMgr.SqlBackup(localServer); … | |
Re: In form properties you will find property called "Accept button" set it to the button you need to be pressed if user press "Enter" | |
Re: You're the one who should say the business requirments and ask specific questions.. anyway you may need e-commerce, Enterprise Services (COM+ as common), and Databases. | |
Re: Dear, if you've time to read I can send you a book about Data warehouse. About your questions Say we've business man who has super market with a lot of branches... The business man interested to know [B]net profit[/B] by year\region\product\sales persons Fact table: is th point of interest the … | |
Re: Give us more explanation. What the table you need to update its values by which table? | |
Re: It exists by default there, and you can change the icon displayed in Add\Remove programs |
The End.