291 Posted Topics

Member Avatar for BobLewiston

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

Member Avatar for JerryShaw
0
112
Member Avatar for ddanbe

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; …

Member Avatar for ddanbe
0
124
Member Avatar for sid.coco

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.

Member Avatar for JerryShaw
0
121
Member Avatar for gouki2005

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 ?

Member Avatar for JerryShaw
0
93
Member Avatar for Sleeper24

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]

Member Avatar for Sleeper24
0
74
Member Avatar for wendas

<<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 …

Member Avatar for wendas
0
157
Member Avatar for Kloukip

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 …

Member Avatar for metalla_nz
0
99
Member Avatar for boris_rk

[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 …

Member Avatar for JerryShaw
0
75
Member Avatar for MJV

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]

Member Avatar for JerryShaw
0
119
Member Avatar for brianhickey

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.

Member Avatar for JerryShaw
0
98
Member Avatar for swinefish

string relPath = System.IO.Path.Combine(Application.StartupPath,"YourFile.xml");

Member Avatar for swinefish
0
85
Member Avatar for mansi sharma

string b = "mansi^^^^sharma";string b = "mansi^^^^sharma"; string[] splt = b.Split(new char[] { '^' ,'^','^','^'});

Member Avatar for JerryShaw
0
92
Member Avatar for whitey2006

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]

Member Avatar for JerryShaw
0
78
Member Avatar for MJV

> 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 = …

Member Avatar for JerryShaw
0
222
Member Avatar for rak4u
Member Avatar for MJV

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 …

Member Avatar for JerryShaw
0
146
Member Avatar for BobLewiston
Member Avatar for asafoatse

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 …

Member Avatar for asafoatse
0
123
Member Avatar for chris5126

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 …

Member Avatar for JerryShaw
0
194
Member Avatar for okarvian

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 …

Member Avatar for JerryShaw
0
120
Member Avatar for MJV

What types are blankl and blankw ? As integers, I do not get any errors, or the thrown error.

Member Avatar for sknake
0
290
Member Avatar for alaamido

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 …

Member Avatar for alaamido
0
90
Member Avatar for Syntax Error

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 …

Member Avatar for JerryShaw
0
123
Member Avatar for JackDurden

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 …

Member Avatar for JerryShaw
0
109
Member Avatar for samcaleb05

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 …

Member Avatar for sknake
0
101
Member Avatar for loveforfire33

[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]

Member Avatar for JerryShaw
0
93
Member Avatar for thegreatkk

[code] DataGridView dgv = new DataGridView(); dgv.CellValueChanged += new DataGridViewCellEventHandler(dgv_CellValueChanged); [/code]

Member Avatar for thegreatkk
0
170
Member Avatar for nuninio

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 …

Member Avatar for subtercosm
0
348
Member Avatar for jobi116

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 …

Member Avatar for JerryShaw
0
208
Member Avatar for sid78669

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 …

Member Avatar for JerryShaw
0
197
Member Avatar for MJV

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]

Member Avatar for ddanbe
0
134
Member Avatar for Chucksta

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 …

Member Avatar for Chucksta
0
123
Member Avatar for Digvijaysinh

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 …

Member Avatar for rapture
0
523
Member Avatar for BobLewiston

======= 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. …

Member Avatar for JerryShaw
0
153
Member Avatar for MJV

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 …

Member Avatar for JerryShaw
0
114
Member Avatar for rams111

What kind of DB ? Access, Oracle, SQL, MySql, ??? The easy way is to just issue the SQL comands from an SqlCommand component.

Member Avatar for nayak
0
282
Member Avatar for JackDurden

[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]

Member Avatar for JerryShaw
0
108
Member Avatar for thacravedawg

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 …

Member Avatar for JerryShaw
0
110
Member Avatar for JerryShaw

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 …

Member Avatar for JerryShaw
0
200
Member Avatar for knowledgelover

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 …

Member Avatar for knowledgelover
0
519
Member Avatar for knowledgelover
Member Avatar for mufliha

Make sure your catalog is set to the correct database. Currently it is set to master which is the primary system database.

Member Avatar for JerryShaw
0
100
Member Avatar for Sreedeep

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 …

Member Avatar for JerryShaw
0
565
Member Avatar for natpu

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 …

Member Avatar for natpu
0
97
Member Avatar for foxfire

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 …

Member Avatar for JerryShaw
0
469
Member Avatar for bharathi_n_r

[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 …

Member Avatar for Elmo_loves_you
0
284
Member Avatar for JerryShaw

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

0
61
Member Avatar for Gaurav arora

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 ?

Member Avatar for JerryShaw
0
111
Member Avatar for dlayante

string MyString = string.format("INSERT INTO tblUsers(userID, Name, Position) VALUES('{0}','{1}','{2}'", txId.Text, txtUser.Text, txtPosition.Text );

Member Avatar for JerryShaw
0
87
Member Avatar for dlayante
Member Avatar for JerryShaw
0
98

The End.