- Strength to Increase Rep
- +7
- Strength to Decrease Rep
- -1
- Upvotes Received
- 6
- Posts with Upvotes
- 6
- Upvoting Members
- 4
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
Software Developer
- Interests
- Travelling, Photography
50 Posted Topics
Re: Well in any database driven application, i think any changes to the database will cause a lot of trouble in the working of the application. Esp if you are playing around with columns of tables. While adding/removing columns, you will have to make appropriate changes in the queries/stored procedures as … | |
Hi, Im trying to include the feature of automatically generating a word document through C# using a pre-defined template. Im able to insert 'mailmerge' fields in the word template documents at specific locations, and accessing these through the code in C#. I can update the values of these fields, no … | |
I'm facing this strange problem while working with DataGridView. In my application that i'm building, there is a form with some tabs, and im using the dataGridView Controls in some of the tabs. These dataGridView controls have already been configured, with a number of columns already added, and has been … | |
Re: Try this: [CODE] crystalReportViewer1.LogOnInfo[0].ConnectionInfo.IntegratedSecurity = true; [/CODE] Insert this line after you've set the ReportSource property. | |
Re: Find out more about the gateway you are registered with. I've done something similar using the Clickatell Gateway. Any of the popular gateway would have a 'Developers' section on their website where you can find information about different types of technologies/ways you can use for using their gateway and create … | |
I'm trying to find a way where the database name and the server name can be dynamic. I'm developing an application which uses C# and crystal reports. Both application and the reports use the same database which is setup on a separate database server. This application now needs to be … | |
Re: Try the following: [code] Application objOutlook = new ApplicationClass(); NameSpace objNS = objOutlook.GetNamespace("MAPI"); MailItem objmail = (MailItem)objOutlook.CreateItem(OlItemType.olMailItem); objmail.To = "sample.email@domain.com; objmail.BCC = "bcc@domain.com"; objmail.CC = "cc@domain.com"; objmail.Subject = "Subject of the email goes here"; objmail.Body = "Body of the email goes here..."; [/code] You dont have to use all the … | |
So i have this SharePoint 2010 Publishing site collection and i can create subsites under it simply by going to Site Actions > Create New Sites. There's a button that says 'More Options' which gives me more options for the new subsite. I get extra options like 'Permissions' and 'Navigation … | |
Re: Are you using the correct version of the Interop Assemblies? | |
Im trying to customize the Contact Card that appears on the Office Communicator 2007. The default information about the pesron that appears on the Contact Card is not enough and would like to include some more information. I've downloaded the API and also looked into adding custom tabs using an … | |
Re: DELETE from [Staff] However id recommend using stored procedures. Much faster, safer and efficient! | |
Re: I had to do something similar about a week ago and did something very similar what Diamonddrake suggested. However this method looses all the formatting of the text that was on the doc file. Is there any way you can preserve that formatting when its copied to the RichTextBox? If … | |
Re: Hi, Well the database is updated instantly as soon as something is added/modified. I dont think there is any need to refresh it from the application end. However if you are using the 'Server Explorer' from Visual Studio, or SQL Management Tools, then u will need to refresh manually to … | |
Re: Did you mean DataGridView in C# windows based applications or GridView in ASP.NET ? | |
Re: You cannot edit this application coz the files you have are the binary files and not the source code. You need to get the Source Code first. If you think the source code is in VB or C#, you need to install Visual Studio, Visual Studio Express. I think you … | |
Re: Start with looking at Socket Programming. [URL="http://www.devarticles.com/c/a/C-Sharp/Network-Programming-in-C-sharp/"]http://www.devarticles.com/c/a/C-Sharp/Network-Programming-in-C-sharp/[/URL] [URL="http://www.csharphelp.com/archives/archive127.html"]http://www.csharphelp.com/archives/archive127.html[/URL] Try out some examples. The 2nd link has some code example. See how you go, if you're stuck then post questions here. | |
Re: Are you sure that the Username in Login1.Username is a string? convert it to string just to be safe. | |
Hi, Im trying to transfer some text from the richTextBox into an existing MS word template at a specific location. I am able to transfer text to any location i like, but i want to retain the formatting of the text from the richTextBox. Im trying to copy the text … | |
Re: What about Mail Merge field.. can you use that? | |
Re: Instead of comboBox1.SelectedIndex, try using comboBox1.SelectedItem | |
Re: I've done something like that in an application i built sometime ago. firstly, you dont need two seperate tables. Just have one table with the zip code, city, state etc and everything you need. You can create a button next to the text box and on the click event, just … | |
Re: You can probably use something like an ArrayList and keep storing each and every path traversed there. So if you wanna go back, the last path stored will be the last visited and so on. To check if you are at the root, you can check the number of "\" … | |
Re: Use: [code] description = description.Substring(0, 14); [/code] or.. under the console.WriteLine(), display description.SubString(0,14) instead of just description. :) | |
Re: [QUOTE=kahaj;988519]I'll post my code after my questions. 1. Near the very end, I have DisplayIntroMessage() called for the event that the user desires another order. Is this all that I need to do to restart the process? [/QUOTE] Yes that should restart the process. [QUOTE=kahaj;988519] 2. If that is all … | |
Re: simply use the 'Value Changed' event of the DateTimePicker control. [code] if (dateTimePicker1.Value > DateTime.Now.AddYears(5)) MessageBox.Show("Date should be within the next 5 years"); [/code] | |
Re: I tried the exact same thing, it seems to be working! | |
Re: You will need to use a ConnectionString and SqlCommand. Create a new connection string in the project properties, under Settings. Give it a name, type = string and Value something like this: server=YourServerName;database=DatabaseName; Integrated Security=SSPI; or server=YourServerName;database=DatabaseName; Username=username; Password=password; Once you have the connection string, include it in the class … | |
Re: Try this: [code] Microsoft.Office.Interop.Excel.Application exc = new Microsoft.Office.Interop.Excel.Application(); exc.Visible = true; _Workbook workbook; _Worksheet worksheet; Workbooks workbooks = exc.Workbooks; workbook = workbooks.Add(true); Sheets sheets = workbook.Worksheets; worksheet = (_Worksheet)sheets.get_Item(1); // start inserting your values here. Range range1 = worksheet.get_Range("A1", "A1"); string[] array1 = new string[1]; array1[0] = "Some text"; Object[] … | |
Re: Not sure how you could do that using the browsers you have installed (firefox/IE) but an alternative could be to use the 'WebBrowser' control in C#. Just make a form, and drag the WebBrowser control. Set the Dock property to Fill, and u can change the URL of this control … | |
Re: Well if you are opening form2 from form1, then it can be done quite easily. Simply create a public class level variable in form2: public string myStr; In form1, use this to open up form2: form1 f = new form1(); f.myStr = textbox1.text; f.show(); could'nt really understand the 2nd half … | |
Re: Use the 'Leave' Event Handler for the second textbox. Write in the code for whatever you want to display, in this event handler. | |
Re: try this: [code] int n = listBox1.SelectedItems.Count; string[] array = new string[n]; for (int i = 0; i < n; i++) { array[i] = listBox1.SelectedValue.ToString(); } [/code] | |
Re: have a read through this article: [URL="http://msdn.microsoft.com/en-us/library/dfty2w4e(VS.80).aspx"]http://msdn.microsoft.com/en-us/library/dfty2w4e(VS.80).aspx[/URL] | |
Re: Just use the following statement: BTNAPPLY.Enabled = true; inside the TextChange Event handler of the text box and the SelectedIndexChanged event of the combo box. for the TextChange Event handler: [code] if (textBox.Text == "your required text") BTNAPPLY.Enabled = true; [/code] for the SelectedIndexChanged Event Handler [code] if (cmbBox.SelectedItem == … | |
Re: It looks like a web service, its asking for an API Key when trying to access that link. Not sure though. Use try...catch, you might be able to find out which exact character is invalid which may lead to a clue. | |
Re: You need to look at 'Setup and Deployment' You will need to create a new project. Under 'Other Project Types' you will need to select 'Setup and Deployment'. Depending upon your requirements you can choose the type of 'Setup and deployment' you would like to use. I guess 'Setup Project' … | |
Re: Try this: [code] string formText = this.Text; string input = textBox1.Text; int flag = 0; if (input.Length < formText.Length) { for (int i = 0; i < input.Length; i++) { if (input[i] == formText[i]) flag = 1; else flag = 0; } if (flag == 1) { // The string … | |
Re: 1) Use the control 'ContextMenuStrip'. You can Easily add items to this controls. Once done, use the Right click event of the dataGridView control you have in your application, and display this contextMenuStrip at the current location of the mouse. 2)Use the KeyPress event handler for the textbox and type … | |
Re: Did'nt quite get your question 100%, but i guess you could use Static variables here. Just create a class called Shared or something. Create a static variable in this class. public static List<Components> comp_list = new List<Components>; Now this variable 'comp_list' can be accessed from anywhere using the following: 'Shared.comp_list' … | |
Re: To fetch all the occurrences, you can use a loop as well. Something like this: [code] ArrayList indx = new ArrayList(); for (int i=0;i<nums.Length;i++) { if (nums[i] == 14) indx.Add(i); } [/code] At the end of the loop, the ArrayList indx will hold all the indexes that hold the number … | |
Re: Use printDocument Control. Add the 'Print Document' and 'Print Dialog' control to the form. Then for the PrintPage event handler of the PrintDcoument control you can use something like this: [code] Font f = new Font("Arial",14,FontStyle.Regular); Brush b = Brushes.Black; for (int i = 0; i < dataGridView1.Rows.Count; i++) for … | |
Re: If you have an Anti-Virus software installed which is always upto date, then you may not receive that message. Another way to disable it would be by opening up Outlook, Goto 'Tools' menu and select 'Trust Center'. Select 'Programatic Access' and select the third option - 'Never warn me about … | |
Re: [code] if (input > 5) { do { }while(input >5); } else //do something else [/code] actually instead of this, you can simply use the while loop.. u dont need to nest do while inside if, unless i have not understood your question properly! [code] while(input > 5) { // … | |
Re: Check the code of HelpBox.cs. Im assuming that the name of the partial class inside that file may not be matching with the filename - HelpBox.cs. Maybe the name of the form was changed after it was initially created but the class name was not changed. | |
Re: A bit confused. Correct me if im wrong.. You have multiple tables on the page. example: TableA (3 rows 3 cols) TableB (4 rows 3 cols) TableC (3 rows 5 cols). . . etc.. All containing some numbers, and you want to sum up all the numbers in each table … | |
Re: You can use static variables. In your MyInputForm class, declare a variable as follows: public static String name; This variable can now be accessed from anywhere/any class within the application using the following: MyInputForm.name; The current value of the variable 'name' can be accessed using this. Hope this helps! | |
Re: Try clearing the DataTable as well before populating it. | |
Re: well first of all, you can return only one variable from any function. So 'return name, ref_no;' is wrong. I dont think you can change the return type of an event handler. An alternative can be to create global variables, and setting the values of those variables when the button … | |
Re: Post your code here so we can have a look in case there is something wrong with the code.. | |
Re: What are you storing in the 'Date' field in your table? The actual date or a number? |
The End.