all groups > c# > july 2006 > threads for wednesday july 19
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
How to focus any text control (system wide)
Posted by ozzy66 at 7/19/2006 11:53:07 PM
Hiho NG,
I've created a tool (tray application) like "keytext" or "shortcut"
that is a little tool where you can store text components which you can
call from any running app. Such a stored text will then be written on
any focused text control.
So far, so good. It works quite well. The tool... more >>
mixing managed environments
Posted by BilfFord X at 7/19/2006 11:25:09 PM
I'm trying to update my ability to make something happen in a windows
environment and find that a lot of water has gone under the bridge.
Apparently, in today's dot net development as opposed to VS6, a fella can
mix managed and unmanaged c++. q1) Is that something a prudent person would
do ... more >>
Cannot assign to <this> because it is read-only
Posted by Michael A. Covington at 7/19/2006 11:13:20 PM
C# won't let me do something elegant.
I'm creating a class and want to give it "write to file" and "read from
file" methods. I'm actually using the XML serializer, but that's not the
problem.
The problem is that I cannot, after reading the data from a file, assign it
to 'this'. So even... more >>
Delete a file from a mapped drive using a Windows.Form application
Posted by Dave at 7/19/2006 10:54:50 PM
Hello all,
I have an application that is accessing files from a mapped drive. I
have full access to the share that is mapped and from explorer can
delete files as I need. My application needs to be able to delete files
once the are processed, but using File.Delete does not seem to be
deleting... more >>
Pointer for a managed datatype
Posted by Abhishek at 7/19/2006 9:05:43 PM
Hi All,
i need to find the address of a variable which is of the type
system.drawing.bitmap which is a managed datatype. how to i get the address
of the variable created of that type
regards
Abhishek
... more >>
Regex Question
Posted by JM at 7/19/2006 8:53:52 PM
Hi,
I am pretty new to regex, and I am trying to find a why to do:
1) I have a paragraph "... the black monkey (gamma5) is the one who develop
the first inmunoresitance to alpha-23 also there..."
2) I need to match everything (from some point) until a certain word
(example until alpha-23)... more >>
MessageBox oddity
Posted by Earl at 7/19/2006 7:56:16 PM
Relatively new to C# and I have an odd situation. When I show a messagebox
when catching an exception, the message shows briefly then disappears.
private void PopulateBrands()
{
SqlConnection strSQLServer = new SqlConnection(strConn);
SqlCommand cmd = new SqlCommand("sel_BrandsEST", strSQLSe... more >>
Can I use WMI (C#) to disable/enable a device?
Posted by Michael at 7/19/2006 5:32:18 PM
I'm exploring how to programmatically disable/enable devices in a system
using C#.
-MH
... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Elegant, clean and safe way of having multiple concurent parameters in a dbCommand
Posted by arak123 NO[at]SPAM email.com at 7/19/2006 3:59:35 PM
consider the following oversimplified and fictional code
public void CreateInvoices(Invoice[] invoices)
{
IDbCommand command=Util.CreateDbCommand();
foreach(Invoice invoice in invoices) //lets say you have 200
invoices
{
command.CommandText+="INSERT INTO Invoice(Amoun... more >>
How to read an image from resource file
Posted by DBC User at 7/19/2006 3:50:21 PM
Hi,
I have bunch of image files I want to add it to the resource file at
the design time and I would like to read them from the resource file.
Could soneone point me to a link or give me some advice on how to do
this? All the search I found is to add them through programs but I
would like to do... more >>
Getting a timer tick to fire during a form load
Posted by Jayyde at 7/19/2006 2:57:00 PM
Is there any way to accomplish this? The forms _Load event fires off
several other small ones that I'd like to track time for. I can't get
either the Mdi Parent form's timer _Tick event or the child form that I'm
opening's _Tick to actually fire off. Any help any of you gurus can give me
... more >>
Round currency
Posted by Senna at 7/19/2006 2:44:02 PM
Hi
Have a method that rounds a currency value to the closest quarter. It works
fine as long as the value is above zero, below zero it rounds to the upper
integer. Any working solution is much appreciated.
protected void Page_Load(object sender, EventArgs e)
{
double d1 = 2.73d;
Re... more >>
Fill collection with closest values, tricky logic
Posted by Senna at 7/19/2006 2:43:02 PM
Hi
Have these to work with.
int counter = 0; //The total item to fill the collection with
int increment = 2; //Any number
int current = 244; //Quantity
int max = 1290; //Max Quantity
int min = 0; //Min Quantity, is 0 or the increment value
List<int> list = new List<int>(); //A simple ... more >>
Want to read socket data in ASP.NET
Posted by Steven Blair at 7/19/2006 2:39:54 PM
I need to write an ASP.NET application which can do the following:
1. Create a socket which will stay alive and continously read data.
2. The data read needs to be displayed on the webpage.
3. As the data is received, it needs to be displayed as its received.
I have made an attempt, but hit ... more >>
compare string values in a recordset
Posted by kw_uh97 at 7/19/2006 2:39:02 PM
Hello everone, I am a newbie and I have a recordset that returns the values
XXXXMain
XXXX1
XXXX2
XXXX3
XXXX4
XXXX5
XXXX6
YYYY1
YYYY2
YYYY3
YYYY4
YYYY5
YYYY6
ZZZZMain
ZZZZ1
ZZZZ2
ZZZZ3
ZZZZ4
but I would like the show the results in a tabular format according to the
first 4 c... more >>
Where can I download icons for representing Forest and Domain in a
Posted by Pucca at 7/19/2006 2:24:01 PM
Does anyone know where can I download icons for representing Forest and
Domain in a Treeview representing a network Forest and domains?
--
Thanks.... more >>
"Invalid parameter used" when calling Image.FromFile
Posted by escristian NO[at]SPAM hotmail.com at 7/19/2006 2:04:57 PM
Hello.
I'm trying to create an Image so I use something like this:
Image newImage = Image.FromFile(filename);
Now when it's a bmp file and certain .gif files it gives me an
exception that says: "Invalid parameter used". The gif an bmp files are
valid image files, I can open them in any gr... more >>
"Writing Unit Tests" - What does That Mean - Specifically
Posted by Jeremy at 7/19/2006 1:17:06 PM
I understand what a unit test is. No problem there.
What I'm wondering is what, specifically, do most of you more experienced
developers mean by "writing" a unit test. Am I correct to believe that you
are referring to some way you *document* your tests? If yes, can you provide
some example?... more >>
start process in web site folder from asp.net V2
Posted by vtxr1300 at 7/19/2006 12:51:53 PM
I posted the question on how to do this last week and got it to work at
home just fine. Now on my machine at work, I can't get it to work
anymore. I've checked the permissions on the web site root folder and
it has script & execute permissions. I also checked to make sure the
anonymous user h... more >>
Calling webservice with parameters using ServerXMLHTTP object
Posted by Ramya A at 7/19/2006 12:47:42 PM
Hi All:
I have a .NET webservice accepting an XML request document as a
parameter
How do I call this webservice with ServerXMLHTTP object from my VB6.0
client?
I have enabled the HttpPost and HttpGet protocols in the web.config
file.
This is the calling part:
Set xmlHTTPRequest = New... more >>
How do I implement the backward and forward (the 2 arrows buttons)
Posted by Pucca at 7/19/2006 12:09:02 PM
Are there any built-in functions, contols or sample code avaiable to
implement this? I'm coding a form with treeview on left and listview on
right of a container control. It's like the Active Directory's computer,
user and groups console. The backward and forward button would change the
d... more >>
Asyncronous call to web service
Posted by Joe at 7/19/2006 12:01:02 PM
Hello All:
I have an executable that makes several asynchronous calls to a web service.
The executable increments a counter for each async Web service call and
decrements the counter whenever the call returns. When the counter == 0
(i.e. all calls have returned), I do some clean up and cl... more >>
regex constructor doesn't like \d
Posted by Dan Holmes at 7/19/2006 11:06:34 AM
i have this:
new System.Text.RegularExpressions.Regex("^\d+$") // \d by itself
failed as well.
but the compiler generates "unrecognized escape sequence". so i changed
it to this:
new System.Text.RegularExpressions.Regex("^[0-9]+$")
and it worked fine.
What am i doing wrong? A... more >>
Question on XML and Dataset
Posted by srini.venkatesan NO[at]SPAM gmail.com at 7/19/2006 10:40:43 AM
I am creating an XML webservice where by I am sending the a string of
XML to the consumer.
The consumer receives the XML and converts into dataset and able to
update the rows to the database. The problem I am having is when I
create the intial dataset in XML web service, I use the ADO.net to
po... more >>
Looking for best practices, suggestions for ' is ' and ' as ' keywords
Posted by ChrisMiddle10 NO[at]SPAM gmail.com at 7/19/2006 9:40:28 AM
Are there serious to moderate performance issues to weigh when deciding
to use the 'is' and 'as' keywords over - let's say - more explicit
checks for null and type? Any best practices or heuristics for their
usage?
Snippet 1:
if ( obj == null && obj.GetType( ) == typeof( MyType ) )
{
My... more >>
error on public partial class xxx {}
Posted by blackdog at 7/19/2006 9:40:02 AM
I compiled *.cs which contains public partial class xxx:
System.Web.UI.Page
I got errors as below:
xxx_cs.aspx.cs: error CS1518: Expected class, delegate, enum,
interface, or struck.
Please help.
Thanks
... more >>
Strange code to me
Posted by Tina at 7/19/2006 9:37:03 AM
I have been developing in C# for a few months now and thought I knew the
language but recently I came accross the code pasted below. What is
<Theme>? I don't understand the use of <> other than greater than or less
than nor does my C# book have any such code in it.
There is a class named ... more >>
DataGridView questions.
Posted by tongueless NO[at]SPAM gmail.com at 7/19/2006 9:29:58 AM
I was wondering how to set the default values for a combobox in a DGV.
Now, the boxes just show up empty. I tried searching throught msdn, but
no luck. Anyone know what property to set?
Also, how can I reorder columns in a DGV? When I added the combobox, it
put it at the end. I need it in anot... more >>
Class scope
Posted by Michael at 7/19/2006 8:45:02 AM
Hello, I have a newbie question about class scope. I am writting a little
program that will move files to one of two empty folders. I am having a hard
time understanding scope. So this will be a two part question.
Part 1:
I have a form with a text box on it that I want to spit out resul... more >>
Update attributes in existing XML document
Posted by daz_oldham at 7/19/2006 8:41:25 AM
Hi Everyone
I was wondering if anyone could help me out with fairly
straightforwards problem I have.
I have an XML document (in a namespace) and I would like to loop around
one level of the child nodes, and insert a new value to each node. It
needs to be fairly efficient too.
I guess th... more >>
Session timing out frequently
Posted by suspended NO[at]SPAM gmail.com at 7/19/2006 8:38:38 AM
My website session is timing out frequently. I have modified the
web.config file such that
<sessionState timeout="60"/>
and also at the Page_load, I have assigned
Session.Timeout = 60;
but my session expires in about 5 minutes. What is going on and how to
fix it?
Thanks.
Jess
... more >>
highlighting multiple words in a RTB
Posted by njuneardave at 7/19/2006 8:14:04 AM
I know that there is an rtb.SelectionStart and rtb.SelectionLength
where you can set the length and beginning index of highlight in an
RTB. but, say I wanted to highlight multiple items at once (for
example, go to MS word.... type in the same word a few times and then
highlight what you typed. t... more >>
freeing resources
Posted by billq at 7/19/2006 7:47:26 AM
Hello,
I am new to c# and have become confused about freeing resources. I need to
know if using an objects Dispose method does the same thing as setting the
object to null?
Pen bluePen = new Pen( Color.Blue, 2 );
//use pen
bluePen.Dispose();
as opposed to:
Pen bluePen = new Pen(Col... more >>
DeclaringType vs. ReflectedType
Posted by Sathyaish at 7/19/2006 7:38:10 AM
The documentation says:
System.Type.DeclaringType
~~~~~~~~~~~~~~~~~~~~~~~~~~
public override System.Type DeclaringType [ get]
Member of System.Type
Summary:
Gets the class that declares this member.
System.Type.ReflectedType
~~~~~~~~~~~~~~~~~~~~~~~~~~
public override System.Typ... more >>
accessing elements in a collection
Posted by suspended NO[at]SPAM gmail.com at 7/19/2006 7:22:42 AM
I use foreach loop to access rows in a datatable like this:
DataTable dt;
foreach ( DataRow dr in dt )
{
// do something with dr
}
I want to access the first row in the DataTable without using foreach
loop. How can I do it?
Thanks.
Jess
... more >>
Window Handle error caused when BeginInvoke() method is called
Posted by teixeira1985 NO[at]SPAM gmail.com at 7/19/2006 7:02:45 AM
Hi,
I developed an MDI Environment with several MDIchilds and i would like
to prevent the same MDIClient open twice. User clicks once and opens 1
mdi client window, user clicks again and if form exists calls
BringToFront() method else if not exists, recreate 1 new mdi client wnd
again.
Until... more >>
Cannot uninstall windows service - uninstaller asking for setup files
Posted by DC at 7/19/2006 6:22:39 AM
Hi,
I have developed a windows service in C# and I am using a Visual Studio
2003 installer to install it.
When I am updating the service, I usually stop the service in control
panel, close control panel (if I don't close, the service will often
not properly uninstall), use software uninstal... more >>
AJAX (newbie) Question
Posted by shlomi.schwartz NO[at]SPAM gmail.com at 7/19/2006 4:23:11 AM
Hi all, sorry for the newbie question.
I'm new to C# and trying to do something like a Java Servlet.
My goal is to write an AJAX web client that calls a C# class with an
XML Request, and that gets an XML as a response.(Without using the
AJAX.NET professional framework)
I did something lik... more >>
Send Error Report Dialog Box
Posted by mehdi_mousavi at 7/19/2006 4:18:27 AM
Hi folks,
>From time to time, you've probably seen a dialog box that opens up and
has got a button, that enabled user whether to send some sort of data
(when an application crashes) to Microsoft. I would like to know that
is there anyway to incorporate this functionality to our code? i.e., Is
t... more >>
flicking effect
Posted by Just close your eyes and see at 7/19/2006 3:55:02 AM
Hi all
when I was discovering Visual studio .Net 2005, I tried to put about 50
buttons on a form and run the application, but I had got a strange behavior,
that is the buttons started to be painted one after another making a feeling
of flicking, I tried to many ways to overcome this by using... more >>
static method \ object
Posted by David++ at 7/19/2006 3:29:04 AM
Hi folks,
I am building a simple app which uses a splash Screen. As there will only be
one instance of the Splash Screen ever running at one time I am thinking that
it makes sense to make the Splash Screen a 'static object'. The Splash Screen
is a Windows form. Does this sound like the sens... more >>
PInvoke from a class library
Posted by Peter at 7/19/2006 2:25:01 AM
Are there any restrictions in using MarshalAs when p/invoke-ing from a class
library as opposed to a windows application in .NET CF 2.0?
The following code will not compile in a CF class library with the error
MarshalAs not found. The same code runs happily in both a Windows
Applicationa... more >>
Decryption is not working..wrong text
Posted by den 2005 at 7/19/2006 1:54:01 AM
Hi everybody,
I am not sure where to put this in this forum. So, I posted this at
several topics. I created a class library that has two public methods
Encrypt() and Decrypt(). I reference this dll to a window application. I used
DESCryptoServiceProvider Algorithm to encrypt and decrypt ... more >>
inserting an anonymous method as a value in a generic dictionary ?
Posted by Bill Woodruff at 7/19/2006 1:43:44 AM
I've found it's no problem to insert instances of named delegates as values
into a generic dictionary of the form :
private Dictionary<KeyType, Delegate> myDictionary = new
Dictionary<KeyType, Delegate);
using the standard .Add method of the Dictionary, passing in the name of the
del... more >>
hi...
Posted by shibdutta NO[at]SPAM gmail.com at 7/19/2006 1:15:26 AM
can anyone have idea
how to read PDF files in C#... or do u have any link to some plugin...
that i can use in my program
thank u
... more >>
Generating key press sequence
Posted by Kürþat at 7/19/2006 12:00:00 AM
Hi,
I want to get all key press messages and for some keys I want to generate
extra key press messages to simulate fast typing. For example if someone
press 'H' my app should catch and change it with "Hello". It should work
system wide. I know little about hooks and playback but it does no... more >>
what does @ symbol means in c#
Posted by thi at 7/19/2006 12:00:00 AM
Hi,
Just curious what does the @ system means in c#. Some of the sample codes i
read it written as:
bool bExists = File.Exists(@"c:\\hello.txt");
but i can get the same result as using
bool bExists = File.Exists("c:\hello.txt");
Does @ has special meaning?
Thanks
... more >>
OdbcDataReader.Read
Posted by Dennis Kuntzemann at 7/19/2006 12:00:00 AM
Hallo,
ich habe eine bestehende Datenbank-Applikation zu unterhalten, welche jedoch
Probleme bereitet.
Die DB-Anfrage dauert eine Ewigkeit, und sehr oft schlaegt die Abfrage auch
fehl.
Eine generelle Frage, wird beim Aufruf von:
functionxy(selectWorklogCmd.ExecuteReader(), dest); das... more >>
Changing system date
Posted by perspolis at 7/19/2006 12:00:00 AM
Hi all
Is it possible to change date of system in C# without using API??
thanks in advance
... more >>
|