4,439 Posted Topics

Member Avatar for dima shawahneh

Perhaps [url=http://ubicomp.algoritmi.uminho.pt/local/concavehull.htmlis]this site[/url] something to consider.

Member Avatar for dima shawahneh
0
236
Member Avatar for ddanbe

Hi, Why do I only see appearing a red rectangle after 1 sec with the following code, and not a blue one and after a sec a red. Just used a new forms app with a panel control added and the following code: [CODE=c#]using System.Drawing; using System.Threading; using System.Windows.Forms; namespace …

Member Avatar for Diamonddrake
0
291
Member Avatar for lllllIllIlllI
Member Avatar for ddanbe
0
46
Member Avatar for ddanbe

Hello everyone! I know how to use a Timer class: [CODE=C#]static void Main(string[] args) { System.Timers.Timer MyTimer = new System.Timers.Timer(); MyTimer.Elapsed += new System.Timers.ElapsedEventHandler(MyTimer_Elapsed); MyTimer.Interval = 2000; MyTimer.Enabled = true; //etc. } static void MyTimer_Elapsed(object sender, System.Timers.ElapsedEventArgs e) { //do something every 2 seconds }[/CODE] What I like to do …

Member Avatar for ddanbe
0
2K
Member Avatar for DanyLdon

You must not use base.OnKeyPress(e); in your override. By doing so, you will first execute what is already programmed in the base class, which is a behaviour you don't want.

Member Avatar for DdoubleD
0
1K
Member Avatar for 3pid

Hi Serban, welcome here. Did you read the excellent explanation of Rashakil Fol to it's full extend? The handy syntax [B]public double X { get; set; }[/B] can only be used if you have version 3.x of C#. My guess is you use a lower version. If that is not …

Member Avatar for ddanbe
0
2K
Member Avatar for procopio

I'm not an native English speaker, but i have heard words like [B]sign in, sign on [/B]to enter something, or [B]sign off, sign out [/B]to leave. But I think these phrases are more used when a person has to sign a register, when entering a building.

Member Avatar for procopio
0
68
Member Avatar for RunTimeError

I have some understanding of static versus non static. But your code looks rather strange, to say the least:-O ??? Just as a starter, what is [B]mainprogram [/B] supposed to mean?

Member Avatar for DdoubleD
0
349
Member Avatar for bords

If you don't want to, you don't have to close the Form if you still need it. Start with 2 forms and toggle between them with the Show and Hide methods.

Member Avatar for ddanbe
0
110
Member Avatar for avirag
Member Avatar for Darth Vader

Like this: [CODE=C#]public System.Drawing.Color ColorSaved1; ColorSaved1 = TextBox1.BackColor;[/CODE]

Member Avatar for ddanbe
0
73
Member Avatar for kadamora

MessageBox is usefull, but no! You cannot put an image other than the ones provided into it. No problem: create a Form class to imitate the behaviour of the message box. Because it would be a class of your own design, you can do in it what you want;)

Member Avatar for RunTimeError
0
9K
Member Avatar for jonahmano

Hi Jonahmano! This can be done very easy. Instead of [B]WriteLine[/B], use [B]Write[/B]. WriteLine writes a string and put a extra carriage return character after, Write does not.

Member Avatar for sknake
-2
140
Member Avatar for Diamonddrake

maybe you could have a look at [url=http://www.codeproject.com/KB/cs/USB_HID.aspx]this site [/url]

Member Avatar for scorpion54
0
303
Member Avatar for doll parts

I think it has nothing to do with your programmings skills. For this method to work best yo have to have your initial guess, as close as possible to the real root, or the method may fail to converge. Readall about it in [url]http://en.wikipedia.org/wiki/Newton%27s_method[/url]

Member Avatar for huss_584
1
2K
Member Avatar for Jimmalmquist

Has probably to do with international settings. In some countries the , (a comma) is the decimal sign in others it is . (a point)

Member Avatar for ddanbe
0
181
Member Avatar for tryongliph

Use the List Count method to know how many items are in your list, not some hard coded number.

Member Avatar for Geekitygeek
0
195
Member Avatar for kyllle

This [url]http://www.functionx.com/csharp/index.htm[/url] is a starter. If you browse the net you can find many more.

Member Avatar for avirag
0
126
Member Avatar for KillerOfDN

The PropertyGrid only allows one object at the time. Perhaps you could implement the ContextMenuStrip of the PropertyGrid. By right clicking the PropertyGrid you could then select between different objects.

Member Avatar for Blorgle
0
342
Member Avatar for k4kasun

You must not hate something. Java is not my cup of tea also, but it is not SO bad I hate it. You could design a library of DB, file, graphical and other utilities, that might come in handy when you eventually start your professional career. With your academic degree, …

Member Avatar for Diamonddrake
0
236
Member Avatar for sahmed

Don't know much about FIX but [url=http://en.wikipedia.org/wiki/FIX_protocol]this[/url] should be a good starting point.

Member Avatar for sahmed
0
99
Member Avatar for ayeshawzd

Look up the series formula for the logarithm function and do the same as I showed you in the cosine thread.

Member Avatar for ddanbe
0
371
Member Avatar for umair125

The sign function returns 1 if the number is positive, 0 if it's zero and -1 if it is negative. You can implement that using the if statement.

Member Avatar for ddanbe
0
91
Member Avatar for vinnijain

This snippet [url]http://www.daniweb.com/code/snippet217265.html[/url] allows you to enter only one decimal point. It should be easy adaptable to what you want.

Member Avatar for vinnijain
0
3K
Member Avatar for yamid

Read file, when you read POROSITY read "/" Then read all following chars until "/" into a string array. Don't know with what chars your doubles are separated, but if you know, use the string.Split method to separate all doubles in an array.

Member Avatar for sknake
0
756
Member Avatar for avirag

This code works perfectly with me: [CODE=c#]namespace WindowsFormsApplication1 { public partial class Form1 : Form { public Form1() { InitializeComponent(); textBox1.AppendText("("); textBox1.AppendText("÷"); textBox1.AppendText(")"); textBox1.AppendText("÷"); } } }[/CODE] You don't have to use the Focus method, the textbox still has the focus.

Member Avatar for Geekitygeek
0
193
Member Avatar for sijothomas

If you are using Visual Studio C# Pro or Express, it is implemented automatically. You don't have to implement it yourself. Unless of course you did something with the MinimumSize or MaximumSize properties of the Form, or you set the MaximizeBox property to false.

Member Avatar for vinnijain
0
97
Member Avatar for shilpa88
Member Avatar for Diamonddrake

I have [url=http://www.andzelika.co.uk/TCPsockets.pdf]this book[/url] at home maybe it helps.

Member Avatar for sknake
0
4K
Member Avatar for Daiosmith

You are calling [B]new Random() [/B]so close after each other you will get the same random sequence every time. Try to use it once and than call the[B] Next() [/B]method. Or better still follow the advice of sknake!

Member Avatar for Rashakil Fol
0
297
Member Avatar for pavan146

Don't know exactly what you mean with base classes. C# has no functions, it has methods and properties. Example: in C/C++ you can use the function [B]strlen[/B]. You feed it [B]MyStr [/B]and it will return you the length of [B]MyStr[/B]. In C# you simply say [B]MyStr.Length[/B] Length being a property …

Member Avatar for ddanbe
-1
123
Member Avatar for avirag

Perhaps I don't understand you very well, but the spacebar, albeit a bit greater than the other keys, is a key like any other key.

Member Avatar for avirag
0
907
Member Avatar for 666kennedy

Scott, I wonder how you do it, to come up every time with these little crystal clear snippet gems! :)

Member Avatar for DdoubleD
0
141
Member Avatar for The Dude

Is it possible to add a sort of readonly "newsflash" item to the community center? To communicate and explain new features, make anouncements etc.

Member Avatar for The Dude
-3
110
Member Avatar for VidyaYadav
Member Avatar for Geekitygeek
-1
2K
Member Avatar for ShailaMohite

Every FlowLayoutPanel has a Controls collection, us it like this: [CODE=c#]if(panel1.Controls.Contains(MyPict)) { panel1.Controls.Remove(MyPict); }[/CODE]

Member Avatar for Geekitygeek
0
6K
Member Avatar for procomp65

Use [B]if-else [/B]if or [B]switch- case [/B]constructs to check for the right chars. This also seems something that can perfectly be handled by a Regex.

Member Avatar for Geekitygeek
0
2K
Member Avatar for ddanbe

Start a new Forms application. Drop a Panel and a Timer control on it. Set up a Timer_Tick, Form_Load and a Panel_Paint eventhandler and fill in the code. Run the app and watch the string rotate.

Member Avatar for Diamonddrake
2
1K
Member Avatar for eeyc

>>for example if you are mark I'm not an English speaking person myself, so I have great problems in understanding what you mean by the word [B]mark[/B] :icon_eek:

Member Avatar for Diamonddrake
-1
128
Member Avatar for wil0022
Member Avatar for DdoubleD
Member Avatar for codecodile

What do you mean with window? A window from another application or a forms window in your application?

Member Avatar for codecodile
-1
80
Member Avatar for RunTimeError

I often have the same experience. I have a question, but when formulating it, I find the answer!

Member Avatar for ddanbe
-1
467
Member Avatar for avirag

If you are using Visual Studio you can edit the tab order of the controls. The TextBox with the lowest tab order will recieve the focus. Select tab order editing in the View menu.

Member Avatar for avirag
0
176
Member Avatar for Freaky_Chris
Member Avatar for Geekitygeek

When you open a window, eg. Documents you mostly see a bunch of icons you can select. You can drag a selection rectangle over some files. You can select more files by holding down the ctrl button and drag another selection rectangle etc. This way you can select file icons …

Member Avatar for sknake
0
119
Member Avatar for Anupama G

Use [CODE=C#]for (int i = 0; i < n; i++) { dataGridview.Rows.Add(); }[/CODE] to add n rows to your DataGridView

Member Avatar for Anupama G
0
272
Member Avatar for vmanes

Ben E. King wrote the original, John Lennon made beautifull cover of it. vmanes this is... well I am speechless... All the world together, I weeped...

Member Avatar for johnvitc
0
121
Member Avatar for Darth Vader

Never did this but you could declare a List of List : [B]List<List<string>> dim2 = new List<List<string>>();[/B]

Member Avatar for Antenka
0
174
Member Avatar for Geekitygeek

You can use enum but perhaps in this way: [CODE=c#]public enum Output { _0 = 1, _1 = 2, _2 = 4, _3 = 8, _4 = 16, _5 = 32, .... }[/CODE] This way you can set port 1 and 2 on like this ; SetIt = _1 + …

Member Avatar for Geekitygeek
0
194

The End.