291 Posted Topics
Re: Bob, What are you referring to, there is no dgDetails class for that component. What are you trying to get to (DGV elements) and maybe I can help. // Jerry | |
Re: ddanbe, That line occurs because of the flat style being standard. During the click, the component base uses the drop effect which drops the top border into view. Avoid that in the onPaint (or elsewhere) so that it does not exhibit the drop on click effect. [code] base.FlatStyle = FlatStyle.Flat; … | |
Re: Another approach you may want to explore is the free version of Advanced Installer [url]http://www.advancedinstaller.com/[/url] I used the free version for a few months, and have since upgraded to the full Enterprise version. | |
Re: What are the possible "Bet Types" ? NumericUpDown works on numeric values. Is this bet type a enumeration ? or a real value (like an integer) ? IOW, what are you expecting to place in the NumericUpDown.Value property ? | |
Re: If you are looking to pull something from the clipboard, then use the Clipboard static class. Something like this (more methods are available) [code] if (Clipboard.ContainsText()) { string data = Clipboard.GetText(); } [/code] | |
Re: <<Does the strong Typed column field names HAVE to match the names in the DataAdaptor>> The matching column names of a typed datatable will get populated, and the others (non-matching) will not get populated. All column names must be unique, and they do not contain the alias prefix. You can … | |
Re: IMO you should use an XML file to store extra information. I don't particularly like the Settings way in dotnet simply because it has some ugly side effects. The settings data is stored in the Documents and Settings area, and if you move the application to a different directory, you … | |
Re: [QUOTE=boris_rk;836451]Hi! I need help with something that is IMHO a pretty simple matter: i need to make a program that uses wiindows forms in the way that there is one Main, Master form which holds all other forms in the aplication. For example, Master form has a toobar in which … | |
Re: dont cast those strings to char especially if is not a char[] array... hint just send the text of the components into the parameter assignment. [code] cmd.Parameters.AddWithValue("@customer", customercopyCB.Text); [/code] | |
Re: Why not just get the minimum date from the database instead of iterating through it in code. use the Min() aggregate to pull it out. | |
Re: string relPath = System.IO.Path.Combine(Application.StartupPath,"YourFile.xml"); | |
Re: string b = "mansi^^^^sharma";string b = "mansi^^^^sharma"; string[] splt = b.Split(new char[] { '^' ,'^','^','^'}); | |
Re: Images have to be stored somewhere, a DB, files or resource. I suggest only loading the images on demand for each question. If using resources then just set the picturebox image property to the resource. [code] //PictureBox pictbox.... pictbox.Image = Properties.Resources.MyPicture; [/code] | |
Re: > This is what i have tried. I get no errors but the database is not changing as per the stored procedure which does work when run within sql. private void approveestBN_Click(object sender, EventArgs e) { int @estno; int.TryParse(startestnoCB.Text,out estno); SqlCommand cmd = new SqlCommand(); cmd.CommandText = "EstimateApproval"; cmd.CommandType = … | |
Re: chkActive.Checked=(bool)dt.Rows[0]; | |
Re: MJV, Run it in debug mode, and see what the InnerException.Messge is telling you. (post it here if you do not understand it) The syntax of the code looks right. You can have many connections to SqlExpress if that is what you are using. I have applications with many threads … | |
Re: label1.[B]ForeColor[/B] = Color.Red; | |
Re: Hopefully this will make more sense to you. You declare a delegate method with no parameters. You want to assign two instances of this delegate and each will be assigned to a seperate method. Each method must have the same parameter list as the delegate (which you do have). Your … | |
Re: Take a look at FileSystemWatcher (a component in the tool box). It will detect when new files have been added to a directory. Otherwise, you can use something like this is a timed loop: [code] DirectoryInfo dirinfo = new DirectoryInfo("C:\\temp"); foreach (FileInfo fi in dirinfo.GetFiles("info_*")) { // do something with … | |
Re: Is the file your application encrypts an executable or something like a text file ? Your application could use a Trojan technique. You would need a separate small exe that knows how to request the password, inspect the cypher key, decrypt the (named) embedded file to disk and perhaps call … | |
Re: What types are blankl and blankw ? As integers, I do not get any errors, or the thrown error. | |
Re: The problem is simple, the solution a little more involved, but first you should understand that when the form repaints it goes through its list of componets and repaints them. The image you lay on the form is not a part of the form's collection therefore, when the component it … | |
Re: Are you sure you want to use the for loop with Count -1 ? [code] for(int i = 0;i< cartDataGridView.Rows.Count -1;i++) [/code] I think you want : [code] for(int i = 0; i < cartDataGridView.Rows.Count ; i++) [/code] If the grid only has the one order, you will not get … | |
Re: Passing parameters to a method requires the correct parameter list declaration in the Method construct. If you plan on passing a strictly typed list then for your example: [code] private void something(int[] a, int[] b, int c) [/code] If you do not know how many parameters you are going to … | |
Re: As Sknake answered in the other post, if you need the tiff OCR'd then you need a package. If you need to know the number of bytes, then just open the file in a FileStream (or a number of other classes), and check the length. If not OCR'd, then you … | |
Re: [code] DateTime dt; int year; int month; int day; if(DateTime.TryParse(textbox1.Text, out dt)) { month = dt.Month; year = dt.Year; day = dt.Day; // Do what you want with the breakout } [/code] | |
Re: [code] DataGridView dgv = new DataGridView(); dgv.CellValueChanged += new DataGridViewCellEventHandler(dgv_CellValueChanged); [/code] | |
Re: StringBuilder is (as you know) an array of char. So you can either loop through getting the first space to detect the word, and start looking for the return\line feed '\r\n' or just convert it to string. Here are a couple ways. If only one line is in the stringbuilder … | |
Re: Not knowing the layout of your application, I will make the assumption that you have the ListView on the main form. You have some other form or class that is called upon to do something and you want something to appear in the ListView of the main form. The problem … | |
Re: If you really don't need an SQL Server, then you can use XML. Let me explain, On many projects I use a locally saved DataSet for all kinds of purposes, storing configuration, multi-media, and even storing serialized classes. The DataSet class has an WriteXml method that will save the entire … | |
Re: For school work that is fine. For real world, you should use Int32.TryParse because you never know what will be in those text boxes. [code] int result_1; int result_2; if (Int32.TryParse(textBox1.Text, out result_1) && Int32.TryParse(textBox2.Text, out result_2)) { textBox3.Text = (result_1 * result_2).ToString(); } [/code] | |
Re: I am not familiar with Neverwinter Nights. However it appears you are delving into graphical programming. It is a very exciting field, and I suggest getting a book on the subject. By dove tailing that with your component building book, you should be able to build just about anything. There … | |
Re: Typically this question comes up when you don't want the user to leave a dialog form until all of the required text boxes are populated. If that is the case here, then do not enable the Ok button until the required textboxes are populated. To test when to enable the … | |
Re: ======= I discovered it wasn't set. Setting it to either HelloWinForm.Test or HelloWinForm.Program, the first two problems disappear, but not the third. I can't see how this code has more than one entry point, and I'm not at all clear on why the compiler requires these gyrations in Startup Object. … | |
Re: As LizR said, binding is the best approach, however you can manually locate the Customer in the table and populate the address text box. [code] string custName = combobox.Text; DataRow[] addressInfo = custData.Select(string.Format("Customer='{0}'",custName)); if(addressInfo.Length > 0) { edStreet.Text = (string)addressInfo[0]["Street"]; edCity.Text = (string)addressInfo[0]["City"]; // and so on... } [/code] Hope … | |
Re: What kind of DB ? Access, Oracle, SQL, MySql, ??? The easy way is to just issue the SQL comands from an SqlCommand component. | |
Re: [code] char[] space = new char[1] { ' ' }; Console.WriteLine("Enter in numbers"); int nAnswer; string[] answer = Console.ReadLine().Split(space ,StringSplitOptions.RemoveEmptyEntries); List<int> myArray = new List<int>(); foreach(string str in answer) if( Int32.TryParse(str,out nAnswer) ) myArray.Add(nAnswer); // Your answer can be pulled from the list using: int[] result = myArray.ToArray(); [/code] | |
Re: Okay, I will see if I can be of help. First, I am not a fan of Access databases, I am primarily an SQL guy, but the concepts are the same. Some definitions need to be explored. When you say "form" are you referring to a DataGridView on a WinForm … | |
I have an SQL2005 table loaded with ICON (image) BLOBs. I need to dynamically add ToolStripMenuItems to my Windows form including the same row Icon from the database table. This is a Plugin system where I pull the plugin file (assembly) names from the database according to the operator's rights … | |
Re: Here is an example. You can also tack on a p.WaitForExit(); if needed. [code] using System.Diagnostics; . . . Process p = new Process(); p.StartInfo.FileName = "IPCONFIG"; p.StartInfo.UseShellExecute = false; p.StartInfo.Arguments = "/all"; p.StartInfo.RedirectStandardOutput = true; p.Start(); textBox1.Text = p.StandardOutput.ReadToEnd(); [/code] // Jerry if this solves your issue, please remember … | |
Re: Make sure your catalog is set to the correct database. Currently it is set to master which is the primary system database. | |
Re: Okay - First I would suggest a change to the query Instead of [code] Select ItemNumber from ItemsTable where CatagoryId = (Select CatagoryId From CatagoryTable Where Catagoryname=@CatgName [/code] Make it: [code] Select i.ItemNumber from ItemsTable i JOIN CategoryTable c on i.CatagoryId=c.CatagoryId where c.CatagoryName = @CatgName [/code] To get the data … | |
Re: When dealing with threads, consider the timing involved. The Start() is an invocation and not a direct call to the target thread function. Therefore, (in your example), the Main has had no interupts to prevent it from completing before the thread function begins. If you were to cause the main … | |
Re: True, using INI files in dotNet applications is considered a security risk by Microsoft, and I no longer use them myself, but there is a need for them in Legacy replacements. I posted an ini class up on DaniWeb a long time ago. You should still be able to find … | |
Re: [B]Using a Stored Procedure with a Data Adapter[/B] In this example, I have a database named SoftwareInventory with a table named Software and a Stored procedure named proc_GetCadyData that takes one parameter named @CadyName (nvarchar(50)) Establish an SQL Connection Then create an SQLCommand. Set it to use the CommandType of … | |
I have an MDI application and I need the child form to know when it is docked in the MDI parent, or cascaded into its own form. Does anyone know if there an event or method of letting the child form determine this condition ? Thanks in advance | |
Re: Is ProjectData.EndApp(); really needed ? If e.cancel is left alone (not set to true), the program is going to close normally. Doesn't EndApp() force an application termination disregarding any event assigned to Form_Closed ? | |
Re: string MyString = string.format("INSERT INTO tblUsers(userID, Name, Position) VALUES('{0}','{1}','{2}'", txId.Text, txtUser.Text, txtPosition.Text ); | |
Re: You forgot to assign the SqlConnection to your adapter. |
The End.