698 Posted Topics

Member Avatar for crazyboy

have you tried the openFileDialog? It has the same view as the explorer window, with a dropdown to select views such as details/large icons etc.

Member Avatar for sanch01r
0
155
Member Avatar for mandangalo

The problem is the way you are handling the atomic number...it crashes because when you add an item it has its atomic number saved incorrectly: [CODE] if (m_theTable.ElementHasData(atomicNum - 1)) m_theTable.getElement(atomicNum).Print(); [/CODE] you are checking to see if 'atomicNum - 1' has data..then trying to print 'atomicNum'. A quick fix …

Member Avatar for ddanbe
0
221
Member Avatar for Geekitygeek

Hi, this is giving me a major headache and my boss wants the project wrapped up asap : / I have two views pulling data from several tables. The end result is this: CustomerTotals CustomerID numeric(18,0), ProductID numeric(18,0), Delivered numeric(5,0), Ordered numeric(5,0) SupplierTotals SupplierID numeric(18,0), ProductID numeric(18,0), Delivered numeric(5,0), Ordered …

Member Avatar for Geekitygeek
0
130
Member Avatar for LennieKuah

Rather than trying to iterate through the datagrid's rows, use the underlying datasource: [CODE] foreach (DataRow dr in ((DataTable)dataGrid1.DataSource).Rows) { if ((bool)dr[0]) { strFName = dr[1].ToString(); strLName = dr[2].ToString(); } } [/CODE]

Member Avatar for Geekitygeek
-1
308
Member Avatar for chathuD

It depends a great deal on the way the mobile's OS works, what access it grants to the camera etc. Considering the time frame youhave and what's riding on it, i'd steer clear of something that could hit a major issue and fall apart. Also, what if the camera is …

Member Avatar for Geekitygeek
0
249
Member Avatar for Benderbrau

[QUOTE=sknake;1041458]What are the values of the statement when you get the stack overflow message? Is this a recursion issue? Post the code for your entire class.[/QUOTE] The logic looks sound to me, how deep is the tree that you are checking? As sknake said, it looks likely to be a …

Member Avatar for Geekitygeek
1
596
Member Avatar for redbrad0

if you are using the DataGridView control then adatapost's code will work for you. However, you refered to a DataGrid; does this mean you are using the older DataGrid control or (like so many) did you drop the 'View'? :p If you are using a DataGrid then there is no …

Member Avatar for Geekitygeek
0
68
Member Avatar for tgsoon2002

[QUOTE=tgsoon2002;1046086]I have know programming for 5 years. but not get any process yet. I want to ask what you do when you get a project and meet some problem? normally we must get the idea, pseudocode, get the flow of program. now i get the flow of program, idea. but …

Member Avatar for Geekitygeek
0
93
Member Avatar for abhay1234

[QUOTE=avirag;1046101] and remember one thing u cant write the console code in visual studio, it wont work here..........QUOTE] It will if you select "Console Application" from the New Project screen :) try [URL="http://msdn.microsoft.com/en-us/library/ms438026.aspx"]this[/URL].

Member Avatar for abhay1234
0
130
Member Avatar for sidd.

ddanbe is refering to his reply in your other thread:[URL="http://www.daniweb.com/forums/post1044218.html#post1044218"]here[/URL]. Since you are posting them as seperate issues and ddanbe and diamonddrake have given you the code to read in the contents of the file i wont go over that. To split the string you can do something like: [CODE] …

Member Avatar for Geekitygeek
0
92
Member Avatar for blur_guava

a quick google search brought me to [URL="http://www.irritatedvowel.com/Programming/Standards.aspx"]this[/URL] and [URL="http://msdn.microsoft.com/en-us/library/xzf533w0(VS.71).aspx"]this[/URL]. Naming conventions are entirely down to personal preference, but by adhering to recognised standards, it makes your code easier for others to read and follow :)

Member Avatar for DdoubleD
0
149
Member Avatar for memory100

The qustion seems a little ambiguous, i would check a few points with your lecturer. Primarily, 'Function' is a very ambiguous term: - in plain English it means a role or purpose for an object. - in a proceedural coding paradigm a 'Function' is a named code block which returns …

Member Avatar for Geekitygeek
0
210
Member Avatar for CyberPirate1

An excellent explaination DdoubleD :) And a great attitude from CyberPirate1. So many people paste the code, see that it works and move on. Its great to see someone stop to say "great, it works...but why does it work?". That attitude will serve you well as a coder :) Oh, …

Member Avatar for Geekitygeek
0
150
Member Avatar for memory100

You have started on the right track. Just break down the question. Often it helps to map out the required operations in pseudocode. Just focus on what you need to read in, process and output at this stage, then worry about the syntax afterwards. Your question already tells you everything …

Member Avatar for Geekitygeek
0
144
Member Avatar for oluscoa

One of the key benefits of type casting is that you know how the compiler will treat your variables. In the classic example: [CODE] var x = 5 var y = "37" var z = x + y [/CODE] Some compilers would treat both variables as strings and concatenate them …

Member Avatar for kvprajapati
0
107
Member Avatar for VibhorG

You can check out [URL="http://msdn.microsoft.com/en-us/library/e2c9s1d7(VS.80).aspx"]this article[/URL] over at msdn. It outlines adding embedded resources to a project. Embedded resources are stored in a resource file rather than in their native format on the harddrive. They cannot be editted so this is only suitable for non-changing resources. Never used it myself …

Member Avatar for Diamonddrake
0
820
Member Avatar for SAINTJAB

Just a thought, but wouldnt it be better to have a seperate table for the additional fields in a zero-to-many relationship? Something like: TABLE OF ITEMS ItemID numeric, ItemDesc nvarchar(max) TABLE OF ATTRIBUTES AttributeID numeric, ItemID numeric, AttributeName nvarchar(max), AttributeType nvarchar(50), AttributeValue nvarchar(max) ItemID and AttributeID as seeded identity keys, …

Member Avatar for Geekitygeek
0
514
Member Avatar for crazyboy

[QUOTE=crazyboy;1042641]no i m not passing any illegal character ... and now its solved ...[/QUOTE] i dont think sknake was suggesting you were deliberately using illegal characters, what he asked you to do is a standard step in debugging an error like this; if a variable is throwing an exception, check …

Member Avatar for crazyboy
-2
138
Member Avatar for Moselekm

[QUOTE=adatapost;1042450]Add a handler for [b]KeyPress[/b] event by double clicking on event name [b]KeyPress[/b] at Properties windows and put the code inside the keypress handler suggested by Mr. DdoubleD.[/QUOTE] Almost word for word what i was about to type :p If you are new to C# then this is a concept …

Member Avatar for Geekitygeek
0
328
Member Avatar for Mitja Bonca

Your Application.Run should run your parent form. [iCODE]Application.Run(new Form1());[/iCODE] in your Form1 FormLoad event you create and show the login form. By showing it in the form load it will appear before the parent: [CODE] private void Form1_Load(object sender, EventArgs e) { FormLogin login = new FormLogin(); login.MdiParent = this; …

Member Avatar for Geekitygeek
0
2K
Member Avatar for venkates.99

what did you change other than variable names? One thing to watch out for with excel; if you have different data formats in a column it can cause problems. When reading in the data the majority datatype in each column is used. For example, if the first few rows of …

Member Avatar for Geekitygeek
0
1K
Member Avatar for kool.net

You could also look into [URL="http://msdn.microsoft.com/en-us/library/aa730869(VS.80).aspx"]settings[/URL] to store application data.

Member Avatar for milosz
0
1K
Member Avatar for bk_bhupendra

What values do you need to pass? Unless you right a custom event handler, the click event has a defined argument list. You can check which button was clicked inside the event handler by converting Sender back to a button: [CODE] Button btnClicked = (Button)sender; if(btnClicked.Name=="Button1") //do something [/CODE] Alternaively, …

Member Avatar for sknake
-2
126
Member Avatar for nick30266

[QUOTE=nick30266;1037616]can somebody help me with this program?? i have to program a matrix with n column and n row and it should be able to find a path moving like a horse in chess game(L) that touch every point of the matrix once. the program consist in enter the location …

Member Avatar for thines01
0
215
Member Avatar for Mitja Bonca

[QUOTE=Mitja Bonca;1038974]This is the same like I did in my 1st upper example. Correct is: [CODE]FileStream fs = new FileStream(System.IO.Path.GetTempPath() + @"\MyTempDir\" + "\\" + listBox1.SelectedValue, FileMode.Create);[/CODE] [/QUOTE] The code adatapost gave you wasn't the same as your original, or did you mean it gave the same result? You need …

Member Avatar for Mitja Bonca
0
159
Member Avatar for jchaturv

Hi, I had a similar issue on a project. I overcame it by handling the datagridview's CellValidating and CellValidated events. This event fires whenever a cell loses input focus, enabling content validation. You can use the validating event to check the data entered then update the data source in the …

Member Avatar for Geekitygeek
0
268
Member Avatar for scarpacci

[QUOTE=sknake;1038755][B]>>we are loading the db data and xml into datatables[/B] Just load them both in memory on your machine and compare them. [/QUOTE] Did i mis-read this or is there some ambiguity in the term 'datatable'? I took it to mean a datatable object in memory :p If they mean …

Member Avatar for Geekitygeek
0
137
Member Avatar for themigrant

Firstly, please use CODE tags when posting code, there is a sticky from Dani at the top of the forum pages with details on their use. Secondly, try changing your code to this: [CODE] public class ClientLibrary { private bool connectionStatus; private Socket oClientSocket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); private …

Member Avatar for Geekitygeek
0
155
Member Avatar for bk_bhupendra

Double clicking on a control will create the default event handler. To create handles for other events, got to the properties panel and change to the Events section (lightning bolt at top). Then double click on the area next to the required event and a basic event handler will be …

Member Avatar for Diamonddrake
0
3K
Member Avatar for CSG-SQU

[QUOTE=CSG-SQU;1037702]i already didi !! the problem is the same !![/QUOTE] Without seeing all of your code its hard to give a defintie aswer, but is the line [iCODE]mobileStore.Add(m1);[/iCODE] inside a method or is it at the class level? You may be missing a closing bracket or have this at the …

Member Avatar for RunTimeError
0
121
Member Avatar for glennpatton

> Hi, > > Sorry will try to use code tags (I tried last time!) it is just (code) at the start (icode) at the end. > It is a little large shall I just post the bits that are causing problems? > Glenn Code tags should be (CODE) and …

Member Avatar for glennpatton
0
191
Member Avatar for vinnijain

Hi, you have working code that takes the user input and displays it in Math format, is that correct? If so, could you post that code here and we can show you how to rework it :)

Member Avatar for Geekitygeek
2
555
Member Avatar for suhasinishinde

Ok, firstly you need to retrieve the lsit of button ID's and Descriptions from the database, check out the link Antenka gave you or google for one of the many many tutorials on c# database access. You said you want to use an array, i'm assuming that will be to …

Member Avatar for Geekitygeek
0
388
Member Avatar for xyz12

[QUOTE=xyz12;1035324]No this is not working........... Actually i have entered the string on runtime, and entered string can be anything.............. I want that when i run the program then in that case one dot(.) is automatically appear in the textbox, but that is hidden for others, and if anyone wants to …

Member Avatar for Geekitygeek
0
124
Member Avatar for Dum_

One way would be to limit the keys the user can press: [CODE] private void TextBox_KeyPress(object sender, KeyPressEventArgs e) { //only allow numbers and control keys if (!char.IsDigit(e.KeyChar) && !char.IsControl(e.KeyChar)) { e.Handled = true; } else if (char.IsControl(e.KeyChar)) { e.Handled = false; } else { //using this rather than TextBox.Text.Length …

Member Avatar for Geekitygeek
0
242
Member Avatar for bk_bhupendra

You are adding a MosueHover event to the form. Try: [CODE] this.simpleButton1.MouseHover += new System.EventHandler(this.simpleButton1_MouseHover); [/CODE] if you want to change the back colour when the mouse is over the button you would be better to look at MouseEnter and MouseLeave so that you can change the colour back when …

Member Avatar for Geekitygeek
0
178
Member Avatar for Geekitygeek

I've been making more of an effort lately to build better OO designs, creating classes for distinct collections of members etc. However, i've hit a bit of a wall in my project. The program is designed to control an automated watering system. The system is split into multiple bays which …

Member Avatar for Geekitygeek
0
173
Member Avatar for mcmillan0520

as ddoubled said, the code looks sound. If you are still having problems you can attach your project here or post the full code so we can check if something is being changed elsewhere :)

Member Avatar for DdoubleD
0
176
Member Avatar for avirag

[QUOTE=sknake;1030267][B]>>In the code that follows, you will find my changes easily, because it is practically the only code that has comments![/B] :( I am pretty bad about not commenting[/QUOTE] Likewise, my uni projects were always perfectly commented and beatifully designed...only problem was, i did ALL the commenting and drew up …

Member Avatar for abc16
0
244
Member Avatar for echo off

you can buy secure pen drives...they have the security built in and i've seen some that destroy data if an attempt is made to forcably bypass the security. Sometimes its better not to re-invent the wheel ;)

Member Avatar for Diamonddrake
-1
140
Member Avatar for Geekitygeek

I know how to handle multi-dimensional arrays, but whats the best way to represent them on a form?? Not sure how best to describe the problem : / Its an order form. Each row represents a product, each column represents the week we're ordering for. The problem is the order …

Member Avatar for Geekitygeek
0
197
Member Avatar for sumit21amig

[QUOTE=sumit21amig;1027344]How can i maintain operator's precedence order while overloading "+" and "*" in a class? e.g. I want same result on the calculation of following objects: d=a+b*c; d=c*a+b; Please help! Also tell me why simple constructor is able to call static data in a class?[/QUOTE] As ddanbe pointed out, multiplication …

Member Avatar for Geekitygeek
0
137
Member Avatar for zzbottom

Hi, You have a lot of code repeated in each 'if' statement, the only thing thats affectedby the initial choice is the base cost. Why not collect all the variables first then do a single calculation at the end: [CODE] class Program { static void Main(string[] args) { double roomPrice, …

Member Avatar for Geekitygeek
0
98
Member Avatar for lllllIllIlllI

I agree that Dani deserves kudos for trying new ideas and keeping the site fresh. However, my concern is that this voting system is uncomfortably similar to the eBay feedback system (among others) which i detest. Having worked for companies that trade on eBay i know first hand how frustrating …

Member Avatar for The Dude
2
861
Member Avatar for bludeath

This happens to me all the time, i post a problem then fix it myself...even if i've spent horus trying before posting. In fact, more than once i have solved the problem WHILST writing the post haha, somehow organising things in the post to make them understandable to readers, also …

Member Avatar for Geekitygeek
0
111
Member Avatar for beginerC#

[QUOTE=chandru7;1019202]copy means,you wants to pass the values from one page to another right,try session or hiddenfield.[/QUOTE] Those are both web concepts and wont help in a winforms environment. If you are creating an instance of the form2 when you click the button you can add the variables you want to …

Member Avatar for beginerC#
0
147
Member Avatar for pauloselhombre

[CODE] Console.Write("\n No, do you care about your baby?\n"); if (iQuickAnswer == 'y') // nested if in nested else [/CODE] You arent checking for the users input here. You need to include another [iCODE]iQuickAnswer = Console.Read();[/iCODE] to capture what they enter. Otherwise, it will use the same answer to the …

Member Avatar for pauloselhombre
0
133
Member Avatar for S2009

[QUOTE=Antenka;994273]Hello, S2009. Ok, now few words about ControlBox. I suppose it would be more understandable for user if you will show/hide ControlBox in some other place. E.g. make it hidden when loading form and show it while logging off. Also just a few thoughts in loud. I don't know if …

Member Avatar for Geekitygeek
0
197
Member Avatar for PyroPaul2

please use CODE tags to post code. It makes it a LOT easier to read through your code :)

Member Avatar for DdoubleD
-1
548
Member Avatar for wil0022

Is there a reason you have used a SingleLinkedList? I personally would have gone for something more strongly typed: [CODE] //private collection that you can add/update/remove private List<DictionaryEntry> _dictionary; //class to store each entry with public properties to access values public class DictionaryEntry { private string _word; private string _description; …

Member Avatar for wil0022
0
114

The End.