Posts
 
Reputation
Joined
Last Seen
Ranked #127
Strength to Increase Rep
+11
Strength to Decrease Rep
-2
97% Quality Score
Upvotes Received
186
Posts with Upvotes
152
Upvoting Members
72
Downvotes Received
4
Posts with Downvotes
4
Downvoting Members
3
69 Commented Posts
5 Endorsements
Ranked #340
Ranked #112
~379.28K People Reached
About Me

I worked in Japan for Mitsubishi Electric as an applications engineer for 5 years. After returning to the UK I worked as a software engineer for Procon Engineering Ltd. writing custom end-user programs for weighing applications.My coding experience started…

Interests
Coding, Reading, Games.
Favorite Tags
Member Avatar for samaru
Member Avatar for sizzlefire
Member Avatar for Fernando_28
0
6K
Member Avatar for imso

I see that the timer event is [I]"Time2_Tick[B]_1[/B]"[/I] with a 1 at the end. This usually occurs when an event handler is created again for the same object. Is [I]Time2_Tick_1[/I] used for the original alarm time event? Note: Using [iCODE]if (DateTime.Now == value)[/iCODE] might not trigger as the times are …

Member Avatar for Konevlad21
-1
1K
Member Avatar for judithSampathwa
Member Avatar for judithSampathwa

The [I]BackColor [/I]of a form is set to [I]SystemColors.Control[/I]. This is also found in [I]SystemPens.Control[/I] and [I]SystemBrushes.Control[/I]. The actual color is dependant upon the windows color scheme or even the users theme. To put this color on to an image open the image as an [I]Image [/I]or [I]Bitmap [/I]then draw …

Member Avatar for Jill_3
0
406
Member Avatar for guiman

The Form1.resx file is used by visual studio to store resources for the form e.g. the background image. Add another resource file for your own resource. The easiest way to do this is to use the Resources tab on the Project properties.

Member Avatar for doxa.paradoxa
0
1K
Member Avatar for Doctor Inferno
Member Avatar for dilansankalpa

Try this [CODE] byte[] data = new byte[2]; data[0] = 0xFE; data[1] = 0xFF; short value = System.BitConverter.ToInt16(data, 0); [/CODE]

Member Avatar for RazaBukhariShah
0
6K
Member Avatar for edek

[QUOTE=antnotex;1632417]sorry for my english the problem is this: when you set the ComboBox.Text with the value wich is not in the collection ComboBox.SelecteValue is set to Nothing but BindinSource.Position holds last value, when you cancel the operation you set BindingSource.Position = "Previous Value" but BindingSource.Position is already set to "Previous …

Member Avatar for vukanac
0
3K
Member Avatar for AngelicOne

The [I]SelectedItem[/I] is not dependant upon the items checked state. In a [I]CheckedListBox [/I]the [I]SelectedItem [/I]is the one the being clicked. To test if it is checked or unchecked you must call the [I]GetItemChecked[/I] function with the [I]SelectedIndex[/I] property. This returns true if the item is checked, false otherwise. [CODE]if …

Member Avatar for 3004426279
0
5K
Member Avatar for Yzk
Member Avatar for Jwthais

Try these links. [URL="http://msdn.microsoft.com/en-us/library/ff649643.aspx"]MSDN - Model-View-Controller[/URL] [URL="http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller"]Wikipedia - Model-View-Controller[/URL] [URL="http://social.msdn.microsoft.com/Forums/en-US/modelingandtools/thread/eecc7b01-cee0-4c20-9086-b1c4cafa6709"]MSDN Architecture Forum - MVP and MVC patterns[/URL]

Member Avatar for Reverend Jim
0
101
Member Avatar for Duki

adatapost answered this for you already. [URL="http://www.daniweb.com/forums/thread290049.html"]http://www.daniweb.com/forums/thread290049.html[/URL]

Member Avatar for xydn
0
104
Member Avatar for Azurit

At first glance your code seems fine. (Except for the lack of error handling.) What errors are you getting? What is "IBGSDraw"? The cast should be of the same type as shapes. Which, from how you described you structures, I presume is List<IDraw>. Is IBGSDraw of type List<IDraw>?

Member Avatar for code78
0
258
Member Avatar for kendaop

The ErrorCode=-2147467259 = 0x80004005 means "Unspecified Error" - Not much help.:( "...at System.Drawing.Icon.Initialize(Int32 width, Int32 height) at System.Drawing.Icon..ctor(Type type, String resource) at Microsoft.Xna.Framework.WindowsGameWindow.[B]GetDefaultIcon[/B]()..." This bit of the error message would suggest that the problem is to do with the default Icon. :?: Have you configured a default Icon?

Member Avatar for Dennijr
0
411
Member Avatar for mujtabaaain

What do you intend to do during the scan? If you are looking for changes then you could use a *FileSystemWatcher* to do the "scanning" for you.

Member Avatar for skatamatic
0
354
Member Avatar for mahdi68

You need to keep the serial port at the form level, otherwise the port is closed and disposed at the end of the button1_Click method. You also need to capture the incoming data (usually an "OK" from a Modem.) The following (untested) code should help. [CODE]namespace Sending_SMS { public partial …

Member Avatar for bigboss013
0
2K
Member Avatar for ishtine18

The method you are using to play the sound is OK. The following code works fine for me. [CODE] byte[] result = System.IO.File.ReadAllBytes(@"C:\WINDOWS\Media\ding.wav"); System.IO.MemoryStream ms = new System.IO.MemoryStream(result); SoundPlayer sp = new SoundPlayer(ms); sp.Play(); [/CODE] Have you checked that there is data in [I]result[/I]? How are you putting the data …

Member Avatar for aniperiye
0
1K
Member Avatar for Bijaya123

When you open the second form also disable the menustrip button. Attach a method to the new form's [I]FormClosed[/I] event that enables the button. The sample below is for a toolstripbutton but the pattern is the same. [CODE] private void toolStripButton1_Click(object sender, EventArgs e) { toolStripButton1.Enabled = false; Form1 frm …

Member Avatar for kakaworld2012
0
1K
Member Avatar for harrispc

I would suggest that you use the [iCODE]SelectedRows[/iCODE] property. [CODE]Me.DataGridView1.SelectedRows = dataGridView1.Rows(0)[/CODE] But test that there is at least one row first.

Member Avatar for M.Waqas Aslam
0
1K
Member Avatar for tchiloh

If the data is stored in a dataset (filled using DataAdapter.Fill) then you can also use the DataAdapter.Update method to delete the removed records. This will also update any changed records and add any new records to the DB.

Member Avatar for sasanka panda
0
336
Member Avatar for berwick53

[QUOTE=Momerath;1642852]So you won't see any changes persisted to the database.[/QUOTE] Actually, if the database file in the project is marked as [I]"Copy if newer"[/I] then it will only overwrite the copy in the Debug folder if you make changes to the database structure. Also, the changes you make while running …

Member Avatar for thines01
0
132
Member Avatar for katarey

How are you getting the path to your[I] applicationSettings.data[/I] file? Is this a hard coded text path like this [iCODE]appdatapath = @".\Application Settings folder\applicationSettings.data";[/iCODE]? Or perhaps you use [I]Environment.CurrentDirectory[/I] as the base path? If so perhaps you should consider the following [URL="http://www.csharp-examples.net/get-application-directory/"]Get Application Directory [C#][/URL] and [URL="http://msdn.microsoft.com/en-us/library/ms229654(v=vs.90).aspx"]MSDN How to: Get …

Member Avatar for boyans
0
200
Member Avatar for Saidar

Some indication of what you have tried would be helpful. Is this a windows forms application or some other flavour of C#? It seems the DLL is written by you. Is this correct? What is calling the DLL and how? Is ComputeNN dependant upon the results of PrepareData?

Member Avatar for Saidar
0
230
Member Avatar for rexdon

Try changing the listbox item value instead of using Add and RemoveAt. e.g. [iCODE]listbox1.Items[sl-1] = percent.ToString();[/iCODE]

Member Avatar for nick.crane
0
306
Member Avatar for Acidburn

On the command line the "<" and ">" are used to redirect the input and output streams. You need to tell the process to do the same. This is not tested but will point you in the right direction. [CODE]private void mymethod(FileInfo file) { // set up ProcessStartInfo with redirected …

Member Avatar for nick.crane
0
2K
Member Avatar for morfious90

You all seem to have far too much spare time! I look forward to all solutions as they will undoubtedly demonstrate some new technique that I can admire (and copy;)).

Member Avatar for MORFIOUS
0
2K
Member Avatar for c#learner

You all have missed the key point in the original question. The fact that the OP is a [B]beginner[/B]! Here is a basic program that demonstrates the use of the [I]if else[/I] command. [CODE]static void Main(string[] args) { Console.Write("Enter a number: "); int iNum = 0; // read a value …

Member Avatar for nick.crane
0
99
Member Avatar for dennysimon

You can use the CellFormatting event to do this. The following code snippet colours cells in the third column if they have a value of "-1". [CODE] private void dataGridView1_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e) { var cell = dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex]; if (e.ColumnIndex == 2 && ((string)cell.Value) == "-1") { e.CellStyle.ForeColor = Color.Red; …

Member Avatar for dennysimon
0
134
Member Avatar for prit005

Line 57 is where the problem is. Here you are directly referencing only the first PictureBox with index of j=0. You need to convert [I]sender[/I] in to a picture box and use that instead. Try this. [CODE] if (System.IO.File.Exists(imgshow) && sender is PictureBox) ((PictureBox)sender).ImageLocation = imgshow; [/CODE] This adds a …

Member Avatar for nick.crane
0
731