698 Posted Topics

Member Avatar for daniel955

Every language has its own pro's and con's and I'd recommend you guys do some research into which best meets your requirements...it'll look good in your thesis for one and will help you choose correctly for another. If you have a limited time frame and a large project to code, …

Member Avatar for octavia
0
107
Member Avatar for manavsm
Member Avatar for AngelicOne

Check out the [URL="http://msdn.microsoft.com/en-us/library/ms723602(v=VS.85).aspx"]SpVoice object in the Speech API[/URL]. You could create a new message box class inheriting from the old one and adding a voice prompt to the Show() method using SpVoice.Speak().

Member Avatar for Geekitygeek
0
79
Member Avatar for Zinderin

You could move the array to its own class with an indexer then expose an instance of that class through your property: [CODE] public partial class Form1 : Form { public Form1() { InitializeComponent(); } //store instance of the class holding your array private Resource _resource = new Resource(); //expose …

Member Avatar for Geekitygeek
0
958
Member Avatar for Buizenamp

Could you post an example of the data sent and data received so we can see what is going back and forth? If we have a clearer idea of the whats being sent and received we may be able to offer a better solution.

Member Avatar for Buizenamp
0
342
Member Avatar for NH1

Try changing your parameter names from: [CODE] UpdateCommand.Parameters.Add("[Department]", OleDbType.Char).Value = textBox2.Text; UpdateCommand.Parameters.Add("[Description]", OleDbType.Char).Value = textBox1.Text; [/CODE] to [CODE] UpdateCommand.Parameters.Add("@Department", OleDbType.Char).Value = textBox2.Text; UpdateCommand.Parameters.Add("@Description", OleDbType.Char).Value = textBox1.Text; [/CODE] I dont think your supposed to use the field name as the parameter name

Member Avatar for Geekitygeek
0
107
Member Avatar for anuradha.d

OK, from the top: Firstly, please use [noparse][code][/noparse][i]your code here[/i][noparse][/code][/noparse] tags when posting code. It maintains the formatting to make it easier to read. Secondly, your for loop counter needs amending; if the Count of items in a collection is 5, then the index of the last item is 4. …

Member Avatar for Geekitygeek
0
843
Member Avatar for tookerello22

You can't; an event handler cannot return a value. An event can potentially invoke many methods in different objects, if the event handlers allowed return values, each could potentially return a different value so your event would have multiple return values. Where are you trying to "return" the arraylist to? …

Member Avatar for Geekitygeek
0
235
Member Avatar for Don_leon

Its a [URL="http://connect.microsoft.com/VisualStudio/feedback/details/433391/microsoft-visualstudio-datadesign-syncdesigner-syncfacade-syncmanager-error"]known issue[/URL]; an incompatibility between VS2008 RTM and SP1. The error is a result in an incomplete SP1 installation. Try reinstalling SP1 to see if it resolves it.

Member Avatar for Geekitygeek
0
137
Member Avatar for campbell.st04

Can you be more specific about what you are stuck with? ddanbe has given you the code for properties if you need advise on any of the other requirements let us know, but you need to make an attempt and we can help you trouble shoot specifics.

Member Avatar for Geekitygeek
0
147
Member Avatar for rjthomas8

The SelectCommand accepts an instance of the SqlConnection class, not just the query string. Try [iCODE]sqlDataAdapterSearch.SelectCommand = new SqlCommand("SELECT * FROM Customers WHERE (CustomerID LIKE'" + textBoxSearch.Text + "')"); [/iCODE] Although you may want to look at using [URL="http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlcommand.parameters.aspx"]parameters[/URL] to make your code easier to read/debug.

Member Avatar for Geekitygeek
0
1K
Member Avatar for AngelicOne

finito, i think you may have confused an index with a unique id...that or i'm misreading your explaination. An index is a transparent process that you can enable in sql server. When you create an index on a column of a table, the server will keep a record of each …

Member Avatar for Geekitygeek
0
179
Member Avatar for paeez

Just a note, you probably want to use myLife.TotalSeconds; Seconds returns the seconds portion of the timespan where as TotalSeconds returns the whole of the TimeSpan converted to seconds. For example, if the TimeSpan is equal to 3 minutes and 25 seconds then: Seconds == 25 TotalSeconds == (3 * …

Member Avatar for Geekitygeek
0
117
Member Avatar for Don_leon

if you want to pass information back and forth the easiest way is to pass a reference to the parent form into the child form. See [URL="http://www.daniweb.com/code/snippet298708.html"]my tutorial[/URL].

Member Avatar for Geekitygeek
0
93
Member Avatar for jackabascal

I would generally advise against using literal file paths (eg C:/Users/You/MyDocuments/etc) because you can't guarantee the file structure on every machien that runs your code. Either add the image as [URL="http://www.daniweb.com/code/snippet258293.html"]an embedded resource[/URL] and access it from there or add it to your project as content so that it is …

Member Avatar for Geekitygeek
0
187
Member Avatar for shazzy99

Was it really necessary to resurrect a thread over a year and a half old just to pitch a .net component?

Member Avatar for Geekitygeek
0
258
Member Avatar for kavisg1

[QUOTE=finito;1288205]I only see one Array which isn't even defined correctly. should be [CODE]int[,] average = new int[5,3] { { 87, 68, 94 }, { 100, 83, 78 }, { 85, 91, 76 }, { 65, 81, 66}, {65, 71, 56 }};[/CODE] [/QUOTE] Whilst I am a strong advocate of daniwebs …

Member Avatar for finito
0
1K
Member Avatar for Bijaya123
Member Avatar for Jazerix

Take a look at the [URL="http://www.daniweb.com/code/snippet299495.html"]tutorial[/URL] i wrote. It shows how to show/hide current form when opening a new one. The text portion also outlines how you can close the first form instead of showing it. When you open a new form it gets added to the Application.OpenForms collection which …

Member Avatar for Jazerix
0
7K
Member Avatar for Zinderin

I'm always dubious about using SendKeys...as Teme says, its not the most reliable method of control. Mine isnt a perfect solution either, but its a viable workaround (in my opinion). Since you can only expand the directory if it has SubDirectories, the code below checks for their existance. If there …

Member Avatar for ghimangi
0
6K
Member Avatar for judithSampathwa

[QUOTE=nick.crane;1281239]I checked this out and it is not as simple as I first thought. For some reason the index of [I]e.Row.Index[/I] is not the same value as the row entered after first edit is applied. You will need to capture [iCODE]e.Row.Index-1[/iCODE] in [I]UserAddedRow[/I]. Also, to enable the edit row you …

Member Avatar for nick.crane
0
674
Member Avatar for judithSampathwa

In line with what nick and babbu said, you can modify or overload your constructor. Either add a boolean parameter to the standard constructor or leave your standard constructor parameterless and add a second constructor whioch takes a boolean value: [CODE] public partial class frmSubCDetails : Form { public frmSubCDetails() …

Member Avatar for judithSampathwa
0
201
Member Avatar for AngelicOne

You are correct; reader.hasrows DOES check if the datareader has retrieved any rows, and if you had used "SELECT * FROM EnrollTbl" and the table was empty then reader.HasRows would have returned false. However, you used an aggregate function (MAX). These ALWAYS return a value. If there is no data …

Member Avatar for Geekitygeek
0
982
Member Avatar for Bijaya123

Another way to do it is to pass a reference to the First form into the Second so that the second form can access public memebers of the first. [URL="http://www.daniweb.com/code/snippet298708.html"]My tutorial[/URL] outlines how to acheive this.

Member Avatar for Geekitygeek
0
271
Member Avatar for sadhawan

You can use either a [URL="http://msdn.microsoft.com/en-us/library/0b0thckt(VS.71).aspx"]class[/URL] or [URL="http://msdn.microsoft.com/en-us/library/ah19swz4(VS.71).aspx"]struct[/URL]. The syntax is very similar; structs have a smaller footprint i believe, and are used where the data is immutable. Create your class/struct, add variables to store the different data values, then use [URL="http://msdn.microsoft.com/en-us/library/x9fsa0sw(VS.80).aspx"]properties[/URL] to access them. You can then store each …

Member Avatar for Geekitygeek
0
162
Member Avatar for AngelicOne
Member Avatar for Lusiphur
0
441
Member Avatar for judithSampathwa

Whilst your method works fine finito, you are creating extra work for yourself. As nick.crane pointed out, you can set a DialogResult value in the buttons properties. If you set a buttons DialogResult to OK, if the form is opened modally then when you click it the Form's DialogResult value …

Member Avatar for nick.crane
0
177
Member Avatar for krisfr

The problem is that you are opening your connection, then closing it and disposing of it, then trying to use it with your sqldatareader. Check [URL="http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqldataadapter.aspx"]the code here[/URL]. First of all, place the connection inside a "using" block. This ensures the connection is correctly closed and disposed when the using …

Member Avatar for tanor
0
157
Member Avatar for AngelicOne

If you want the login form to close and a new form to be shown, why not create the new form from your main form. You are showing the login form modally (ShowDialog) so when you close login the code execution will resume in the main form. Use the login …

Member Avatar for Geekitygeek
0
408
Member Avatar for NH1
Member Avatar for markthien

Try using the FormattedValue rather than the Value. If you are binding to a database you are likely using a bit column which holds 0 or 1. If the value isnt set it will return null so be sure to check for null values when you check them to avoid …

Member Avatar for Geekitygeek
0
1K
Member Avatar for markthien
Member Avatar for soum_cbs@yahoo.

I assume when you say you crated a Session that you mean you have stored their EmailID in teh session varaible. If thats the case you will need to create a connection to your database and use a Select query to retreive rows where EmailID = Session["EmailID"]. Try reading [URL="http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqldataadapter.aspx"]this[/URL]

Member Avatar for hirenpatel53
0
84
Member Avatar for litlemaster

I'm confused : / If the datagridviews are bound to different tables, what are you trying to acheive by transposing rows? Can you show the table structures? If your database is normalised correctly you should be storing data specific to the contact in the Contacts table. Why would you want …

Member Avatar for Geekitygeek
0
267
Member Avatar for litlemaster

Two things... 1) Is there a typo in your Groups table? You have Group_ID and Contact_ID, which is a duplicate of the Members table. 2) I showed you how to construct a select query to limit returned rows by group in [URL="http://www.daniweb.com/forums/post1288629.html#post1288629"]your other thread[/URL].

Member Avatar for litlemaster
0
71
Member Avatar for judithSampathwa

You can specify a format string when using Datetime.ToString() to set how the string is constructed. Check out [URL="http://www.geekzilla.co.uk/View00FF7904-B510-468C-A2C8-F859AA20581F.htm"]this link[/URL], has a very handy list of possible format strings and a reference for building your own.

Member Avatar for Geekitygeek
0
136
Member Avatar for litlemaster

You can also add parameters to your commands. This makes your code much more readable and easier to work with if your query has a few parameters: [CODE] int current_group = 1; SqlDataAdapter adp = new SqlDataAdapter("select * from gmembers where GID = @GID", con); adp.SelectCommand.Parameters.AddWithValue("@GID", current_group); [/CODE]

Member Avatar for Geekitygeek
0
98
Member Avatar for BlackNinja

Also, I would recommend checking [URL="http://www.daniweb.com/code/snippet298708.html"]my tutorial[/URL] on accessing form controls/members from other forms. Your 'ent' variable is specific to the current instance of the form, static members should be common across all instances. My tutorial shows how to use a property to access a private member. Properties are a …

Member Avatar for Geekitygeek
0
157
Member Avatar for ahihihi...
Member Avatar for reccakeys123
0
191
Member Avatar for pakunoda

I think your best bet would be to use the Login form Modally. Use FormInstance.ShowDialog() to show a modal instance of the form. Modal forms prevent the user from moving focus to other forms until they are closed. They also allow you to use the DialogResult property. Another useful behaviour …

Member Avatar for Geekitygeek
0
114
Member Avatar for JOSheaIV

Not even :/ Did you check the link Lusipher posted? It showed you how to use a modal form: [CODE] shiftAlter_edit_Form6 form6 = new shiftAlter_edit_Form6(storedFileArray, loc); form6.ShowDialog(); [/CODE] Code execution will pause on the current form until form6 is closed. You wont be able to move focus to any other …

Member Avatar for JOSheaIV
0
155
Member Avatar for adobe71

Timers have a Tick event. You set an interval value (in milliseconds) and start the timer. Once started the tick event will be executed at the determined interval until you stop the timer. If you want text to scroll across the screen you will need some way to display it …

Member Avatar for Geekitygeek
0
49
Member Avatar for Toulinwoek

I agree with Lusipher that you need to look through your code and find where the list is being filled initially. Once you have that code you can use it to fill the list any time you need to refresh it, and putting it in a method makes it more …

Member Avatar for Toulinwoek
0
85
Member Avatar for GAME

Thats because you're only reading one line. [iCODE]newstxt.Text += x.ReadLine();[/iCODE] reads a single line from the stream. Use either x.ReadToEnd or use a while loop to itereate through each line with x.ReadLine. If you use a loop you will need to look at the x.EndOfStream property.

Member Avatar for GAME
0
105
Member Avatar for Cap'nKirk

There is a [URL="http://msdn.microsoft.com/en-us/library/system.windows.forms.progressbar.aspx"]ProgressBar control[/URL] available as standard on Winforms. Add the control to your form, set the maximum and minimum values, then increment its Value property to show progress. You dont have to use 1 to 100 for the max and min, if for instance you were loading 35 …

Member Avatar for Cap'nKirk
0
191
Member Avatar for bigaditya

I was just gonna say "Cos its good practice"..j/k The use of properties (as clearly covered above) gives better control over how access is granted. This is all part of Object Oriented practices..more specifically [URL="http://en.wikipedia.org/wiki/Object-oriented_programming#Encapsulation"]Encapsulation[/URL].

Member Avatar for Lusiphur
0
843
Member Avatar for litlemaster

You can use the datagridview.SelectedRows property to retreive a collection of the currently selected rows. Alternatively, you can add an unbound CheckBox column to the datagriview. Then itereate through all rows to check the value of teh checkbox column.

Member Avatar for Duki
0
130
Member Avatar for sssnm

are you reading the file in a method contained in your form class? When you execute code in the same thread as the UI the UI will pause until the code has finished executing. If the file is taking a while to process your UI will show as "Not Responding" …

Member Avatar for Geekitygeek
0
74
Member Avatar for nkhurana50

Im not sure if theres a way to do it automatically, but you could do it manually. Iterate through each of the datarow's cells and insert them into the table. You will need to be careful how you do it though. You need to ensure that there are enough rows …

Member Avatar for Geekitygeek
0
81
Member Avatar for virusisfound

The text changed event arguments dont include "e.KeyChar" because the event is not always fired by a keypress. If you use the Textbox.KeyPress event, the event args will include the KeyChar value to show which key fired the event. It should be ntoed at this point that the KeyPress event …

Member Avatar for virusisfound
0
191

The End.