2,245 Posted Topics

Member Avatar for NewbieProgram

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?

Member Avatar for sknake
0
125
Member Avatar for Krstevski

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 …

Member Avatar for sknake
0
127
Member Avatar for Waseem Siddiqui

I don't understand your question. Try explaining your more problem in a little more detail without bold tags.

Member Avatar for sknake
0
69
Member Avatar for Egypt Pharaoh

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 …

Member Avatar for sknake
0
101
Member Avatar for Ari5555

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 …

Member Avatar for sknake
0
72
Member Avatar for leebee306
Member Avatar for leebee306

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]

Member Avatar for sknake
0
104
Member Avatar for joewazen

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 …

Member Avatar for sknake
0
122
Member Avatar for ddanbe

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]

Member Avatar for Geekitygeek
0
90
Member Avatar for xyz12

Take a look at these threads: [url]http://www.daniweb.com/forums/thread209864.html[/url] [url]http://www.daniweb.com/forums/thread228492.html[/url]

Member Avatar for xyz12
0
123
Member Avatar for fisk007

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 …

Member Avatar for fisk007
0
1K
Member Avatar for Jaydenn

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 …

Member Avatar for Jaydenn
0
137
Member Avatar for jas2010

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. …

Member Avatar for jas2010
0
151
Member Avatar for reyarita
Re: C#

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 …

Member Avatar for reyarita
0
115
Member Avatar for kobalt
Member Avatar for ananthta

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?

Member Avatar for sknake
-1
40
Member Avatar for sati02

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" …

Member Avatar for sknake
0
193
Member Avatar for jayanthsept5

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 …

Member Avatar for azdonald
0
162
Member Avatar for melodie123

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 …

Member Avatar for sknake
0
88
Member Avatar for Patrick_Neville

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 { …

Member Avatar for sknake
0
161
Member Avatar for dennis.d.elston

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

Member Avatar for towerrounder
0
592
Member Avatar for tchiloh

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?

Member Avatar for tchiloh
0
159
Member Avatar for klactose

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 …

Member Avatar for privatevoid
1
242
Member Avatar for Ulukay

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 …

Member Avatar for Ulukay
0
127
Member Avatar for yomi.james

[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 …

Member Avatar for eliza17
0
164
Member Avatar for Mattpd

Post an example of the data file you're working with and the give indications what changes you want to make

Member Avatar for hichnam
0
156
Member Avatar for wingers1290

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 …

Member Avatar for wingers1290
0
1K
Member Avatar for nccsbim071

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 …

Member Avatar for nccsbim071
0
947
Member Avatar for fairy1992224

No you are not correct. You have already been given the answer....

Member Avatar for TomW
-1
75
Member Avatar for Dajer

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, …

Member Avatar for sknake
0
392
Member Avatar for fairy1992224

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.

Member Avatar for kvprajapati
0
128
Member Avatar for wingers1290

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 …

Member Avatar for wingers1290
0
184
Member Avatar for kc_9849

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 …

Member Avatar for sknake
0
88
Member Avatar for IcetalkeR

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 …

Member Avatar for jonsca
0
370
Member Avatar for wingers1290

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 …

Member Avatar for sknake
0
265
Member Avatar for Jaydenn

Someone wrote an article on that: [url]http://www.geekpedia.com/tutorial239_Csharp-Chat-Part-1---Building-the-Chat-Client.html[/url]

Member Avatar for sknake
0
79
Member Avatar for Ari5555

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 …

Member Avatar for sknake
0
83
Member Avatar for saadikhan

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.

Member Avatar for sknake
0
740
Member Avatar for carlakawill

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 …

Member Avatar for sknake
0
154
Member Avatar for snakay

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. …

Member Avatar for snakay
0
135
Member Avatar for vuyiswamb

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

Member Avatar for vuyiswamb
0
102
Member Avatar for jas2010

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; …

Member Avatar for sknake
0
110
Member Avatar for happygeek

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 …

Member Avatar for sknake
0
609
Member Avatar for Relentless

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 …

Member Avatar for Tech B
0
142
Member Avatar for redstrykr

Upload your project. How you go about doing what you are asking depends a lot on how you designed the application.

Member Avatar for Geekitygeek
0
108
Member Avatar for jvskishore

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, …

Member Avatar for sknake
0
71
Member Avatar for ejazmusavi

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.

Member Avatar for sknake
0
365
Member Avatar for farsen

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 …

Member Avatar for sknake
0
145
Member Avatar for Edmondo

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.

Member Avatar for kameswari
0
103
Member Avatar for kardsen
Member Avatar for kardsen
0
130

The End.