all groups > c# > may 2005 > threads for monday may 16
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
centralize way of exception handling
Posted by Noor at 5/16/2005 9:59:48 PM
Hi all,
I am trying to catch all types of exceptions from a app regardless of
whether it is in debugger mode( VS development environment) or run the.exe
file outside the IDE.
My App contains the thousand of classes and I do not want to use the Try
Catch block in each class. Because it ... more >>
display the first item in a combobox
Posted by Claudia Fong at 5/16/2005 9:30:13 PM
Hi everyone
I have 6 items "inside" the combobox.
I would like to display the first item (eg 2005) when load the form.
Another items in the combobox are 2004,2003,2002,2001 and 2000.
In VB, I only have to write combobox.listitem(0) in the form load and it
will show me the first item, but... more >>
Windows second instance?
Posted by Josip Orec via .NET 247 at 5/16/2005 8:48:51 PM
How to prevent user to run second copy of application on the same machine? I would like to show dialog "Already run" instead of launching a secound instance.
--------------------------------
From: Josip Orec
-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)
... more >>
data source
Posted by freddy at 5/16/2005 7:45:01 PM
I went to save an access db in the bin folder so I do not have to hard code
it like this:
string sConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=E:\\\\Freddy\\Projects\\vb.net\\Project Track It\\bin\\Project.mdb";... more >>
Problem passing 'this'
Posted by Robert W. at 5/16/2005 7:01:01 PM
I have a data model with this structure:
Class
PropertyA
PropertyB
Collection
Class
Property1
Property2
The outermost class has a handler that correctly deals with events fired by
properties within it (ie. PropertyA, PropertyB, etc.).
The in... more >>
System.Security.SecurityExeption
Posted by Raul Cortes at 5/16/2005 6:19:45 PM
Hi.
I have developed a small c# winforms app, which uses sql.
I deployed the app, by just 'copy & paste' on a shared folder
on my server.
Now, when I try to run the app, from a computer other than the
server, I get an exeption:
System.Security.SecurityExeption
System.Security.Pe... more >>
Dll Path in C#
Posted by Kishore at 5/16/2005 5:37:05 PM
Hi,
I'd like to know how you can get the full pathname of your DLL in C#.
For a Windows application:
Application.StartupPath
can be used, but the DLL does not include the System.Windows.Forms
Namespace.
Thanks,
Kishore.
... more >>
CollectionBase vs Hashtable
Posted by BC at 5/16/2005 5:11:12 PM
Hi all,
Was having a discussion on CollectionBase vs Hashtable with others in
the company. Can someone tell me which one should be use in a certain
situation? Or links that are related to this.
Cheers,
Benny
*** Sent via Developersdex http://www.developersdex.com ***... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
help guys... c# windows form
Posted by mohit_raghav2003 NO[at]SPAM yahoo.com at 5/16/2005 5:03:00 PM
I have have to check if the dynamically created radiobutton is checked
or not.... i am not able to do that at all... i tried to create an
event handler as well but it didnot work....so this is what the
application should do...
create radio buttons dynamically in wizard sheet...
user selects a... more >>
remove new line in constant
Posted by ttan at 5/16/2005 3:56:02 PM
How do I remove new line in constant if I have a string like this
string st1 ="\abc\def";
I use string trim but it doesn't work.
string st2;
for (int i = 0; i<st1.Lenght; i++)
{
st2 = st1.trim("\n".ToCharArray());
}
any idea?
thanks
... more >>
Time based variable
Posted by John Bailo at 5/16/2005 3:31:20 PM
I was thinking: a cool thing would be a time based variable.
So, I'm always doing things like:
(a) Set variable to value
(b) do something
(c) check variable and compare to original.
What I really want is a variable that I can set and say
varible(DateTime.Now) - variable(Ten M... more >>
c# delete directory containing read only files
Posted by gl at 5/16/2005 2:59:14 PM
I'm trying to delete a directory that contains readonly files. Is there any
easy way to do this? I get a System.UnauthorizedAccessException when a read
only file is encountered. Is there a way to make c# ignore a read only flag,
or perhaps set the read only flag for the directory and have it a... more >>
Error - Not All Code Paths Return a Value
Posted by OutdoorGuy at 5/16/2005 2:34:14 PM
Greetings,
I am attempting to compile the code below, but I am receiving an error
message when I do so. The error message is: "CSO161:
'Forloop.CalcAvg(int)': Not all code paths return a value". Any idea as
to what I'm doing wrong? I'm sure it's something simple.
Thanks in advance!
pu... more >>
Why Socket is faster than TcpClient?
Posted by Ricardo Quintanilla at 5/16/2005 1:21:06 PM
i had a problem whom i do not know how to explain.
i was using a TcpClient (System.Net.Sockets.TcpClient) object to send and
receive data to an AS400 socket. Two months ago it started to work slowly,
about 4 seconds between send and receive. In our production environment with
hundreds of tr... more >>
SharpZipLib Help
Posted by phonious NO[at]SPAM gmail.com at 5/16/2005 1:03:18 PM
Could someone help me out with some good sample code in C# using
SharpZipLib. I am a VB guy trying to support a C# app. Any help would
be greatly appreciated.
... more >>
insert DateTime to SQL 2000
Posted by Lam at 5/16/2005 12:20:05 PM
hi
Does anyone know how to insert Date to SQL server 2000?
I used DataTime.Today.ToShortDateString()
it shows up "1/1/1900" in the database
how can I correct that?
also, how can I pull out the date and compare with a new date?
Thanks
... more >>
Triangle indicator of sort order in column header of listview cont
Posted by Steve at 5/16/2005 12:14:14 PM
I have windows form with ListView control. The ListView control has few
columns which user can sort by clicking the column header.
I want the column header have the small triangle indicator of sort order.
How can I implement that?
Thanks... more >>
Late binding asseblies
Posted by tlwright1414 NO[at]SPAM gmail.com at 5/16/2005 12:01:05 PM
I have Assembly A which late binds Assembly B using the following
code...
Assembly b = Assembly.LoadFile(@"C:\dev\B.dll");
object o = b.CreateInstance( "NameSpaceB.ClassB" );
object oEmitObj = Activator.CreateInstance (o.GetType(),false);
object[] args = new object[1]{m_Arg1};
o.GetType().In... more >>
appropriate C# types for SqlDbType.Money and SqlDbType.DateTime?
Posted by jason at 5/16/2005 11:44:46 AM
hello all,
silly question, but i can't find a thread that answers it. i have
stored procedures that have output parameters of the datatypes Money
and DateTime.
i have the following sample code to extract those parameters into class
properties:
public float P1 = (float) oSqlCmd.Parameters... more >>
How to run the C# splash screen.
Posted by BillZondlo at 5/16/2005 10:33:01 AM
After studying the article by Tom Clement "A Pretty Good Splash Screen in C#".
I downloaded the code demo.
From my IDE I can't run the demo without an error saying that I need to add
a non-library project to this solution, and if I bulid it, it creates a .dll
in the dgug folder.
I've tried fi... more >>
UNC, ftp, FileSystemWatcher
Posted by John Bailo at 5/16/2005 10:22:06 AM
I've posted parts of problems in other posts, but I thought I'd
consolidate my questions because I still don't have a solution.
Problem:
I want to use the creation of a file on a remote ftp site (running Unix)
as a trigger for other processes to start.
Platform:
Windows 2000 se... more >>
Bin folder
Posted by freddy at 5/16/2005 9:24:03 AM
I would like to put an access db in the bin folder and not hard code it.
Code: <-- I would like to do this:( when I try it, it does not work)
string sConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=Project.mdb";
Instead of this:, <--this work fine
string sConnString = "Provider=... more >>
Import XML data into Sybase table
Posted by RajS at 5/16/2005 8:34:58 AM
Hi All,
I am trying to write a c# app to import XML data file into sybase table.
Please suggest me some example or sample app or any website.
Thanks a lot,
--
-RajS... more >>
file not found error with C# dll
Posted by jason at 5/16/2005 7:31:36 AM
i have written a C# class library dll. it compiles fine, and i copy the
resulting output file (mylibrary.dll) from the Visual Studio debug
folder to another folder on the same machine ("c:\libraries")
then i go into the COM+ MMC and add a new COM+ application
("myapplication") and add new comp... more >>
PROBLEM MOVING FILE POINTER
Posted by Arif at 5/16/2005 7:04:02 AM
Following are my text file(IndxItms.txt) contents:
---------------------------------------------------
0000 0
0002 52
0020 260
0045 312
0051 364
0087 416
my C# code:
----------
StreamWriter sr_IndxItms = File.OpenText("\\My Documents\\IndxItms.txt");
MessageBox.Show(this.sr_IndxItms... more >>
DataGridView
Posted by Brian Keating at 5/16/2005 6:53:14 AM
hello there,
this is my first time playing with the DataGridView control.
What I have is an array of integers and i would like them displayed in the
grid.
I would like to have the row headers numbered.
What is the best approach?
Should I try databind?
Is there a property for numbered row ... more >>
How to apply a different color then the system color to the main f
Posted by udir at 5/16/2005 6:47:32 AM
Thanks, Udi Raz... more >>
DB Connection
Posted by Brian W at 5/16/2005 5:47:47 AM
I'm posting here hopeing some here has delt with a similar problem and
has a suggestion for a fix.
If anyone knows the answer to this I’d me greatly appreciative.
I am not on a domain.
I have SQL Server sitting on computer A
Computer A has:
Windows XP SP2
SQL Server 2000 SP3a
... more >>
Creat Access DB file!
Posted by Zamolxe at 5/16/2005 3:07:45 AM
In my application I need to creat a new Access DB file and insert into
it some tables bla bla... but,
the insertion part is easy the createing of the file is not known so
how can I create an Access db file\?
... more >>
Reading data of COM-port
Posted by Mark at 5/16/2005 2:38:02 AM
With the GetByte command I am reading a certeain amount of data of the
COM-port. The problem is that I do not know the amount of data.
And the GetByte command waits until it has received a byte, so there is a
problem when there is no data coming from the COM-port.
Has anyone a suggestion ho... more >>
unhandled AV using webBrowser
Posted by Wilfried Mestdagh at 5/16/2005 2:05:01 AM
Hi,
I use VS 2005 beta2. On existing project I added a new form with a
webBrowser on it. When the webbrowser is used then at shutdown time of my
application I have unhandled AV,: Attempted to read or write protected
memory. This is often an indication that other memory is corrupt.
The de... more >>
Form problem with ActiveX DLL called from C#
Posted by ataozcelik NO[at]SPAM uekae.tubitak.gov.tr at 5/16/2005 1:28:42 AM
Hi i am developing a Windows.Forms Application and I am using an
ActiveX dll built in C++.
I define a delegate for the eventhandler built in the DLL and using a
method that is bound to it. My main form is waiting for the event to
be occur. The problem is in the method that is bound to the delega... more >>
how to validate an xml file against xsd in whidbey
Posted by Ravi at 5/16/2005 12:37:23 AM
Hi,
i was using xmlvalidatingreader in .NET 1.1, but i was trying to do the
same validation in whidbey i am getting this error
Warning 11 'System.Xml.XmlValidatingReader' is obsolete: 'Use XmlReader
created by XmlReader.Create() method using appropriate XmlReaderSettings
instead. http:... more >>
How to retrun a character with ascii code
Posted by ad at 5/16/2005 12:00:00 AM
How to retrun a character with ascii code?
It is useChr(65) return 'A' in VB.NET.
What is the equivalent function in C#?
... more >>
CPU usage 100%
Posted by John at 5/16/2005 12:00:00 AM
Hi!
While working in c# after say 10 minutes , the CPU usage increases to 100%
and the framework ide hangs for a couple of minutes.
The CPU usage touches hundred as soon as I switch between Design view and
code view.
I have Win XP SP2.
Any solutions?
... more >>
Dump of C# app possible using ADPlus (Repost - first one didn't show up)
Posted by Adam Benson at 5/16/2005 12:00:00 AM
Hi,
Apologies if this is the wrong newsgroup.
Is it possible to produce a dump of an app (say using ADPlus -hang -pn
app.exe) ?
I've installed all the symbols, used ADPlus on a simple .NET app to generate
a dump and then loaded the dump file into VS.NET.
And I just get gobbledegook. I can ... more >>
How to build moveable toolbar?
Posted by Galaxia at 5/16/2005 12:00:00 AM
SGksDQoNCkknbSB1c2luZyBDIyBpbiBWUyAuTmV0IDIwMDMuIEhvdyBjYW4gSSBidWlsZCBtb3Zh
YmxlIHRvb2xiYXJzIGFzIHRoYXQgaW4gVlMgSURFLCBkcmFnZ2luZyBhbmQgYXJyYW5naW5nIHRo
ZW0/ICBNb3JlLCBob3cgY2FuIHRoZSBtb3ZlYWJsZSB0b29sYmFyIGJlIHB1dCBpbnRvIHRoZSBz
YW1lIGxpbmUgb2YgTWVudSwgYXMgdGhhdCBpbiBJRS4NCg0KQ2FuIGFueW9uZSBpbn... more >>
Closing a Form
Posted by Eric W at 5/16/2005 12:00:00 AM
I have two forms.
Form1 and Form2
I want to be able to click a button on Form1 that will allow me to open
Form2 and then close Form1. Is this possible ?
My code isn't working, can anyone tell me what I'm doing wrong ?
Form f = new Form2();
f.Show();
this.Close();
... more >>
How can we get the URL of the opened site in current instance of IE
Posted by Saish at 5/16/2005 12:00:00 AM
hi
all
i am dealing wth a peoject in which we have to deal with URL of the
curretnly opened IE in c#.
Suppose first i opened a site in IE , next i opened another site in IE and i
opened third site in IE.
Now i need to get the URL of the third site i.e currently opened web page.
This is nothin... more >>
grid.CheckedBox
Posted by Hrvoje Voda at 5/16/2005 12:00:00 AM
I have this code for searching through grid and putting a result into
another grid where I defined a checkBox.
Line with mark * is where I need to define where in gridGroups row I have to
put a checkBoxValue = true.
void ColumnDrawGroupsChecked (
Syncfusion.Windows.Forms.Grid.GridStyleI... more >>
C3 XML Question
Posted by Asim Qazi at 5/16/2005 12:00:00 AM
Hi All,
i m trying to Edit a Node which is CDATA, here is the code.
XE.Load(fileName);
XmlNode xIpLessDomainIP =
xWebServerRole.SelectSingleNode("//data/info[@name='ipless-domain-ip']");
xIpLessDomainIP.InnerText = "TestIPTest";
XE is a object of XMLDocument, it runs successfully but... more >>
Identifing Deprecated Functions via reflection
Posted by Rich Noons at 5/16/2005 12:00:00 AM
Hi,
I'm trying to recognise whether a function is deprecated or not when
reflecting a method.
eg.
[Obsolete ("This function will error",true)]
or
[Obsolete]
Am I right in saying that the attributes value
(System.Reflection.MethodAttributes) is 6278? - is this a safe assumption?,
... more >>
download a file in C3 throught php rederection
Posted by Octavio Filipe at 5/16/2005 12:00:00 AM
Hi there,
I'm trying to download a file, but i don't have the real link, i only
have a php page that redirects me to the real link...
I'm using
webClient.DownloadFile(DOWNLOAD_URL,"c:\\temp\\");
and I'm copying headers (just in case the server verifies then).
But still it doesn't work!
... more >>
Inherit from a ComboBox control
Posted by Spurry Moses at 5/16/2005 12:00:00 AM
Hi,
I'm converting a project from C++Builder to C# and I just need to copy my
class design across. It's looking good so far. To stick with the design I
want to inherit from a ComboBox control (ie MyComboBox). I don't need to
do anything flash with it, just add a few properties and method... more >>
Workflow's Problem
Posted by ÀîÓÂç÷ at 5/16/2005 12:00:00 AM
i do a thing to make a Workflow Control,How about that ?
... more >>
|