536 Posted Topics
Re: Edit the image palete. Read/Edit the metadata. Red eye reduction. Allow multiple image formats and control the format specific options E.g. JPEG quality or GIF transparent colour. For other ideas have a look at this image viewer: [URL="http://www.irfanview.com/index.htm"]http://www.irfanview.com/index.htm[/URL] | |
Re: Try using a [iCODE]System.Windows.Forms.Timer[/iCODE] This is a timer for windows forms. Toggle a ShowGraphic boolean variable in the timer tick event. Then test the value of ShowGraphic in the form paint event. | |
Re: This is probably an issue with the international rules for decimal place being different. Extract from Standard Numeric Format Strings Help [QUOTE]The settings in the Regional and Language Options item in Control Panel influence the result string produced by a formatting operation. Those settings are used to initialize the NumberFormatInfo … | |
Re: Use this to get an array of [iCODE]FileInfo[/iCODE] objects and then sort the array on [iCODE]FileInfo.CreationTime[/iCODE] [CODE]System.IO.DirectoryInfo di = new System.IO.DirectoryInfo("C:\\jpegs"); System.IO.FileInfo[] files = di.GetFiles(); [/CODE] | |
Re: Is Content a form? If not, what control type is it? | |
Re: Have you look at [iCODE]System.Threading.Thread.CurrentPricipal.IsInRole(role)[/iCODE]? | |
Re: Have a look at [COLOR="Green"]Internet time servers[/COLOR]. These are used by Windows (and other OSs) to sync the PC clock. Looks quite complicated but also seems a bit like what you are trying to do. | |
Re: It is possible that you have a read or write action in the UI thread that is hanging because you have closed the serial port. I recommend that you set a flag before closing the port and pause for a short time to allow other threads to finish whatever they … | |
Re: Look at the [iCODE]System.Diagnostics.EventLog.GetEventLogs[/iCODE] method. | |
Re: What do you mean by [QUOTE]average the final number.[/QUOTE] | |
Re: You need to cast the [iCODE]Figuur[/iCODE] type object o to the actual class type of the parameter in your draw functions. E.G. [CODE]paintLijn((Lijn)o);[/CODE] This is why you are getting the invalid arguments error. I would also recommend passing the graphics object form the PaintEventArgs ([iCODE]e.Graphics[/iCODE]) in to your draw methods. … | |
Re: Simple solution [CODE]int testVal = 1234; byte[] data = System.BitConverter.GetBytes(testVal); byte[] data2 = new byte[3]; data2[0] = data[0]; data2[1] = data[1]; data2[2] = data[2];[/CODE] I am sure you have a reason for not wanting to do this though. How about this then. [CODE]int testVal = 1234; byte[] data = System.BitConverter.GetBytes(testVal); … | |
Re: [QUOTE=thuyson;1245467]i have a datagridview with last column is a checkbox.When user check on a row or rows, i will add columns' contents on that row into a new row in sql database. Please help me! Thank you so much![/QUOTE] What have you tried so far? | |
Re: The SAM file contains the user name and a hash of the password; not the actual password. This is a protected system file and not even an Administrator user has access while the computer is running. That said, there is stuff about this on the internet; just Google "SAM file". | |
Re: Any changes to UI objects must be done by the UI thread. You need to invoke the function call that changes the text. There are several examples of using delegates and invoking, just do a search and you should find something. If not, just ask. | |
Re: At line 19 you use [iCODE]Convert.ToString(datafrmf1a4);[/iCODE] and change the data to Unicode, so the data sent to the port is no longer what you want. Remove line 19 and try using [iCODE]comport.Write(datafrmf1a4,0,datafrmf1a4.Length);[/iCODE] (writing bytes not string). | |
Re: For the new text to show on your label you may need to invalidate the label and will need to give the ui time to refresh. | |
Re: [iCODE]Form1.ActiveForm.Controls[/iCODE] is a collection of all controls on the active form. These could be any control type - TextBox, Label, Panel, not just ComboBox. Try this.[CODE]foreach (Control a in Form1.ActiveForm.Controls) //<-- loop object is Control type. { if (a is ComboBox) //<-- test if loop object is a ComboBox { … | |
Re: I have not used ASP.Net but I do a lot with databases. Your select statement retrieves data from both tables. Try spliting in to two queries and put the returned data in to seperate DataLists. Edit: Sorry, this will not work. I just realised what you are trying to do. | |
Re: I tried your code and it seems to work fine. When stepped thru in debug it errored at line 64 [iCODE]Form.ActiveForm.Refresh();[/iCODE] as you said. This is because you use [COLOR="Green"]ActiveForm[/COLOR] and when viewing the code in the DevEnv there is no active form so [COLOR="Green"]ActiveForm[/COLOR] is [COLOR="Red"]null[/COLOR]. Try changing it … | |
Re: If the level of your user is up to it you could use also use Hexadecimal input. It is often easier to conceptualise the bit paterns in Hex. | |
Re: Define your common interface / API in a seperate dll and reference this in all processes. This seperates all libraries from the interface library and allows the task manager to still strongly reference all classes. Also, if you later update the task manager it will not break the processor dlls. | |
Re: Try this [CODE]protected override void OnLoad(EventArgs e) { base.OnLoad(e); this.Opacity = 0; } protected override void OnShown(EventArgs e) { base.OnShown(e); this.Visible = false; this.Opacity = 100; }[/CODE] Or this if you're not happy with overrides. [CODE]private void Form1_Load(object sender, EventArgs e) { this.Opacity = 0; } private void Form1_Shown(object sender, … | |
Re: Set the [iCODE]TransparencyKey[/iCODE] property and [iCODE]BackColor[/iCODE] property to the same color. Then draw your line on the form as normal. | |
Re: Best guest is that you are updating the row in the textbox TextChanged event and this causes the datagrid to refresh and loose its row selection. Post some code so we can see what you are doing when you select the row and what you do on the textbox TextChanged … | |
Re: Your SELECT statement only requests the word field. This code [iCODE]if (rdr[0] == (dateTimePicker1))[/iCODE] compares the returned word field value with a DataTimePicker object (not even its value). You need to review your code. I would also recommend changing the code that sets the parameter value to use the date … | |
Re: Use System.IO.Path to join two paths together. In your case the selected folder and the hardcoded filename. E.g. [CODE]string filename = Path.Combine(this.folderBrowserDialog1.SelectedPath, "test.txt"); ... sw = File.CreateText(filename); [/CODE] | |
Re: The form resx file is used by the form to store things like background image and form size, etc. Any change to the form will rebuild the form.resx file. To localize the form you need to create a separate set of resx files and when ever the form is loaded … | |
Re: You can get better control of how text is placed if you use the [iCODE]DrawString[/iCODE] that has [iCODE]StringFormat[/iCODE] as a parameter. | |
Re: One click to select the cell. Then one click to begin edit (if not on the arrow). Then one click to show the drop-down. If you click on the drop-down arrow then it takes two clicks. | |
| |
Re: SelectedRows is a collection. If you debug you will find that loc == "System.Windows.Forms.DataGridViewSelectedRowCollection" | |
Re: Posibly because you are comiting the changes and thus changing the CellDirty state. Test the datagrid [iCODE]IsCurrentCellDirty[/iCODE] before executing the commit. | |
Re: Hello again, [CODE]myCmd.ExecuteNonQuery(); //<-- this executes the query but you do not get any data back cn.Close(); if (myCmd == row["word"]) //<-- this is always false and probably generates a type mismatch at compile/run time { MessageBox.Show(row["word"] + " already exist in your personal dictionary"); }[/CODE] Try changing the command … | |
Re: The first thing you need to do is clearly define the interface for you plug-in. What functions will the plug-in have access to? What functions must the plug-in provide? This is then best 'set in stone' in an interface dll allowing your main app and the plug-in projects to reference … | |
Re: Yes, just add a reference to the project containing the DataSet. In the Add Reference dialog select the Projects tab and choose the project containing the DataSet. | |
Re: File is a static class in the System.IO namespace. It has static methods that are used to manage files. StreamWriter is also in the System.IO namespace. | |
Re: I have also found this happens on the hidden pages of a TabControl. The objects are still on the Form but are not properly placed on the Form surface. Use the dropdown at the top of the properties window to select each object and then move or resize the object. … | |
Re: If this is in the SQL query try using [] around the column name. | |
Re: When the use clicks on a cell in the DataGridView this causes several events to fire. [iCODE]CellClick[/iCODE] or [iCODE]SelectionChanged[/iCODE] are most likely what you need. | |
Re: If you have an answer why not post it so others can benefit. | |
Re: The problem is two VEarth instances. The Collision class has its own instance of VEarth. [CODE] class Collision { VEarth ve; //<-- VEarth used by Collision Player p1;[/CODE] The one initialised in Form1 is not the same instance. [CODE]public partial class Form1 : Form { Gps gps = new Gps(); … | |
Re: The first example is unboxed use of i; with a value type of int. The second example is boxing i (int) in to obj; a referece type of object. | |
Re: Look at DateTimePicker or MonthCalendar controls. | |
Re: Use the String.Trim method E.g. [CODE]string x = " test "; x.Trim(); //<- removes spaces from start and end System.Diagnostics.Debug.WriteLine(x); // x it now "test" [/CODE] | |
Re: When comparing times it is best to use <= or >= as it is unlikely that the current time will exactly match the time from your input file. If you are not happy using a seperate thread then using a [iCODE]System.Timers.Timer[/iCODE] is the only other way I can think of. … | |
Re: You can not programatically grant a user higher access rights than they have. For a basic user to have access to a folder during execution of your program they must already have access to the folder before the program starts. However, it is possible to write an Installer class that … | |
Re: Code in Resources.Designer.cs is automatically generated. Any code you put in there will be overwritten each time any change is made to the Resources file. You could try making Resources partial and put your function in a seperate file. This way only the partial key word is removed; you will … | |
Re: You can call a protected overridded method from the base class. See below: [CODE]public abstract class Foo { private int a; private float b; protected abstract void DoInit(); public void Init() { a = 1; b = 2.5f; this.DoInit(); } } public class Bar : Foo { public float c; … |
The End.