2,245 Posted Topics
Re: How does he propose that you catch him? Are you allowed to install applications on his machine, or will he be hitting a webserver and you need to grep the logs for a page he will visit? | |
Re: This functionality already exists and why not implement sort for every data type that supports [icode]IComparable[/icode] or [icode]IComparable<T>[/icode]? There are extension methods in LINQ for dealing with arrays. You can call [icode].ToList()[/icode] on the array, move it to a list, and sort that. Or you could sort the array in … | |
Re: I don't understand your question. Try explaining your more problem in a little more detail without bold tags. | |
Re: Here is one example of creating a control in code: [code] using System; using System.Drawing; using System.Windows.Forms; namespace daniweb { public partial class frmCreateTB : Form { public frmCreateTB() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { TextBox tb = new TextBox(); tb.Location = new Point(0, 0); //This … | |
Re: Why embed a serial number? When the user installs the application use a WMI query to pull the serial number from the BIOS, or make a call to [icode]System.Guid.NewGuid().ToString()[/icode] and persist the installation GUID somewhere on the hard drive and use that as the unique identifier for your application. Or … | |
Re: Upload the file you are having issues with. | |
Re: Write the data out to a temp file, play the file, then delete it: [url]http://social.msdn.microsoft.com/Forums/en/winformsapplications/thread/89b49484-5dac-45fc-9728-7ccc569cc419[/url] | |
Re: You need to measure your database growth, which you seem to have done, and use that to extrapolate for how much free space you need. Is this purely database growth and not the transaction log? If your database grows very fast you can reduce the fill factor so the SQL … | |
Re: You could do it at the string level with [icode].PadLeft()[/icode] or are you wanting this done property with binary formatting? [code=c#] private void button2_Click(object sender, EventArgs e) { int myInt = 5; string res = Convert.ToString(myInt, 2).PadLeft(16, '0'); System.Diagnostics.Debugger.Break(); } [/code] | |
Re: Take a look at these threads: [url]http://www.daniweb.com/forums/thread209864.html[/url] [url]http://www.daniweb.com/forums/thread228492.html[/url] | |
Re: Was the text below the line what you edited? It looks like you have solved your own problem. You should be able to use [icode][Col.Name Space_Field][/icode] to escape any character in a column name. Please mark this thread as solved since you seemed to have answered your own question and … | |
Re: In addition to what DdoubleD said why are you catching all exceptions and treating that as "account does not exist"? Is that to handle an [icode]IOException[/icode] if the file doesn't exist? If so then you should test to see if the file exists before attempting to read. Throwing exceptions is … | |
Re: Well for starters [code] DataSet ds = new DataSet(); ds=Classes.SelectQuery("select id,F_name,L_name,username from users", "users"); [/code] Should be: [code] DataSet ds = ds=Classes.SelectQuery("select id,F_name,L_name,username from users", "users"); [/code] Your method returns a DataSet so the one you are creating in the _Load event is merely discarded right after you create it. … | |
Re: Here is a sample validating the user input is of integral value and using the same concept privatevoid mentioned of treated the input as a character array: [code] using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace daniweb.console { public static class IntSplit { public static void Main() { string … | |
![]() | Re: How about uploading your project so we can take a look at it? |
Re: I'm not sure I understand what you're saying or asking here. Could you indicate how you are populating the grid and where the problem is? Are you trying to suspend updating the user interface until your data manipulation is complete? | |
Re: It is a little more difficult to determine and maintain a list of who is online without using a central server as all clients to need notify one another when they join or leave the chat. Due to unexpected application or power failures you can't always rely on an "Exit" … | |
Re: Be sure you use parameterized queries when building your applications! Often people vary the queries' command text with user input. Here is an example of using the Sql* classes and parameterized SQL: [code] Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click 'Insert an image Using conn … | |
Re: You're talking about months of work to do this type of image processing properly....... and it is way beyond the scope of any help you can get here. Perhaps if you had specific questions we could help you better. You can identify some parts of a picture by the contrast … | |
Re: Here is an example of databinding a grid to the results of executing the SQL sproc [icode]sp_who[/icode] with the login of "sa". It demonstrates a few of concepts: [code] using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.Data.SqlClient; namespace daniweb { … | |
Re: Also keep modulus division in mind so you can calculate the quantity of each denomination of money. Danny already gave you the struct data type for storing the denominations calculated | |
Re: So what is your question exactly? Are you trying to get the code to advance controls with the tab key like a form does, but without having to actually press the key? | |
Re: You haven't posted enough code to indicate what the problem is. Can you post a snippet of code that will compile and generate the error? From the exception message I can deduce what is happening here but can't recommend the best way for you to fix it. You're trying to … | |
Re: Why on earth would you want to write your own printer code? I have done it and I promise you don't want to! Take a look here: [url]http://stackoverflow.com/questions/246233/dot-matrix-printing-in-c[/url] As far as I know you can't guarantee that control characters and fonts a printer has installed or will recognize. I used … | |
Re: [B]>> What is the similarity and/or different between Download/Upload speed and Bandwidth speed?[/B] They usually use the same unit of measure. The differences depend on the type of line. With ADSL you have asymmetrical speeds meaning one is faster than the other (you can usually download faster than you can … | |
Re: Post an example of the data file you're working with and the give indications what changes you want to make | |
Re: Try this code, then look at your output window: [code] # string fName = dfl+(textBox1.Text)+".dat"; Console.WriteLine(fName); // you can also break at this line to evaluate fName Stream filestream = new FileStream(fName, FileMode.Create, FileAccess.Write, FileShare.None); # BinaryFormatter bf = new BinaryFormatter(); # bf.Serialize(filestream, Bob); # filestream.Close(); [/code] You should also … | |
Re: VB.NET doesn't support anonymous delegates like C# does. Just break the code out to another function: [code] Private Sub LookForUpdates() Dim timerThreadStart As New System.Threading.ThreadStart(AddressOf LookForUpdatesDelegate) Dim timerThread As New System.Threading.Thread(timerThreadStart) timerThread.Start() End Sub Private Sub LookForUpdatesDelegate() sua = New My.ShowUpdatAvailable() Dim delGetUpdateArgs As New DelGetUpdateArgs(AddressOf Me.GetUpdateArgs) sua.GetUpdateArgs = delGetUpdateArgs … | |
Re: No you are not correct. You have already been given the answer.... | |
Re: Here is an extension method to handle moving to the next cell. It doesn't behave exactly like the dataGridView because Microsoft did not expose a method to readily handle processing keys it seems. You could do better emulation if you wanted to use [icode]SendKeys()[/icode] and send a Tab I suppose, … | |
Re: Just put a [icode]'[/icode] at the beginning of the line to add a comment. You can also hit CTRL+K to comment a line and CTRL+U to uncomment a line in the VS IDE. | |
Re: Binary serialization is bad for your health unless you really have a need for it. I would recommend using XML Serialization. Here is an example of saving/loading with XML: The class name is Categories and each Category has a Categories1 & Categories2 property. The class name is a little confusing … | |
Re: Why don't you show us what you have so far? You should create a method to randomly populate your word bank then start laying out a grid or other control with the words in it. You could probably get away with using a listbox for the answer legend with 3 … | |
Re: What is your question here -- how to look up a word definition or how to split words? For getting the words in a sentence you should use RegEx. Here is an example: [code] private void button2_Click(object sender, EventArgs e) { const string sentence = "The quick, and fat, brown|lazy … | |
Re: What are you really trying to do here? This project doesn't make much sense. You could override the default program associated with ".txt" and open it in any editor you like. If you change the default extension handler on someone elses machine it will probably irritate them so I would … | |
Re: Someone wrote an article on that: [url]http://www.geekpedia.com/tutorial239_Csharp-Chat-Part-1---Building-the-Chat-Client.html[/url] | |
Re: WCF is the "latest and greatest" but tou can also take a look at remoting. I am in the middle of a project with similar requirements and WCF scared me back in to remoting. I know microsoft is promoting WCF but I just haven't been able to find enough resources … | |
Re: You need to port forward the TCP port on your router to the machine running your application. This has nothing to do with C# but rather networking hardware. | |
Re: You can also design a dataset with PRIMARY/FOREIGN key constraints so it will relate the data, and join that way. However this has somewhat more overhead than the approach adatapost mentioned and is more cumbersome to work with. Unless you intend on doing complicated upserts from the combined data I … | |
Re: You need to check for the return value. [code] string sSqlCommand="select pic from per015_ssk where sicil_no='" + dfSicilNo.Text + " ' "; OleDbCommand cmd = new OleDbCommand(sSqlCommand,conn); object o = cmd.ExecuteScalar(); if (o != DBNull.Value) { ImageByte = (byte[])o; } else { //The image value in your database is null. … | |
Re: You have to drop and re-create the table. You can't update identity columns with [icode]UPDATE[/icode]. You need to use [icode]SET IDENTITY_UPDATE dbo.SomeTable ON[/icode]. Then you can insert in the identity column I would suggest using the SQL designer for this task | |
Re: Do you just want to show a marquee while the report is generating? And what part of generating the report takes so much time? The data selection? Here is one example: [code] using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.Runtime.Remoting.Messaging; … | |
Re: I think this is a bad idea for users to start adopting. I don't see an added benefit from using Google's DNS. Here is an email I sent to a colleague this morning: [QUOTE] News: [url]http://www.pcworld.com/businesscenter/article/183638/google_launches_alternative_dns_resolver.html[/url] Technical FAQ: [url]http://code.google.com/speed/public-dns/docs/intro.html[/url] I read the technical FAQ and the big DNS daemons out … | |
Re: The most you can do is look at the mail headers to see what SMTP server delivered the mail to your server -- but that doesn't necessarily mean much unless the sender's email domain has an [URL="http://en.wikipedia.org/wiki/Sender_Policy_Framework"]SPF[/URL] defined. I think the easiest thing to do here is to pick up … | |
Re: Upload your project. How you go about doing what you are asking depends a lot on how you designed the application. | |
Re: Please use code tags when posting code on daniweb: Here is one way of going about it: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; using System.IO; namespace daniweb { public static class CryptoStuff { //Make these whatever you want private static readonly byte[] _k = { 0xA1, … | |
Re: I think this question has been answered a few times: [url]http://www.daniweb.com/forums/thread200200.html[/url] [url]http://www.daniweb.com/forums/thread236358.html[/url] [url]http://www.daniweb.com/forums/showthread.php?t=231956[/url] [url]http://www.daniweb.com/forums/thread214619.html[/url] Use parameterized SQL and just flip the Sql* to OleDb* and you will be good to go. | |
Re: What if the client connects to the central server and maintains an open connection? Then the chat server could push messages to the client as needed without running in to a firewall. (That is how they work) Back in the day ICQ used to P2P but it was problematic for … | |
Re: I don't think it is possible to run multiple queries in a single transaction with access. You have to split it out to two commands in code. | |
Re: Use [icode]Union All[/icode] and break up the select statements |
The End.