all groups > c# > june 2005 > threads for thursday june 2
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
Regular Expression Help
Posted by Dan at 6/2/2005 10:25:55 PM
Hi. I'm new to regular expressions, and have what I hope is a basic
question.
In the file that my code is parsing, some lines may look like
:name:colour
:name:colour
and some lines may just have
:name
Note that the name and colour would actually be a name and a colour - not
the te... more >>
Initialize variable in declaration or constructor?
Posted by User N at 6/2/2005 10:25:43 PM
In cases where a variable can be initialized in the declaration or
constructor, which approach do you take? Are there any genuine
advantages to one approach over the other?
Example:
public class foo
{
private int maxItems = 5;
private ArrayList items = new ArrayList();
p... more >>
Developing for Visual Studio.NET in C#
Posted by The Jammer at 6/2/2005 9:29:11 PM
Can anyone point me in a direction for developing apps that integrate
into Visual Studio.NET? I would like to build my own designers, and
tools bars, etc..
Thanks in advance,
Marty... more >>
XmlTextReader and DTD files
Posted by Jason (Kusanagihk) at 6/2/2005 9:12:18 PM
To all,
I've tried to write a program to parse / read the contents of an XML
file. Now if the xml file has no DTD references; it seems to be ok (can
parse and get values from the tags); but when the xml file has a DTD
reference an exception pop out saying invalid Text declaration.... (the
err... more >>
Easy Syntax Question
Posted by Terry McNamee at 6/2/2005 8:03:27 PM
return arr.Length == 0 ? null : arr[item].ToString();
Can anyone tell me what this syntax means?
Does it basically mean if arr.Length is equal to 0 then return null, else
return the item in the array ??
... more >>
smooth with c#
Posted by AylĂn Parra at 6/2/2005 6:04:30 PM
Hi, I need to know how to make smoothes to images with c#. An image with
littlies cubes, make the curves more soft.
*** Sent via Developersdex http://www.developersdex.com ***... more >>
Is there a known TabIndex bug?
Posted by Robert W. at 6/2/2005 5:25:15 PM
I'm preparing a form with some controls laid out at design time and some
controls added dynamically at run time. During the latter I programatically
set the TabIndex of these new controls so that the tab order will flow like I
want.
But my settings seem to have no effect.
Is this a know... more >>
GAC
Posted by A.M at 6/2/2005 5:08:17 PM
Hi,
I have a assembly in GAC that I don't have the source code and I need to
have the actual DLL. How can I copy that DLL from GAC?
Thanks,
Alan
... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Interface
Posted by DBC User at 6/2/2005 4:05:18 PM
Hi All,
I have a simple beginer question. What is the real use of interface in
c#. I am not getting the use of it.
I can declare a class as interface and declare all the methods that
need to be implemented. 'Now if you want to use the interface', put
them as a derived class and implement al... more >>
ToAscii function
Posted by Michael at 6/2/2005 2:46:18 PM
Hi,
I want to get a char from a virtual key, and if SHIFT key or Alt Gr key is
pressed get the char corresponding ( the char in upper case for virtual keys
between a and z).
I saw the ToAscii API function, and use it, but always ignore SHIFT key. I
thought that with the KeyboardState param read... more >>
Windows Authentication problems
Posted by Lalasa at 6/2/2005 2:09:35 PM
Hi,
In my Console Application, I am accessing sql server using windows
authentication and I get this error.
Login failed for user '(null)'. Reason: Not associated with a trusted
SQL Server connection.
How to fix this on sql server side?
Thanks,
Lalasa.
... more >>
DataGrid Row Headers
Posted by wschlichtman at 6/2/2005 12:59:10 PM
Is there a way to add numbering to the rows in a DataGrid control? I just
want to have 1, 2, 3... show up for each row so the user can see how many
items they've entered.... more >>
What are some design patterns that can be used with a tree control?
Posted by D at 6/2/2005 12:34:23 PM
Lets say we have a tree control with a user as the root node with child
nodes that represent test sets they subscribe to (which map directly to sql
tables) and related reports (sql stored procedures returning data viewed in
a datagrid)
list so
User
|___TestSet1
|_____Re... more >>
private field v.s. parameter
Posted by JSheble at 6/2/2005 12:06:11 PM
I have a class I'm writing that has aprox 20 methods, a mixture of both
public and private. Of the private methods, 3 use a database command object
(OleDbCommand) for either inserting data or selecting data. AM I better off
making the OleDbCommand object a private field to the class, or pass... more >>
How to use createDocumentFromUrl()?
Posted by Brett at 6/2/2005 11:58:46 AM
I'm having problems trying to get HTML content from a website.
object WebpageContent;
mshtml.HTMLDocument MSHTMLobj = new mshtml.HTMLDocument();
WebpageContent = MSHTMLobj.createDocumentFromUrl(http://www.microsoft.com,
"");
I get this error:
The server threw an exception.
I have also ... more >>
Double click on DataGrid
Posted by Lalit Bhatia at 6/2/2005 11:37:04 AM
Hi
when focus is on a cell in datagrid. double click event does not occur.
when I double click on rowheader, columnheader then this event fires.
I am using DataGridTableStyle in the grid.
--
Regards,
Lalit Bhatia
... more >>
How to sign a strong name to Interop.SourceSafeTypeLib.dll?
Posted by Andrew at 6/2/2005 11:37:02 AM
Hello, friends,
I wonder how can I sign Interop.SourceSafeTypeLib.dll a strong name and
reference it from my own dll? (I am using C#.net).
(Interop.SourceSafeTypeLib.dll is automaticall generated when I reference
VSS COM component in my own dll C#.net project)
Thanks.... more >>
Need to find a way to call a function from my submit button
Posted by Chumley Walrus at 6/2/2005 11:27:39 AM
I have a function that is sending a value via querystring to another
page by hitting a submit button:
private void btnSubmit_Click(object sender, System.EventArgs e)
{
Response.Redirect("destination.aspx?txtstuff=" +
this.txtstuff.Text);
}
I'm just not sure how to config the submit button... more >>
Editor grayed out in PropertyGrid
Posted by Steve Teeples at 6/2/2005 11:27:02 AM
I have class that also uses a custom editor that, when compiled directly into
my project, works just fine in a propertygrid. However, it was necessary to
place that class into a DLL, hense the editor was also moved into the DLL and
compiled. The issue I have is the the editor is now inactive... more >>
Permission to write to local disk on a Webservice...
Posted by Raul Cortes at 6/2/2005 11:24:24 AM
I have been developing winforms for a while.
I had an app, that downlods exchange rates from an html page from a website,
creating a dataset, and then writing the xml to the local drive.
Basically, when I need an old exchange rate, I already have it on my
dataset,
and whenever there is a new... more >>
Multiple instances of FileSystemWatcher ??????
Posted by David at 6/2/2005 11:20:00 AM
I have been working on trying to write a directory watcher service.
One of the requirments is that it be able to watch multiple
directories, not sub directories of one parent directory, but just
multiple directories.
I have hit a snag and don't know how to get around it.
Basically I read in... more >>
Mysterious JavaScript
Posted by Tim Cowan at 6/2/2005 10:40:49 AM
Hi There,
I am trying to track down a bizzare problem; It seems that the run time is
inserting some JS at the top of the page.
<script language=javascript>
alert('Specified argument was out of the range of valid values.
Parameter name: 13');
</script>
Does anybody know where this is co... more >>
using a web service as an smtp mailer?
Posted by Elhanan at 6/2/2005 10:36:01 AM
hi..
our company does not allow each server to send mail to outside
destinations
each server's ip must be configured in exchange to do.
inorder to avoid that, we want to create a web service on a single
server, have it email everything,
is it advisible?
... more >>
TreeView performance
Posted by Joe at 6/2/2005 10:15:00 AM
I'm loading a TreeView with ~8900 root nodes and only a couple of child
nodes giving a total of 8910 nodes.
It takes several seconds for the tree to display. The method that populates
the tree returns in < .5 seconds.
Populating the tree in the Load event takes even longer than clicking a ... more >>
Page Reload After Back Button - Submit Form Twice
Posted by Frawls at 6/2/2005 9:54:40 AM
Hi
Can any one give me some help with this problem please?
Here is the scenario:
A user submits page 1 which is a web form.
After the form has been submitted they are (redirected) onto the next
page, page 2.
The user then clicks back on the browser.
They are now back in page 1
... more >>
Number of characters per line of code
Posted by Brian Gideon at 6/2/2005 9:47:30 AM
All,
I want to know how others deal with long lines of code. Do you care?
If so, what rule(s) do you follow? Is it important to you how it looks
on printed paper or displayed on the screen? Being able to keep all of
the code on the screen without scrolling horizontally is important to
me, ... more >>
ALways Initializing Objects
Posted by JSheble at 6/2/2005 9:29:19 AM
I'm writing some code that interacts with MSMQ, and am getting in the habit
of using try{}catch{}finally{} blocks, but am now running into a problem
with un-initialized variables... for example, consider the following method:
private void GetQMessage()
{
System.Messaging.Message oMsg;
Sy... more >>
MCSD Solution Architecture exam
Posted by Mark at 6/2/2005 8:40:29 AM
I've taken 4 of 5 exams to get my MCSD. My last exam is the Solution
Architecture exam. At least in my experience, I've been surprised at how
different the difficultly level *felt* between the different exams. 1/2 way
through the web services exam, I thought I had failed (I squeaked it out)... more >>
TreeView Navigation
Posted by Zamolxe at 6/2/2005 8:10:03 AM
I have a TreeView on my app and I want to use the arrows to navigate in
it but every time i click on one of the nodes and then press an arrow
the TreeView losses focus and I am forced to click him again how can I
resolve this?
THX
... more >>
Serialization in Inherited Classes ?
Posted by tony lock at 6/2/2005 7:36:09 AM
I have a class inherited from Control, which I want to serialize, since
Control is not Serializable, I have had to implement ISerializable. This
works but I now want to inherit this base class into a number of other
classes, I was assuming that I could just mark them as [Serializable] and use ... more >>
StackFrame class
Posted by scottrm at 6/2/2005 7:22:07 AM
I am using StackFrame class to retrieve File Name and File Line number for
printing out into the debug file.
Everything is working under Debug build. However StackFrame doesn't capture
File Name and File Line Info in release build.
Is there anyway or any class which can be used as an alter... more >>
exception when calling an oracle function
Posted by Newbie at 6/2/2005 6:49:03 AM
i'm getting the exception:
Parameter 'p1': No size set for variable length data type: String.
my code follows:
OracleCommand cmd = new OracleCommand();
cmd.Connection = oraConn;
cmd.CommandText = "ops$sqltime.pa_new_job_no_fn";
cmd.CommandType = CommandType.StoredProcedure;
Orac... more >>
how to show existing form
Posted by turin78 NO[at]SPAM mail.ru at 6/2/2005 6:46:07 AM
Hi people.
I have a question - how to show existnig form?
I create two forms: Form1 and Form2 in designer. I place a button on
Form1 and I want to call a Form2 (better in modal mode!).
It's simple to show NEW form:
Form Form2 = new Form();
Form2.Show();
but i want to call a form I des... more >>
databinding for multiple comboboxes
Posted by Kevin at 6/2/2005 6:38:02 AM
I have a 4 tab form each with different dataviews attached to a datagrid. On
the last tab, I have a dataview attached to a datagrid and 2 comboxes that
are bound to the same dataset representing 2 different columns in the dv.
When I create cbSecond.BindingContext = new BindingContext(); the... more >>
String performance optimization
Posted by Dale at 6/2/2005 6:18:02 AM
A year or two ago, I read an article on Microsoft's MSDN or Patterns and
Practices site about application optimization when using strings. Some of
the recommendations were:
use string.Empty rather than "",
use string.Compare rather than myString == myOtherString,
etc., etc.
I have been ... more >>
Copying array elements
Posted by dwight at 6/2/2005 6:10:03 AM
In working with excel, you use an object array inputData[,] to get and set
data.
If I have an object array defined as object[] rowData and it gets populated
with 53 elements, can I do the following:
inputData[0,0] = inputRow;
When looking at the debugger, inputData does get the valu... more >>
SmtpClient and user rights
Posted by leanerOfThat at 6/2/2005 6:07:25 AM
Hello,
I am working on a Windows application in .NET 2.0 that will send
emails. I have removed my account from the administrator group to put
it in the user group. When I run my application and try to send an
email, I get a time out exception. When I run my application as an
administrator, the ... more >>
Whay Does KeyDown event not cancel a key stroke
Posted by orekinbck NO[at]SPAM yahoo.com.au at 6/2/2005 5:39:55 AM
Hi There
In C# windows app, .NET 2003 I have a text box with the following event
handler:
private void textBox3_KeyDown(object sender,
System.Windows.Forms.KeyEventArgs e)
{
if (e.KeyCode == Keys.A)
e.Handled = true;
}
I would expect that the text box would not let me type a but ... more >>
Window Proc
Posted by Just close your eyes and see at 6/2/2005 4:04:02 AM
Kindly i want to know how to use window proc from within C# Application
is there any tutorial or somebody can help me in doing this... more >>
Key Down Event in Text Box
Posted by orekinbck NO[at]SPAM yahoo.com.au at 6/2/2005 3:58:03 AM
Hi
How do I catch a SHIFT TAB in the key down event of a text box?
Thanks
Bill
... more >>
comboBox (properties)
Posted by Claudia Fong at 6/2/2005 2:34:35 AM
Hi,
I would like to know if I can set a combobox properties to read-only, I
mean, usually the user can delete the items in the comboBox, but I don't
want to let the user do that.
In textbox properties, if I set to read-only, the user can't delete the
contents of the textbox.
Chee... more >>
How to capture SHIFT + TAB in C# form
Posted by orekinbck NO[at]SPAM yahoo.com.au at 6/2/2005 2:21:21 AM
Hi There
In a C# windows app in .NET 2003, I would like to capture when the user
is within a certain text box and holds down shift then presses tab.
Atm, my code is:
protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
{
const int WM_KEYDOWN = 0x100;
const int WM_SYS... more >>
Import Class from API
Posted by [Yosi] at 6/2/2005 1:04:02 AM
I have an API (*.DLL) written with C/C++ language, I successfully import the
functions from C# application by :
[Imprt....]
static extern ................
Now:
How can I do the same with Class? How to import an class from API
written with C++ language to C# (My application).
... more >>
Image Save Error
Posted by Barry at 6/2/2005 12:44:14 AM
Hi
Does anyone know why i am getting the following error message (line 64)
, if i change to objBitmap.Save(Response.OutputStream, ImageFormat.Jpeg) i
do not get this error
Exception Details: System.Runtime.InteropServices.ExternalException: A
generic error occurred in GDI+.
Source... more >>
Visual C# & codebehind
Posted by Tony at 6/2/2005 12:43:04 AM
Just wondering about something - I'm relatively new to C# & not quite sure
about a few things...
I've created a "breakout" style game in Visual C#. I have also made a small
web application using VB with aspx pages - basically scripting them like a
regular ASP page or a PHP page.
I have r... more >>
Simple question: ImageList with icons from resources
Posted by Jan Schustr at 6/2/2005 12:17:32 AM
Hi All,
i have a stupid question, but I really don't know How can I do it. I want
use icons for treeview from resources, but I don't know , How can I load it
from resources to ImageList.
Can anybody help me?
Thaks Jan ... more >>
Windows Messages....
Posted by GTi at 6/2/2005 12:00:00 AM
I need to get access to the Windows Messages queue (WM_xxx)
I have a old C application that sends some messages to all windows
on the computer. How can my new C# application receive this message?
... more >>
Convert Fortran to C#
Posted by David Dvali at 6/2/2005 12:00:00 AM
Hello.
I have one small program which I need to convert in C#.
The original source codes are written in Fortran 77.
Can anybody advice me what is the easy way to do this task?
Or may be there is some tools for it?
Thank you.
... more >>
Create EventHandler
Posted by Steve Lloyd at 6/2/2005 12:00:00 AM
This is a really lame question but.... I have a datagrid and I want to
create the event and the signature for a ItemCommand, if i double click the
datagrid it creates the SelectedIndexChanged handler, but how can i create
the ItemCommand without manually adding the event handler and the routin... more >>
How to check the validity of an email address in exchange server?
Posted by ywchan at 6/2/2005 12:00:00 AM
I want to verify whether the email input by user exists in the exchange
server. How to do that? Any replies / reference provided are greatly
appreciated. Thanks!
... more >>
How to deal with this Exception : System.InvalidCastException: Ö¸¶¨µÄת»»ÎÞЧ¡£
Posted by DogEye at 6/2/2005 12:00:00 AM
The page always throw the InvalidCastException When i do some conversion .
and tell me that "System.InvalidCastException: Ö¸¶¨µÄת»»ÎÞЧ" , how to deal
with this problem ?
Thanks !
... more >>
Timer
Posted by Saurabh Sharma at 6/2/2005 12:00:00 AM
Hi
I am using a Timer in the code. When ever the event elapses i populate a
datagrid. Without timer it was working okay but i need timer coz of some
constraints.
After using timer whenever datagrid populates it makes a horizontal
scrollbar just above already existing scrollbar and also w... more >>
Create dynamically in C# a subsite www.subsite.mysite.com
Posted by Olivier Verdin at 6/2/2005 12:00:00 AM
Hi,
Would it be possible to create dynamically in C# a subsite
www.subsite.mysite.com?
This address should point to an aspx page, let say
www.mysite.com/product/subsite.aspx?id=5
Thanks for your help,
Olivier
... more >>
Create forms from threads
Posted by Kevin Chabot at 6/2/2005 12:00:00 AM
Hi,
I need to be able to create one or more form(s) from a method that is
called from different threads. When this form is created, it appears but
it does not receive any message. It looks blank, and when you move your
cursor over it, it becomes an hourglass.
Can anyone help me with this... more >>
Increasing the stack size???
Posted by Darryn at 6/2/2005 12:00:00 AM
Hi
Please help...
i am running an application where one of my data validation funtions linked
to a Dataset event ColumnChanging keeps throwing a StackOverflowException!!!
My code is fine, i just have a deep method/function call going on.... how
can i increase the stack from it's default siz... more >>
c# unicode question
Posted by Yang,Jun at 6/2/2005 12:00:00 AM
--
Hi,all
if i wirte
string str =
"\u6570\u636e\u5e93\u64cd\u4f5c\u95ee\u9898\uff0c\u8bf7\u60a8\u91cd\u65b0\u7
67b\u5f55\uff01";
dotNet can recognize as unicode ,and when i console.write() it , it can
show right chinese words.
but if i read this sentence from TextBox,... more >>
Selecting Row in second data grid
Posted by Lalit Bhatia at 6/2/2005 12:00:00 AM
how can I select a row in one datagrid when a row is selected in another
grid by clicking on row header?
--
Regards,
Lalit Bhatia
... more >>
not CLS-complaint
Posted by Oscar Thornell at 6/2/2005 12:00:00 AM
Hi!
I have a strongly typed dataset based on a db (SQL Server)...
One of the tables contains a column with name: ISO-3166-A2 and data type
nchar(2)...
The generated code (xsd.exe) in the dataset looks like this:
public string _ISO_3166_A2 {
....
}
VS.NET 2003 identifies this as an e... more >>
Accessing multiple values in a list box
Posted by Vivek Sharma at 6/2/2005 12:00:00 AM
Hi,
I am using a listbox in a web user control with selection mode as
"Multiple". I am not sure how can I access the multiple selected values in
my aspx form.
Please help.
THanks
... more >>
|