all groups > c# > january 2007 > threads for friday january 26
Filter by Day: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
Non-proportional (non Rectangular) resizing
Posted by GraGra33 at 1/26/2007 9:47:12 PM
Hi all...
I have developed an application for managing a very large resource of
artist's paintings and posts them to a web site. The application works well.
I'm trying to reduce the complexity of having to work with photoshop and
integrate one feature into the application > Distortion Transfor... more >>
Properties
Posted by SpongeBob at 1/26/2007 8:46:08 PM
I am a c++ programmer and quiet new to c sharp.
Unfortunately, i didnt understand what the adventage of a property is.
Let's assume, i have a class(Calculator) field:
int num;
Calculator c = new Calculator();
So, what for an advantage do i have if i write:
c.num = 5;
instead o... more >>
Clearing a WebBrowser control
Posted by David Veeneman at 1/26/2007 8:05:27 PM
In .NET 2.0, how do I clear the contents of a web browser control?
I'm using a WebBrowser control in a Windows Form app to display strings
genrated by my application and formatted as HTML--I'm not using it to do any
actual web browsing.
I use 'webBrowser1.DocumentText = myText' to load an ... more >>
C#/Excel automation add-in not working on MediaCenter?
Posted by My interest at 1/26/2007 8:04:41 PM
I have written a simple Excel automation add-in using c#. It works
fine on my WinXP PC, but does not work on my MediaCenter PC. The
sympton is that the add-in is shown in the add-in list but all the
functions are not available (i.e. when you open the function help
dialoug, these functions are ... more >>
Use of unassigned local variable?
Posted by Laura T. at 1/26/2007 5:18:48 PM
In the following example, c# 2.0 compiler says that a3 and ret are used
before assigned.
as far as I can see, definite assignment is made.
If I add
finally
{
ret = true;
a3 = "b3";
}
it compiles OK.
------ example... more >>
I am puzzled by static class use
Posted by intrader at 1/26/2007 4:17:46 PM
The code is:
<code>
namespace ConsoleApp
{
public interface Ivalidator{
String ErrorMessage{get;}
Boolean IsValid{get;}
void Validate(string value,long mask,
long maxLength,string dispName,string sExtra);
}
public class Validator:IValidator{
private String _errorMessage="";
... more >>
IsDecimal or IsNumber
Posted by sloan at 1/26/2007 3:49:50 PM
Does anyone know of a way to check a string... being a Number or Decimal...
~~~without exception handling?
(Exceptional Handling is slow ... and it shows on this one)
Here is the gist...but with crappy ExceptionHandling code.:::::::
private static bool IsDecimal(string theValue)
... more >>
Assembly code in-line with C#
Posted by VBA at 1/26/2007 3:10:00 PM
Hi
Is it possible to add assembly code directly in a C# file?
(MOV AX,BX ....etc)
--
VBA... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
can application have Multiple Main() ??
Posted by chandu at 1/26/2007 2:57:47 PM
Hello,
I had one doubt,please clarify it.
Main is the entry point for the application.
if i had multiple overloaded main methods in my application.
how the compiler recognizes the original Main().????
... more >>
SqlDataAdapter.Fill and DataRow.RowSate
Posted by hharry at 1/26/2007 2:23:40 PM
Hello All,
I use a dataadapter to fill a datatable from a sql server table. The
datatable contains one column ROW_ID which is set as the PrimaryKey.
The sql server table contains a single row and no new rows are added
between refreshes.
I refresh the datatable every 3 minutes using the da... more >>
C# SMTP Mail question
Posted by Jason Huang at 1/26/2007 1:43:51 PM
Hi,
In my C# Windows Form, TcpClient.
I can send mail with this one:
Mail From: Jason@com
Rcpt To: John@com
Data
From:AB
Subject:Topic AB
Test
..
However, this one doesn't work:
Mail From: Jason@com
Rcpt To: John@com
Data
From:A B
Subject:Topic AB
Test
..
The only dif... more >>
OT: Adding a Class to Visual Studio
Posted by Chris Dunaway at 1/26/2007 1:21:26 PM
I run Visual Studio 2005 Professional and when I right click on a
project and choose Add > Class..., it opens the "Add New Item" dialog
where I can pick the item and continue.
I would like it so that if I choose Add > Class, that it actually
adds a class!! If I choose Add > New Item, then... more >>
Access public methods in multple copies of the same form
Posted by Mark Chimes at 1/26/2007 1:20:50 PM
Hi All,
I have multiple copies of the same form open in an app. (These are not MDI
child forms).
I then open a summary form that displays data from each of the previously
open forms.
I have a number of public methods inside the child forms. How do I iterate
thru each child form and run th... more >>
Persistence framework, support for composite key
Posted by Santi at 1/26/2007 1:15:01 PM
Hi all.
I'm looking for a persistence framework for the .Net platform with this
capabilities:
..support for .Net framework 2.0
..composite primary key
..support for strong type collections
Thanks in advance... more >>
creating a custom cursor
Posted by Wilfried Mestdagh at 1/26/2007 12:17:57 PM
Hi,
I'm trying to create a custom cursor with following code:
Bitmap bmp = new Bitmap(@"c:\1.png");
Graphics g = Graphics.FromImage(bmp);
Cursor cursor = new Cursor(bmp.GetHicon());
this.Cursor = cursor;
But I get the exception: "A graphic object cannot be created with an
indexed pixel... more >>
Is there any function to solve the string to values?
Posted by ABC at 1/26/2007 12:08:34 PM
Is there any function to solve the string to values?
for example:
The string is "data source=DEVSRV;Initial Catalog=MyDATABASE;User
ID=sa;Password=;".
I expected the function can return the value of "data source" is DEVSRV,
"Initial Catalog" is MyDatabase, "User ID" is sa, "Password" is... more >>
Copy and Pasting RTF to non RTF supported program
Posted by Grant Smith at 1/26/2007 11:47:56 AM
I've got an application that I can copy some text out of the
RichTextBox control. I would like to keep the formatting so I'm able
to copy it to the Clipboard with RTF formatting. I have no trouble
pasting the formatted text into wordpad (which supports RTF formatting)
but it won't paste into n... more >>
How can I get column numbers from a Winforms dataGrid
Posted by sagenaut NO[at]SPAM yahoo.com at 1/26/2007 11:10:03 AM
I have a dataGrid that is already populated with data. I added a
double click event so when I handle the double click event, I want to
get the total column numbers in that dataGrid. How can I do it?
Thanks in advance.
... more >>
Converting byte[] to string - removing NULLs??
Posted by j.a. harriman at 1/26/2007 11:03:00 AM
Hello,
I've eliminated the bulk of code, this should be sufficient:
byte[] fromEncrypt;
string sDecryptedString;
//Read the data out of the crypto stream.
csDecrypt.Read(fromEncrypt, 0, fromEncrypt.Length);
//At this point in the debugger, I can see there are "trailing" NULLs '\0'
in s... more >>
SSH library
Posted by Kordian at 1/26/2007 10:45:55 AM
Hi,
Is there some1, who tried to write an app to connect to linux over ssh? I
need to automatize administration task and I'd like to do it thanks to C# :)
Regards
Kordiano
... more >>
creating xml document using schema
Posted by Mikus Sleiners at 1/26/2007 10:33:30 AM
I have a task to create xml document from c# code.
I have example of that document should look like and also a xml schema.
I wonder if i can use this xml schema somehow ?
This is schema:
<?xml version="1.0"?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified"
x... more >>
Xml root element attributes
Posted by Mikus Sleiners at 1/26/2007 10:28:44 AM
I want to create xml document that looks like this:
<?xml version="1.0" encoding="utf-16"?>
<Draft xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xsi:type="TravelDraft">
<DraftId>139451de-1bc1-4070-b9d1-548dd4a7f812</DraftId>
<StartDate... more >>
Understanding code-behind and functions.
Posted by Gary at 1/26/2007 9:57:48 AM
Hello,
I am currently new to .NET, as you can probably tell by my last two or three
threads!!!
Anyway, I am using code behind as much as possible - and am curious about
the way in which functions can be triggered.
It seems if I use an <asp:button...> control, I can assign a function whi... more >>
Want to call a custom handler that redirect and receive the http return code (302, 303 or 307)
Posted by ThunderMusic at 1/26/2007 9:37:50 AM
Hi,
I want to use a class (if possible other than Socket) which one I could call
a custom handler and receive the redirect code it sends...
Actually, I tried using the WebClient class, but when the WebClient is
redirected, it does not give the redirect code in the result, it
automaticaly r... more >>
Convert MyTextField.Text to "all caps"
Posted by Gary at 1/26/2007 9:24:42 AM
Hello,
I am trying to force the formatting of a Post Code field on my form, and
require that all post codes are processed as FULL CAPS. I do not want to
force the user to type on all caps, so would like it if onBlur, or onSubmit,
that for example "im1 2ez" becomes "IM1 2EZ".
Any help ap... more >>
C# inheritance broken?
Posted by groups NO[at]SPAM isaacsoft.com at 1/26/2007 9:09:22 AM
C# is an impressive language...but it seems to have one big limitation
that, from a C++ background, seems unacceptable.
Here's the problem:
I have a third-party Document class. (This means I can't change the
Document class.) I want to extend this (inherit from Document) as
MyDocument, add... more >>
C# inheritance broken?
Posted by groups NO[at]SPAM isaacsoft.com at 1/26/2007 9:06:47 AM
C# is an impressive language...but it seems to have one big limitation
that, from a C++ background, seems unacceptable.
Here's the problem:
I have a third-party Document class. (This means I can't change the
Document class.) I want to extend this (inherit from Document) as
MyDocument, add... more >>
C# can't create Window Forms?
Posted by Henk van Winkoop at 1/26/2007 8:53:58 AM
Hello,
I downloaded 'Microsoft Visual C#' and the 'Programmers_Heaven_C_Schom.pdf'
to learn myself C#.
In the PDF it says that to create a Windows Form you need to add the line:
'using System.Windows.Forms'
but this 'using' is not in the auto-selection-list when typing nor is it
recogniz... more >>
Number of members in an Enum
Posted by Jay at 1/26/2007 8:42:39 AM
I have a few enums, a shortened example of one is:
enum ParamTest {Err, Start, Block, Hold}
Is there a programmatic way to find the number of "members" (probably the wrong C# term) of the
Enum - this is 4 for the example given.
One not very good way that I currently use is to add a du... more >>
Can I use typed dataset with Oracle db?
Posted by R at 1/26/2007 8:33:01 AM
If yes, can I use visual studio to create the dataset just like when
connecting to sql and creating dataset?
... more >>
How do I know when my work threads have completed their tasks?
Posted by Pucca at 1/26/2007 8:22:00 AM
Hi, I'm using vs2005 and .net 2.0. I started 2 threadpool threads. How do I
know when they're done with their tasks? Thanks.
ThreadPool.QueueUserWorkItem(new WaitCallback(PopulateContextTable));
ThreadPool.QueueUserWorkItem(new WaitCallback(PopulatAdTable));
--
Thanks.... more >>
FileWatcher
Posted by ba.hons at 1/26/2007 5:27:59 AM
Hello All.
I have a filewatcher object which looks at a shared folder and when a
new XML file is placed in this folder the on create method calls a
method which reads the XML file and based on the content writes a new
XML file to the same directory.
The problem i have is as follows.
If i... more >>
Tertiary Operator Confusion ( a = b ? c : d)
Posted by Andrew Robinson at 1/26/2007 4:11:34 AM
I don't know if this is a compiler error or not. It all kind of makes sense
but you would think that the compiler would check the types of the possible
outcomes of the tertiary operator (c and d) against the type of the variable
being assigned (a). Instead it compares the types of c and d whic... more >>
Changing a variable before the application exits
Posted by Lado.Leskovec NO[at]SPAM gmail.com at 1/26/2007 2:54:23 AM
Hi, I have while loop running, that ends when a certain boolean
variable is set (ClosingProgram). Obviousely I can change that variable
by cliclking a custom button or something, but i would like it to
change also when someone exits the application using the X icon in the
upper right corner.
... more >>
File association
Posted by windsim at 1/26/2007 2:48:00 AM
Hi,
I use Visual Studio Setup and Deployment project to create msi and I have an
installed program version 4.2. Now I have new version 4.3,but I really want
to make two version coexist, that means when you double-click version 4.2's
project file(extension .ws),it will be opened by 4.2. And fo... more >>
Error handling in .net Class Library / Visual Basic
Posted by simonrobshaw NO[at]SPAM gmail.com at 1/26/2007 2:42:10 AM
Hi,
I need some help in making a design choice for a project which we are
currently working on.
My client has a VB6 application which we don't see them actually
changing in the near future.
They are asking us to produce an dll interface component to interface
directly with the vb6 app. Now... more >>
Can someone confirm this :o)
Posted by pigeonrandle at 1/26/2007 1:47:00 AM
Hi,
I have been trying to find an answer, even a hint, but despite posting
the following question on various forums i haven't even had a single
reply for nearly two weeks :o(.
"Why do treeview tooltips flash if the main form has its
transparencykey set?"
Could a couple of people please t... more >>
Local variables, method arguments dump.
Posted by emdzej at 1/26/2007 12:54:54 AM
Hi everyone, I've got short question, but not so obvious to answer I
think. Is it possible to programically dump local variables and method
arguments? It would be very helpfull for sending bug reports for
example. For sure it requires compiling the code in debug mode, but I
have no idea what to ... more >>
|