all groups > c# > july 2007 > threads for wednesday july 25
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
Software protection by system time.
Posted by Boki at 7/25/2007 11:33:20 PM
Hi All,
In order to implement a timer calculation ( to calculate how long does
the user has used this program since first time )
{
long CurrTime = DateTime.Now.Ticks;
textBox1.Text = CurrTime.ToString();
if ((CurrTime - FirstStartTime) > 10 * 10000000)... more >>
Running application GUI disappears
Posted by hermbagger NO[at]SPAM gmail.com at 7/25/2007 11:29:18 PM
I wrote a windows application in C# (using visual studio 2003) which
I
am running as an executable on a Windows Server 2003 machine. The
application runs smoothly for days. Then out of nowhere, the GUI
diappears and there is no way that I can get back to the GUI. If I
look at the Task Manage... more >>
Using ActiveX Control
Posted by Remote_User at 7/25/2007 11:03:46 PM
Hi,
I am using C# as the code-behing language in ASP.NET and trying to
put in ActiveX control in the web page.
Could you provide me a suggestion on this as good start up ?
Trying to get familiar with ActiveX controls.
... more >>
DELPHI C# socket communication
Posted by Hafiz321 at 7/25/2007 9:36:34 PM
We have created a program in C#. This is server program. We have also
created a client program written in DELPHI which is sending continous
request to server program.
We have used tcpListener.AcceptTcpClient() method to return
TcpClient object to connect with CLIENT APPLICATION.
After... more >>
Generics and general purpose helpers
Posted by Jeff Jarrell at 7/25/2007 9:27:04 PM
I am working with Winforms and writing some general purpose helpers for use
with a 3rd party grid (devexpress).
I have been using BindingList<T> to bind to the grid. At some point I need
to get the object stored at the Nth index of the list.
The intent is something like the following...
... more >>
Help with Regex (UserName, Email)
Posted by rolinson NO[at]SPAM gmail.com at 7/25/2007 7:09:31 PM
Hello!
Help with Regex, Thanks in avance!
1=2E Validation of Name
Enable ALL keys on keyboard EXCEPT 0, 1, 2........., 9
Change to uppercase of 1st alphabet of every word and lowercase for
the rest of the word.
Example: aDa AdA 12DDD 12ddd dd12dd =A8=A4 Ada Ada 12Ddd 12Ddd Dd12dd
... more >>
what happens if Thread.Abort() is called during a catch() block ?
Posted by andrew at 7/25/2007 6:37:10 PM
what happens with the code from the catch block ?
is it interrupted by the ThreadAbortException ?
void ThreadProc( )
{
try
{
}
catch(Exception ex)
{
// thread.Abort() from another thread on this thread is called
at this moment
}
}
... more >>
The type or namespace name 'AddNewProduct' could not be found (are you missing a
Posted by CdnRebel via DotNetMonster.com at 7/25/2007 6:25:30 PM
Hi,
For my own peace of mind, I am trying to finish off a website which uses ASP.
Net and C# and I am trying to get the C# programs to compile with Visual
Studio 2005. I think the errors are related to the conversion from an older
version of ASP.Net. I am new to everything and I am getting t... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
embedding CRLF
Posted by John Grandy at 7/25/2007 5:50:17 PM
I am not having success embedding carriage return and line feed characters
into a string and displaying them with an ASP.NET label. Is anyone getting
either of the following to work ?
StringBuilder message = new StringBuilder();
message.Append("Line 1");
message.Append("\r\n");
message.Ap... more >>
Why is this code causing errors saying the file is in use by another process?
Posted by Mike Cain at 7/25/2007 5:31:50 PM
I'm writing a Windows service using C# (VS.NET 2005, .NET framework 2.0)
that downloads a binary file from the web once every 15 minutes.The first
time it downloads the file it works great. However for some reason it is not
closing/releasing the file completely. So in subsequent attempts my co... more >>
Hittest on trackBar - to set pointer to clicked position
Posted by Piotrekk at 7/25/2007 5:09:28 PM
Hi.
I have a trackbar. I need to set trackbar value depending on where
user has clicked on the bar ( mouse_up event for example ). However
avent arguments are telling me only about x and y position and so
on... If i had hittest method i could try to work it out... Maybe you
will know how to do ... more >>
Runtime Validation
Posted by brandonjack007 NO[at]SPAM gmail.com at 7/25/2007 4:26:37 PM
I have a webcontrol that extends from System.Web.UI.WebControls.
WebControl. It has 3 drop downlists for day, month, year. The day,
month, year then form the property called SelectedDate. The control
also has properties for MinimumDate , MaximumDate. During design time
while seting property I ha... more >>
serial port DTR/DSR handshaking with system.io.ports
Posted by Bandu at 7/25/2007 4:12:38 PM
hi,
i'm using serial port functionality provided by .net framework 2.0
using system.io.ports.
Is there anyway that i can set DTR/DSR handshaking?
Regards,
Bandu
... more >>
trying to transfer files to a PDA
Posted by DanielGifford NO[at]SPAM gmail.com at 7/25/2007 3:33:13 PM
Hi-
I'm trying to transfer files directly to a PDA via a Csharp program
I'm writing. Does anyone know how to do this (I obviously can't use
active sync).
Ohh yes, I'm running Vista.
-Thanks
-Dan
... more >>
writing in app.config
Posted by sam at 7/25/2007 3:13:37 PM
Hi,
I use string sValue = ConfigurationManager.AppSettings["MyKey"] for reading
a value in my app.config, section AppSettings.
Ho to write in it for example to create a key and assign a value like this ?
ConfigurationManager.AppSettings["ANewKey"]="my value in app.config";
Thanks for help.... more >>
Opening Outlook address book
Posted by Alexander Szigetvary at 7/25/2007 2:29:21 PM
Hi NG!
Is there a way to open the Outlook address book dialog (as in Outlook) using
C#? I am using Outlook 2003 (MS Outlook 11.0 Object Library).
In Outlook 2007 it can be done with SenderNameDialog. I need to support both
versions.
Any hints?
TIA
Alex
... more >>
Dispose Generic List
Posted by Radenko Zec at 7/25/2007 1:46:49 PM
I have filled generic list with data on one form.
When I close form generic list stay in memory waiting GC to collect.
I want to implement code on form close to dispose generic list.
... more >>
Prevalence of Singleton
Posted by Bob Johnson at 7/25/2007 12:56:53 PM
Just wondering the extent to which some of you are implementing classes as
Singletons. I'm working on a brand new project and, early on, identified
some obvious candidates. By "obvoius candidates" I mean classes for which
terrible problems would clearly arise if more than one instance were to ... more >>
Which class for Telnet
Posted by Eran.Yasso NO[at]SPAM gmail.com at 7/25/2007 12:42:57 PM
Hi all,
I need to write app for telnet client.
I saw that there's the Socket class. the point is that I need to
implement the protocol.
Is there other way\class that I can do it with no need to implement
the protocol?
thanks,
... more >>
GDI+: DoubleBuffer makes my animation slower
Posted by hstagni at 7/25/2007 12:07:40 PM
I am begining to code C#... and I am trying to make a ball moving at
the screen.(Actually I was trying to make a pong but first I want to
make a ball moving at screen)
I did it and it worked well, but the ball is blinking while moving. I
tried to put the following lines of code inside my Form'... more >>
datagridview column names
Posted by Bill Cart at 7/25/2007 11:51:45 AM
I have a datagridview that was created by dragging an SQL stored procedure
onto the form. The SQL query has fields for Monday, Tuesday, etc.
I am trying to set some of the values with the DefaultValuesNeeded event.
When I right click on the control and select Edit Columns I can see a column
... more >>
structs in C#
Posted by Vinki at 7/25/2007 11:28:01 AM
Hello Everyone,
I have a huge string and I want to get just part of the string and pass it
in my stored proc. I am trying to do it through a structure. I am not sure if
this is the best way and right way to do it.
Below is the sample code
String x = "This is a test. Test done by xyz"... more >>
method call question
Posted by Claudia Fong at 7/25/2007 11:15:20 AM
I have a method GetResult that receives 2 string arguments and I want
this method to return an array of string. Is it possible?
string[ ] GetResult (string s1, string s2);
I tried to define like this, but when I called the method it shows me an
error cannot convert string [ ] into string
... more >>
Calling Oracle OCI from C#
Posted by Kevin at 7/25/2007 9:15:05 AM
Hi All
I would like to call the following:
OCIAttrGet(ParamHandle,
OCI_DTYPE_PARAM,
HasDefault,
Nil,
OCI_ATTR_HAS_DEFAULT,
ErrorHandle);
from C#. Does anyone have any examples of how you go about calling
OCI? I am trying to find out if a stored procedure has a... more >>
Thread.Abort - is it safe?
Posted by mehdi at 7/25/2007 8:29:40 AM
Hi folks,
You know, the Thread class has got a method named Abort which
according to the msdn:
"Raises a ThreadAbortException in the thread on which it is invoked,
to begin the process of terminating the thread. Calling this method
usually terminates the thread."
I've had a long discussion... more >>
Detecting if an object is not reachable and can be collected by GC
Posted by GeH at 7/25/2007 8:25:38 AM
Is there any possibility to detect if an object is reachable and can
be collected by the GarbageCollector?
I'm using a cache of weak references to persistent objects. Objects
are then accessed using an ObjectID. If the object is still alive, the
object is retrieved from the cache, if not, it w... more >>
Default AppDomain
Posted by siger99 at 7/25/2007 7:32:31 AM
Hi,
I try to use a 3rd party assembly ( basically a layer of managed C++
around a native C++ lib).
Unfortunately, it was developped for NET 1.1 and knows only the
default AppDomain.
When I try to call it from another AppDomain, I get the "Cannot pass a
GCHandle across AppDomains" error.
... more >>
DataAdapter.Update() returns error.
Posted by Manohar at 7/25/2007 7:26:51 AM
Hi,
I am populating a dataset from a stored procedure, which returns
multiple resultsets. One of the resultset is formed with a join
condition from two tables. I am updating the fields of the respective
datatable. Then update the first table in the database using
DataAdapter.Update(). Thi... more >>
Loader lock error message
Posted by Claudia Fong at 7/25/2007 7:26:25 AM
In my windows form I have a comboBox and a textBox. When I try to write
something in the
textBox it shows me the error message below:
Attempting managed execution inside OS Loader lock. Do not attempt to
run managed code inside a
DllMain or image initialization function since doing so c... more >>
socket programming in C#
Posted by sebastian.harko NO[at]SPAM gmail.com at 7/25/2007 6:56:57 AM
Hello,
I have a question on socket programming in C#.
I have this code and it doesn't work correctly.
It sends the message correctly but it does not get the message that
the server sends back ( the program bellow gets blocked ). I know for
sure
that the server sends back a message ( I'm usin... more >>
Socket programming question
Posted by sebastian.harko NO[at]SPAM gmail.com at 7/25/2007 6:41:50 AM
Hello,
I have a question related to socket programming.
I have this code:
TcpClient client = new TcpClient(hostName, port);
try
{
Stream s = client.GetStream();
StreamReader sr = new StreamReader(s);
Stre... more >>
Un Dropping Down a Drop Down
Posted by zacks NO[at]SPAM construction-imaging.com at 7/25/2007 6:33:29 AM
I have an application I am developing that has a Combo Box that is
intended to show a list of available tables in the selected DSN. I
have put code in the control's DropDown event handler to clear the
item list and reload it from the currently specified DSN (in a Text
Box control on the same for... more >>
Unable to map drive in VS2005 over Vista
Posted by itaymaya NO[at]SPAM gmail.com at 7/25/2007 4:12:21 AM
After migrating from XP to Vista, the following piece of code
Process.Start("subst", drive + " " + path);
as well as
DefineDosDevice(0, drive, path); // importing kernel32.dll
simply stopped mapping drives.
The funny thing is that running "subst [drive] [path]" from command
line performs thi... more >>
4byte - value to string (like IPAddress.ToString())
Posted by ohmmega at 7/25/2007 1:43:05 AM
hello,
i've a 4 character string stored in a 4byte value (lets say an 32 bit
integer).
the integer holds the value:
char[3]*255^3+char[2]*255^2+char[1]*255^1+char[0]*255^0.
how can i convert this integer back to string?
thx
ren=E9
... more >>
Graphics.DrawImage upside down? (rotate 180 degrees)
Posted by Gina_Marano at 7/25/2007 12:37:48 AM
Hey All,
Is it possible to draw an image upside down?
I am using Microsofts example of "Printing a local report without
preview".
The only trick is that I want to flip the image upside down.
Reason: I need to guarantee that I print a barcode in the exact same
location (lower right side... more >>
IMessageFilter not for controls or form
Posted by deciacco at 7/25/2007 12:02:08 AM
IMessageFilter interface allows one to capture messages before they are
sent to a control or a form. Is there a way, perhaps by implementing
another interface, to capture all messages to an exe.
In other words, if I add a custom message filter implementing the
IMessageFilter interface to my... more >>
difference between List<object> and List<MyClass>
Posted by Stephan Steiner at 7/25/2007 12:00:00 AM
Hi
I seem to have a bit of trouble understanding one bit of how generics work:
In C#, every class automatically derives from object, and inherits a bunch
of properties (i.e. ToString()). Thus,
(MyClass is object) should always evaluate as true.
However, if I have a method with the foll... more >>
How to talk to peers over the internet?
Posted by Rotsey at 7/25/2007 12:00:00 AM
Hi,
I am writing a game that I want to net enable.
So I want to be able to connect to peers over the internet. I will
be sending very small packets of data.
What is the best way to do this?
Do I need a middle man server?
Can someone outline how to do it please?
rotsey
... more >>
Problem printing DataGridView
Posted by Jeff at 7/25/2007 12:00:00 AM
..net 2.0
I'm having trouble implementing printing of a DataGridView. Below is the
PrintPage event. The problem is that it doesn't matter how many pages the
DataGridView content spans, the code below will print the first page only. I
want all pages to be printed.
What am I missing here?
... more >>
Catching page fault
Posted by Adrian at 7/25/2007 12:00:00 AM
How can I catch an "invalid page fault".
Could you please give example code?
Many thanks.
Adrian.
... more >>
Dragging a line on a panel
Posted by Beorne at 7/25/2007 12:00:00 AM
Hello, I have to ralize a graph with a pair of straight vertical lines
that have to be dragged in the left-right direction with the mouse.
I've never done something similar so I wonder if someone could tell me
the key C# classes to use.
Thank you very much.
... more >>
About test tools for unit test
Posted by Shengtian Yang at 7/25/2007 12:00:00 AM
Hi, all:
I want to choose a test tool for development.
It seems that NUnit is the most popular tool, but I found that Microsoft
Visual Studio also provide a built-in tool, so which is the better one?
Does it mean that built-in tools will have better integrated supports in
future?
... more >>
|