Search Results

Showing results 1 to 40 of 43
Search took 0.01 seconds.
Search: Posts Made By: Hamrick ; Forum: C# and child forums
Forum: C# Sep 7th, 2007
Replies: 2
Views: 2,599
Posted By Hamrick
Use either Environment.NewLine or "\r\n". Environment.NewLine is more portable, but that's not a big problem with .net programs. ;)
Forum: C# Sep 6th, 2007
Replies: 1
Views: 5,578
Posted By Hamrick
If the C++ program is C++/CLI, you can add the C# dll as a reference in the C++ project and use it normally. If it's native C++, it's a little harder...
Forum: C# Aug 28th, 2007
Replies: 15
Views: 10,877
Posted By Hamrick
Right, because you have backslashes in the string. C# sees that and doesn't recognize them as escape characters, so it throws up compilation errors. To get a literal backslash you escape the...
Forum: C# Aug 26th, 2007
Replies: 3
Views: 4,546
Posted By Hamrick
1) Yeah, you can tell the BinaryReader what encoding to use with the System.Text.Encoding class.

BinaryReader reader = new BinaryReader( stream, Encoding.BigEndianUnicode );

2) No, but you can...
Forum: C# Aug 26th, 2007
Replies: 15
Views: 10,877
Posted By Hamrick
The connection string is just a string variable. You make it the same way you make any other string. You pass it around the same way you would any other string. There's no secret connection string...
Forum: C# Aug 26th, 2007
Replies: 15
Views: 10,877
Posted By Hamrick
It doesn't have to go in the app.config. You can put it anywhere you want because _you're_ the programmer. :) Try adding it as a public property to the main program class for an easy way to get...
Forum: C# Aug 24th, 2007
Replies: 15
Views: 10,877
Posted By Hamrick
You need to add the SqlClient reference to your project and add a using statement wherever you use those classes.

using System.Data.SqlClient;

You need to store the connection string somewhere,...
Forum: C# Aug 24th, 2007
Replies: 15
Views: 10,877
Posted By Hamrick
I guess you could just put the method in the form class. Then you call it in the button's click event.

void buttonOK_Click( object sender, EventArgs e ) {
bool isValid = this.IsValidatedUser(
...
Forum: C# Aug 24th, 2007
Replies: 15
Views: 10,877
Posted By Hamrick
Forum: C# Aug 23rd, 2007
Replies: 15
Views: 10,877
Posted By Hamrick
I don't know. That's not even code for your project, it's just something to give you ideas on how you might do it for yourself. I can help you place it if you describe how your project is laid out...
Forum: C# Aug 23rd, 2007
Replies: 15
Views: 10,877
Posted By Hamrick
Send the text of those two text boxes as arguments to a stored procedure. The stored procedure should check if the username exists and the password matches. Something like this I guess.

create...
Forum: C# Aug 22nd, 2007
Replies: 5
Views: 815
Posted By Hamrick
I disagree, and I challenge you to prove it.


I did nothing of the sort. Read my first post again and you'll see that I asked about the format of the file and on the off chance that it's fixed, I...
Forum: C# Aug 22nd, 2007
Replies: 5
Views: 815
Posted By Hamrick
It's not counting whitespace, it's relying on a fixed width column format. There's no way to identify empty fields in the sample that dineshsachdeva gave. But if the first field always starts at...
Forum: C# Aug 22nd, 2007
Replies: 5
Views: 815
Posted By Hamrick
Is the spacing consistent in the file? Like do each of the values always start at the same column?

abc d efd de
xxx 25.80 12.10 180000.0 11111...
Forum: C# Aug 22nd, 2007
Replies: 7
Views: 6,041
Posted By Hamrick
Making the UI look good is all about designing it. You can buy flashy controls from people like Infragistics, but putting them together into a good looking and easy to use UI is hard. You can write...
Forum: C# Aug 21st, 2007
Replies: 1
Views: 7,453
Posted By Hamrick
I hate just giving links instead of a meaty post, but you can learn more from these two than you ever could from me. :)

http://msdn2.microsoft.com/En-US/library/ms973802.aspx...
Forum: C# Aug 21st, 2007
Replies: 7
Views: 6,041
Posted By Hamrick
I don't think you can get templates like that. You'd still have to know how they work to make the controls function, and that's the biggest part of writing an UI. But tools like visual studio make...
Forum: C# Aug 17th, 2007
Replies: 8
Views: 8,038
Posted By Hamrick
Why doesn't it help? It shows you that you can add and remove from the collection. That means you can copy the collection to a list that you can edit using indexes, clear the collection, and then add...
Forum: C# Aug 17th, 2007
Replies: 8
Views: 8,038
Posted By Hamrick
Does this (http://msdn2.microsoft.com/en-us/library/70w4awc4.aspx) answer your question?
Forum: C# Aug 16th, 2007
Replies: 1
Views: 684
Posted By Hamrick
There's no optional keyword in C#, all method parameters are required unless you use variable parameters with the params keyword. A finalize method in VB.NET is a destructor in C#. A destructor has...
Forum: C# Aug 13th, 2007
Replies: 1
Views: 452
Posted By Hamrick
What kind of player do you want to make? I'd start by going to sourceforge or freshmeat and looking for something close to what I want so that I can study the code. Looking at existing projects is a...
Forum: C# Aug 13th, 2007
Replies: 3
Views: 1,821
Posted By Hamrick
using System.Diagnostics;

namespace Hamrick {
static class Program {
static void Main() {
Process.Start( "myscript.pl" );
}
}
}
Forum: C# Aug 13th, 2007
Replies: 3
Views: 1,821
Posted By Hamrick
Can you use System.Diagnostics.Process.Start? I'm not really sure how tcl programs are run because they're interpreted, but I'm guessing it works like perl programs and the interpreter is...
Forum: C# Aug 13th, 2007
Replies: 3
Views: 2,997
Posted By Hamrick
If you want an msi file as the result, I don't think you can do it with visual studio express. You have to upgrade to visual studio standard or write your own installer program that creates folders,...
Forum: C# Aug 13th, 2007
Replies: 11
Views: 16,495
Posted By Hamrick
I'm not sure you can do that with outlook, but I'd start by seeing if there's a command line switch I could use. Something like

System.Diagnostics.Process.Start( "outlook.exe /newmessage" );
...
Forum: C# Aug 12th, 2007
Replies: 6
C#
Views: 1,303
Posted By Hamrick
I'd ask just enough to see if the person really knows C# and move on to more important questions. Start with simple stuff like what the main method looks like, what data types are available, and...
Forum: C# Aug 12th, 2007
Replies: 1
Views: 880
Posted By Hamrick
Do you mean programmatically pushing data to the text box while the window is minimized or somehow taking user input while the window is minimized? Programmatically isn't a problem as long as you...
Forum: C# Aug 12th, 2007
Replies: 11
Views: 16,495
Posted By Hamrick
If by mail box you mean an email application like outlook, you can use the Process class from System.Diagnostics.

System.Diagnostics.Process.Start( "outlook.exe" );
Forum: C# Aug 12th, 2007
Replies: 3
Views: 2,997
Posted By Hamrick
The express editions don't support any kind of deployment except for ClickOnce. In regular visual studio you'd make a setup and deployment project...
Forum: C# Aug 2nd, 2007
Replies: 11
Views: 14,386
Posted By Hamrick
I have to agree because you proved me wrong. You can't change things like the click event for the button but you can hook events further down the line and do stuff.
Forum: C# Aug 2nd, 2007
Replies: 11
Views: 14,386
Posted By Hamrick
Adding additional behavior is changing the behavior. ;)
Forum: C# Aug 2nd, 2007
Replies: 11
Views: 14,386
Posted By Hamrick
You can't change that behavior. You have to remove it completely by setting the FormBorderStyle to None and make your own from scratch.
Forum: C# Aug 1st, 2007
Replies: 1
Views: 1,908
Posted By Hamrick
If you have a main form that makes subforms, you should be using an MDI application design. That fixes both of the problems right out of the box.
Forum: C# Jul 31st, 2007
Replies: 6
Views: 6,309
Posted By Hamrick
This is a DataGrid and not a DataGridView, right? DataGrids are weird in that you have to make a table style to the grid and add columns to the table style to get what you want. DataGrids aren't a...
Forum: C# Jul 31st, 2007
Replies: 4
Views: 4,914
Posted By Hamrick
You have to register the assembly on every computer that it's used. regasm does two things. It makes a type library, but it also puts an entry for the ProgId of the assembly into the...
Forum: C# Jul 30th, 2007
Replies: 5
Views: 17,015
Posted By Hamrick
You aren't using it anymore, right? What was the password? I'm thinking it might have a special character that's treated differently in C# strings and translates into something not valid. That's just...
Forum: C# Jul 30th, 2007
Replies: 5
Views: 17,015
Posted By Hamrick
That's funky. I looked around and found application limits for access 97 and 2000. I guess they're the same or better for newer versions, and if they're better it's probably a good idea to assume...
Forum: C# Jul 30th, 2007
Replies: 4
Views: 4,914
Posted By Hamrick
How are you deploying the assembly? You didn't mention gacutil.exe in your steps so unless the assembly is in the same folder as the calling application (like vb6.exe) then it won't be able to find...
Forum: C# Jul 30th, 2007
Replies: 5
Views: 17,015
Posted By Hamrick
I have a few questions?


What version of Access?
Are you using OLEDB or ODBC?
Can you post your connection string?

The connection string should look like this for Access 2007 with a...
Forum: C# Jul 27th, 2007
Replies: 1
Views: 615
Posted By Hamrick
Use the Contains method of the string class to find substrings.

string s = "Hello World!";

if ( s.Contains( "Hello" ) ) {
Console.WriteLine( "Found \"Hello\" in the string" );
}
Showing results 1 to 40 of 43

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC