472 Posted Topics

Member Avatar for farag

Can you zip and attach the small application (project/solution) in question with any relevant word doc (is it in English?)?

Member Avatar for DdoubleD
0
227
Member Avatar for Krstevski

if you want it to be accurate, you need to calculate up front the total items to be processed (scanned?), then divide into total items already processed * 100.... Here is an example of using BackgroundWorker with file copies in which the total number of bytes of all files to …

Member Avatar for Krstevski
0
654
Member Avatar for farag

Those default namespaces and references, depending on the type of project that is created, are added because the chosen type of application or library requires them. Are you wanting to create a project template that can be chosen like "Windows Form Application", or "Console Application"? [URL="http://msdn.microsoft.com/en-us/library/xkh1wxd8.aspx"]How to: Create Project Templates[/URL]

Member Avatar for sknake
0
153
Member Avatar for zeeven

Try this code. I modified your path construction to use backslash and added exception handling to provide specific error information. [code=csharp] string database = @"C:\Users\Jessie\Documents\Visual Studio 2008\Projects\Face\DAT\DTR_DB.s3db"; string connParams = @"Data Source={0};Version=3;New=False;Compress=True;"; string connStr = string.Format(connParams, database); SQLiteConnection conn = new SQLiteConnection(connStr); try { conn.Open(); } catch (SQLiteException ex) { …

Member Avatar for zeeven
0
1K
Member Avatar for Geekitygeek

I believe I understand what you want, and I don't think it is possible with user control. I have also wanted to create custom controls utilizing UserControl without the need to manually expose each of the methods and properties of the container controls. If and when you figure it out, …

Member Avatar for sknake
0
195
Member Avatar for Mitja Bonca

[code=csharp] // Set the number of rows to step through... progressBar1.Maximum = ds.Tables[0].Rows.Count; // Set the increment size... progressBar1.Step = 1; [/code] then to maintain progress: [code=csharp] cmd1.ExecuteNonQuery(); // Increment progress... progressBar1.PerformStep(); [/code] You should also move the [icode]sqlConn.Open();[/icode] outside of your loop, which is why I didn't include it …

Member Avatar for DdoubleD
0
205
Member Avatar for BobFX

Given the code sample and question, you only need to declare the methods static within a class and you can reference/call them anywhere as long as you establish a reference within your project and call the method by it's fully qualified name. For example: [code=charp] namespace MyNameSpace { public class …

Member Avatar for BobFX
0
656
Member Avatar for Mitja Bonca

Yes, for example: [code=csharp] public class class1 { public static int GetCustomerID(string lastname, string firstname) { int id = -1; // TODO: db query here... return id; } } public partial class Form1 : Form { TextBox textBox1 = new TextBox(); // I put here for reference only... TextBox textBox2 …

Member Avatar for DdoubleD
0
126
Member Avatar for gamer1225

You could synchronize the 2nd WebBrowser's loaded page using the [icode]webBrowser1_Navigated[/icode] event handler: [code=csharp] private void webBrowser1_Navigated(object sender, WebBrowserNavigatedEventArgs e) { if (bSychronize) { if (webBrowser1.Url.ToString() != webBrowser2.Url.ToString()) webBrowser2.Navigate(e.Url.ToString()); } } [/code] In the above, the boolean [icode]bSynchronize[/icode] can be toggled by a button click event: [code=charp] private void button1_Click(object …

Member Avatar for gamer1225
0
116
Member Avatar for Mitja Bonca

As ddanbe said, and you can use the FindItemWithText method to retrieve the corresponding item: [code=csharp] private void SetReservation(string time, string reservation) { // find item with matching time... ListViewItem item = listView1.FindItemWithText(time); if (item != null) { // Set value for reservation column... item.SubItems[1].Text = reservation; } } [/code]

Member Avatar for DdoubleD
0
194
Member Avatar for Lolalola

I believe you are referring to Jan Dolinay's "Detecting USB Drive Removal in a C# Program"? This is not part of the .NET framework to my knowledge. In addition, the CodeProject download contains only the DriveDetector.cs file, which defines the Donlinay namespace; so there probably is not an external library …

Member Avatar for Lolalola
-1
260
Member Avatar for nertos

What is it you want to do with your panel? Here is an example that draws some text whenever it is repainted, and the form has a button to change the 'value' of the text: [code=csharp] using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; …

Member Avatar for DdoubleD
0
463
Member Avatar for konczuras

You might refer to this similar discussion to see if it helps you: [URL="http://social.msdn.microsoft.com/forums/en-US/netfxbcl/thread/aa8c9bde-5cb5-44e4-b9e2-7608470ce08e/"]http://social.msdn.microsoft.com/forums/en-US/netfxbcl/thread/aa8c9bde-5cb5-44e4-b9e2-7608470ce08e/[/URL]

Member Avatar for DdoubleD
0
263
Member Avatar for Romil797

Here is an example I put together that creates a table with background image using HTML. The HTML is inline and does not import a CSS file--sorry. I'm no expert in the subject, but wouldn't the import be performed by the client (browser, outlook, etc.) and not gmail, thus eliminating …

Member Avatar for sknake
0
383
Member Avatar for Mitja Bonca

It doesn't matter whether the form is visible or not. I put this form demonstration together for you to see how the forms can manipulate the other forms' lists. Add them to a form project and call [icode]Application.Run(new Form_modal())[/icode]

Member Avatar for Geekitygeek
0
123
Member Avatar for th3learner

Take a look at this MS link and look at the example code where instead of filtering numeric digits, they filter everything else... Just modify that code to only accept the characters you want. Cheers! [URL="http://msdn.microsoft.com/en-us/library/system.windows.forms.control.keypress.aspx"]http://msdn.microsoft.com/en-us/library/system.windows.forms.control.keypress.aspx[/URL]

Member Avatar for sknake
0
456
Member Avatar for mps727

I noticed this link posted by adatapost, which seems to use the dashed outline on the drag you are looking to replicate, but cannot be sure because I did not get to see your IMG tag. Anyway, it's a TreeView drag/drop I believe, but the owner drawn stuff is probably …

Member Avatar for mps727
0
213
Member Avatar for sidd.

You have your "sr" and "sw" naming conventions reversed :D, but that is not your problem... Your call to [icode]b[i] = sw.Read();[/icode] will only read a character at a time, which is why you cannot get the values you expect, presumably. Look at the [URL="http://msdn.microsoft.com/en-us/library/system.io.streamreader_members.aspx"]Read method spec[/URL] and see if …

Member Avatar for DdoubleD
0
165
Member Avatar for Tank50

Dates need to be enclosed with hash (#) symbol. Try: [code=csharp] string str = "Select * from Customer where SubmitDate between #" + str1 + " 12:00:00 AM#" + " and #" + str2 + " 12:00:00 PM#"; [/code]

Member Avatar for Tank50
0
195
Member Avatar for Lolalola

Might be your using named parameters... Are you getting NULL values in the table? Try changing "@" to "?" and see what you get.

Member Avatar for DdoubleD
0
129
Member Avatar for XMarshall

Once you remove all the references to your button objects stored in your array, the garbage collector will take care of the cleanup. You can then reallocate (reuse) your array for further usage. [code=csharp] // step 1 allocate... ButtonArray = new Button[10, 100]; // step 2 remove reference to button …

Member Avatar for DdoubleD
0
262
Member Avatar for pilu

Please have a look at this: [URL="http://dotnetperls.com/dllimport-interop"]http://dotnetperls.com/dllimport-interop[/URL]

Member Avatar for DdoubleD
0
291
Member Avatar for psychoangelo89

EDIT: NEVERMIND THIS BECAUSE I DIDN'T SEE YOU HAD THE DEFINITION POSTED: [I]Are you sure the [icode]CompareStrings[/icode] method is always return true? From what library is your [icode]CompareStrings[/icode]? Look at the definition to determine it why it is always returning true.[/I] Why are you selecting the 'matching' record for username …

Member Avatar for psychoangelo89
0
146
Member Avatar for vinnijain

[QUOTE=vinnijain;944756]Hi!!!! Example we enter "One crore twenty lakh thirty four thousand seven hundred eighty four" , then its corresponding numeral should be "12034784". [/QUOTE] This looks familiar. See: [URL="http://www.daniweb.com/forums/thread209656.html"]http://www.daniweb.com/forums/thread209656.html[/URL]

Member Avatar for vinnijain
0
135
Member Avatar for tig2810

You have indicated you are getting a "null reference" error, and you have provided a snippet that does not reveal the cause of the error; unless it is because "em" has not been instantiated. I suggest you zip up the project and attach it with data. If you cannot do …

Member Avatar for tig2810
0
118
Member Avatar for shakatra

It's probably due to a difference between the version of VS you have and the version of VS discussed in the tutorial you are using. Try stepping through your wizard and see if you can identify the options you are concerned with that your tutorial or book discusses. If still …

Member Avatar for DdoubleD
0
138
Member Avatar for agent154

I didn't see where there was any change to this method for Windows 7. Perhaps you want the SaveFileDialog flexibility: [URL="http://msdn.microsoft.com/en-us/library/system.windows.forms.savefiledialog.aspx"]http://msdn.microsoft.com/en-us/library/system.windows.forms.savefiledialog.aspx[/URL] You can set the [icode]InitialDirectory[/icode] to be whatever drive:path concerns your application.

Member Avatar for sknake
0
164
Member Avatar for tig2810

Twice I have received "token expired" error trying to reply to this... I am really peeved! Anyway, run the program outside the debugger and check the debug\application.exe.config file for the changes. I would explain further, but I've already wasted a 1/2 hour trying too... EDIT: I'll try to elaborate briefly …

Member Avatar for tig2810
0
237
Member Avatar for norz

I don't use express version, but this looks like a nice step-by-step article for creating a database in Sql Express using VS: [URL="http://www.homeandlearn.co.uk/csharp/csharp_s12p2.html"]http://www.homeandlearn.co.uk/csharp/csharp_s12p2.html[/URL]

Member Avatar for DanielGreen
0
143
Member Avatar for ntouros

To convert your [icode]byte[][/icode] to an image: [code=csharp] public static Image ByteArrayToImage(byte[] buffer) { using (MemoryStream ms = new MemoryStream(buffer)) { System.Drawing.Image img = System.Drawing.Image.FromStream(ms); return img; } } [/code] or if cannot use [icode]Image.FromStream[/icode] method (no CF support): [code=csharp] public static Image byteArrayToImage(byte[] byteArrayIn) { // Write the byte …

Member Avatar for DdoubleD
0
144
Member Avatar for wingers1290

Take a look at the [URL="http://msdn.microsoft.com/en-us/library/system.io.filesystemwatcher.aspx"]FileSystemWatcher component[/URL], which you can add to your form. Here is a Daniweb snippet of its usage too: [URL="http://www.daniweb.com/code/snippet217135.html"]http://www.daniweb.com/code/snippet217135.html[/URL]

Member Avatar for DdoubleD
0
291
Member Avatar for rzhaley

You didn't call your method. At line 19 you are writing out the abbreviation. Try: [code=csharp] Console.WriteLine("State is {0}", FromAbbreviation(abr)); [/code] In addition, you are already comparing to lower text [icode]switch(abr.ToLower().Trim())[/icode] at line 24, so all of those [icode]case[/icode] labels you have for checking upper-case abbreviations will never test true--you …

Member Avatar for rzhaley
0
209
Member Avatar for micka10

Because each element of "m" will reference the same "record" object, which will contain whatever the last items added to the record are. You need to move the creation of the "record" into the loop so that each "record" of "m" is a different object: [code=csharp] for (int i = …

Member Avatar for micka10
0
268
Member Avatar for shine_jose

I'm not sure how your "web application" is deployed and you cannot simply access the file system on a client from a web service, but I won't make assumptions since you indicated you have "FCR" folders already setup on the clients. Try adding some exception handling around your file IO: …

Member Avatar for Geekitygeek
-1
143
Member Avatar for Neona

UPDATE tablename SET columnname1='value' WHERE columnname2='value'; If the value is numeric, leave off the ticks ('...') around the value.

Member Avatar for Neona
0
138
Member Avatar for Jaydenn

Not sure why you would ask this question rather than just test out your code to see if it does indeed work, but the code is nicely structured for the most part. [LIST] [*]Your test for valid username/password will display a message box for every line read following the initial …

Member Avatar for Jaydenn
0
137
Member Avatar for wingers1290

You can allow your user to select the file to open with [URL="http://msdn.microsoft.com/en-us/library/system.windows.forms.openfiledialog.aspx"]OpenFileDialog...[/URL], then use [URL="http://msdn.microsoft.com/en-us/library/dsh84875.aspx"]XmlSerializer.Deserialize[/URL] to read in your object(s). Once your object is loaded, just populate the form(s) with the read data. You might also want to see: [URL="http://msdn.microsoft.com/en-us/library/bdxxw552.aspx"]Serialize method...[/URL], which you can use with your filename to …

Member Avatar for wingers1290
0
201
Member Avatar for GizmoPower

You may also wish to consider this [URL="http://www.daniweb.com/forums/thread236486.html"] discussion of INI file interface[/URL] and why you shouldn't use it.

Member Avatar for DdoubleD
0
135
Member Avatar for ejazmusavi

You cannot assign a CR image path dynamically in vs 2005, but here is a work around you can use: [URL="http://dotnetfish.blogspot.com/2009/02/dynamic-image-in-crystal-report-9.html"]http://dotnetfish.blogspot.com/2009/02/dynamic-image-in-crystal-report-9.html[/URL]

Member Avatar for DdoubleD
0
1K
Member Avatar for klactose

Maybe someone in here will know LISP, but you would probably get a much faster response if you translate the above LISP code into pseudo code first, then we can translate that into C# code.

Member Avatar for Rashakil Fol
0
340
Member Avatar for DdoubleD

Hi. I decided to try out the Report Wizard, having only worked with Crystal Reports prior, and when I try to connect to an Access DB with the default OLE DB data provider, I get "Unspecified Error" in the Add Connection dialog upon "Test Connection" or trying to accept the …

Member Avatar for DdoubleD
1
166
Member Avatar for jas2010

What happens when you run it outside the application from a command prompt? Does it create a log file? Does it create any Event Log entries? What are the errors it returns?

Member Avatar for DdoubleD
0
56
Member Avatar for dsylebee

Have a look at these: [URL="http://www.codeproject.com/KB/edit/htmlrichtextbox.aspx"]http://www.codeproject.com/KB/edit/htmlrichtextbox.aspx[/URL] [URL="http://blogs.vbcity.com/hotdog/archive/2005/12/30/5759.aspx"]http://blogs.vbcity.com/hotdog/archive/2005/12/30/5759.aspx[/URL] [URL="http://sourceforge.net/projects/rtf2html-lite/"]http://sourceforge.net/projects/rtf2html-lite/[/URL] [URL="http://www.codeguru.com/cpp/controls/richedit/conversions/article.php/c5377/"]http://www.codeguru.com/cpp/controls/richedit/conversions/article.php/c5377/[/URL]

Member Avatar for DdoubleD
0
722
Member Avatar for procomp65

You cannot simply estimate time based on samples and, as I am sure you are aware, no progress for downloading from the web is extremely accurate. Given that is true all around, user's expect there to be plus/minus whatever they have experienced... In light of this, the best you can …

Member Avatar for procomp65
0
703
Member Avatar for c#noob

What you want is INSERT INTO ... VALUES(...): [URL="http://msdn.microsoft.com/en-us/library/bb208861.aspx"]http://msdn.microsoft.com/en-us/library/bb208861.aspx[/URL], because the INSERT INTO ... SELECT FROM inserts fields FROM another table and you want to insert your [icode]TextBox.Text[/icode] VALUES into your table. It is unclear to me why you have what appears to be mixture of controls and control Text …

Member Avatar for Geekitygeek
0
204
Member Avatar for talor

See if any of these are helful: [URL="http://codesmithdotnet.blogspot.com/2008/01/programmatically-input-data-on-form-and.html"]http://codesmithdotnet.blogspot.com/2008/01/programmatically-input-data-on-form-and.html[/URL] [URL="http://geekswithblogs.net/rakker/archive/2006/04/21/76044.aspx"]http://geekswithblogs.net/rakker/archive/2006/04/21/76044.aspx[/URL]

Member Avatar for shamseena
0
130
Member Avatar for NargalaX

EDIT: Scratched response... Please see: [URL="http://msdn.microsoft.com/en-us/library/s35hcfh7(VS.71).aspx"]http://msdn.microsoft.com/en-us/library/s35hcfh7(VS.71).aspx[/URL]

Member Avatar for DdoubleD
0
147
Member Avatar for rakanhaddad

Your email address was removed because forum protocol prohibits it. Take a look at this MSDN example: [URL="http://msdn.microsoft.com/en-us/library/system.net.mail.smtpclient.aspx"]SmtpClient example...[/URL]

Member Avatar for DdoubleD
0
277
Member Avatar for urania

I don't see a Delete command from your code sample. See: [URL="http://msdn.microsoft.com/en-us/library/bb177896.aspx"]http://msdn.microsoft.com/en-us/library/bb177896.aspx[/URL]

Member Avatar for DdoubleD
0
282
Member Avatar for Drahmina

[code=csharp] DateTime datetime = DateTime.ParseExact("10/10/2009 12:00:00", "MM/dd/yyyy hh:mm:ss", System.Globalization.CultureInfo.CurrentCulture); [/code] Also, have a look at this: [URL="http://msdn.microsoft.com/en-us/library/system.datetimeoffset.tryparseexact.aspx"]http://msdn.microsoft.com/en-us/library/system.datetimeoffset.tryparseexact.aspx[/URL]

Member Avatar for Ravenheart
0
263

The End.