all groups > c# > january 2004 > threads for wednesday january 7
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
What is best SQLConnection strategy
Posted by Lenin Vyas at 1/7/2004 11:59:39 PM
hi
I would like to know whats better---
To declare a SQLConnection variable as a Static member of
a Class containing functions to MakeConnection and
CloseConnection, or should I just declare it as a Public
member of the above mentioned class containing Connection
code.
I ask this because... more >>
Retain DataGrid AutoFormat values
Posted by Peter at 1/7/2004 11:54:27 PM
I have a DataGrid control on a form and I used the Auto Format feature =
to format the grid.
The problem is now if I resize a column in my code I loose some of the =
formats - some of the grid colors returns to default values. Here is =
the code that I use to resize a column.
... more >>
Mouse Right Click Menu - How to do this?
Posted by Anand Ganesh at 1/7/2004 11:24:06 PM
Hi All,
When the user right clicks on the desktop or selects a file and right clicks
the mouse he should see our own submenu along with the Windows context menu.
How will I do this in Visual C# ?
Any suggestions please?
Thanks for your time
Regards
Anand Ganesh
... more >>
How to set Author, Category Info from AssemblyInfo.ce file
Posted by lnsantosh NO[at]SPAM yahoo.com at 1/7/2004 11:18:14 PM
When you right click on file and select properties option,
some files have "Summary" tab.
Using ApplicationInfo.cs file we can set
"Company","Language","Version" etc..
which appeares under Version tab.
But how can I set "Author","Category","Title","Subject",e.t.c from
AssemblyInfo.cs file whic... more >>
seeking source for "Thinking in Csharp"
Posted by d_lwl NO[at]SPAM hotmail.com at 1/7/2004 11:12:32 PM
I was looking for my stashed away copy of Thinking in CSharp by Bruce
Eckel which I have downloaded long time ago. Sadly it is gone due to
my PC harddisk reorganisation. And the author website does not help
since last status I heard was there were some legal complications that
had to be sorted o... more >>
Regular expression
Posted by Ricardo at 1/7/2004 10:43:26 PM
how wold be a regular expression to pick links from a page ????
[]s...
... more >>
Static Members
Posted by Mark at 1/7/2004 10:35:55 PM
Hello Friends
Please check the code below.
One in C# and other in VB .Net
In C# I am not able to access a static property by an
instance variable, but in VB I can do it easily.
The Error is
Static member 'ClassInCS.ABC.MyInt' cannot be accessed
with an instance reference; qualify it wi... more >>
Blocking the Alt button
Posted by Patrick De Ridder at 1/7/2004 10:10:11 PM
Hi,
Could someone please tell me how to block the Alt button from being used?
And how to unblock it again when exiting the application?
Many thanks,
Patrick
... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Changing control value without triggering an event.
Posted by Wavemaker at 1/7/2004 9:19:25 PM
I was wondering if there is a way to change the value of a control
without triggering an event. The ComboBox control, for example, will
trigger the SelectedIndexChanged event when its SelectedIndex
property is changed. I would like to change the SelectedIndex
property without triggering an event... more >>
ODBC MySQL - Problems.
Posted by Matthew Workman at 1/7/2004 8:17:10 PM
Hi...
I am trying to do a "basic" ODBC connection to my MYSQL Database being
hosted at discountasp. For the life of me, I can't get anything to return...
could someone lend a hand? Here is my code:
--------------------------------
string MyConString = "DRIVER={MySQL ODBC 3.51 Driver};" +
... more >>
strange problem with Asynchronous call
Posted by wobbles at 1/7/2004 7:04:16 PM
Hi Everyone,
I've spent hours investigating why my Async (one way) call wasn't
invoking the method on my server.
Basically, if I remove " Console.ReadLine() ", the method DOESN'T get
invoked.
Can anyone tell me why? Does the call require a pause?
(ErrorInformation is a serializable struc... more >>
ASP.Net w/ c# behind: Store data in cookie or retrieve from datastore?
Posted by James Geurts at 1/7/2004 6:58:48 PM
This is probably more of an ASP.Net situation rather than
c#, but since all of my code behind is in c#, maybe it
fits here. I'm wondering, generally, at what point is it
too inefficient to store information in a client cookie
rather than retrieve it from a datastore.
Now, I see the advan... more >>
Restrictions, partially trusted context, what and why?
Posted by Dmitri Shvetsov at 1/7/2004 6:52:53 PM
Hi,
Maybe somebody knows why it's happening?
I wrote a C# Windows Application working with the remote database through a
DataSet. It works cool from my computer but when I gave this application to
my friend who (and only him) has to work with the database tables to edit
them he began receiv... more >>
create a class dynamicaly at run-time?
Posted by peter at 1/7/2004 6:16:16 PM
How to create a class dynamicaly at run-time?
Some documentations in MSDN say that it is feasible
using the class "TypeBuilder",but I don't know how to do.
Is there anyone who can help me? Sample code is
appreciated.
... more >>
Web Configue
Posted by Jim Heavey at 1/7/2004 6:12:57 PM
I'm working on a WINDOWS application.
I created a configuration file with the name of "MyProjectName.exe.config".
I loaded the following configuration information into the file:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="ConnectStr"
value="MyConnect... more >>
Application path
Posted by Wim at 1/7/2004 6:04:43 PM
Hello,
I'm looking for the C# equivalent of App.Path (that is the application
path in Visual Basic). I think it is
System.Security.Policy.ApplicationDirectory.Directory, but when I use
this the compiler says: "An object reference is required for the
nonstatic field, method, or property
... more >>
cominterop runtime callable wrapper
Posted by Ariel Gimenez at 1/7/2004 5:06:53 PM
Hi, maybe some of you can give me a hand with this,
I have a dll written in VB 6 but i havent the source code of it.
In Visual Basic 6 this dll instanciates with createobject and the method was
accesed in this way:
mydll.method "1", "2", "3", True
Now in Asp.net when i add the reference and... more >>
Why doesn't c# have Friend keyword like VB.Net
Posted by Steve at 1/7/2004 4:26:54 PM
I'm just curious, why did give VB.Net a Friend keyword but not C#?... more >>
access the creator object of a class
Posted by Max-Ph. Blickenstorfer at 1/7/2004 4:14:28 PM
I am currently in a black hole looking for a way accessing the creator
object of a class within the class. Something like parent of winform
controls.
Thanks for you time
Max
... more >>
Using DataView with a datagrid
Posted by Hananiel at 1/7/2004 4:02:10 PM
Using Dataview as a datasource for datagrid works fine while viewing.
When I make a new row, by calling dataview.AddNew(),
it removes all the rows in the grid. Anyone know whats going on?
In any case how would you bind two different grids to the same table, can we
filter the rows in the grid?
... more >>
Null insert problem
Posted by aculfa at 1/7/2004 3:54:55 PM
Hi everyone,
We can not set an integer value as null, since it's a value type.
We want to insert this integer value to a DataTable which has an integer
column. (And then update the database..)
How can we achieve to write null to the dataTable or at least to database?
Thanks,
... more >>
pinvoke problem
Posted by Thomas Mobley at 1/7/2004 3:22:27 PM
I'm having a problem getting the name of my card readers using
winscard. The same function works in vb6, but I think I must be
missing something here. Anybody see what I'm doing wrong?
Following are my calls to the imports and my values (only the relevent
stuff)
SCardEstablishContext works ... more >>
VB to C sharp anyone can point out which is the equivalent
Posted by Hai Nguyen at 1/7/2004 3:06:04 PM
I'm learning C sharp and do not like vb much. I'm creatiing a wepage using
panel to test myself. I tried to use these code below, which is written in
VB, and to transform them to c sharp but I got hard time to understand vb
syntax. I don't know if anyone in here can point out which is the equival... more >>
Accessing a Column
Posted by Jim Heavey at 1/7/2004 2:38:25 PM
If I want to access a column, I am not quite sure how you do this when you
are "drilling" from the DataSet, say for example...
ds.Tables["Skaters"].Rows[0]
So I can access the "1st" row, but how to get to the column information?
The only way I know to get at the column infomation is to cr... more >>
Switch Statement Question
Posted by Kevin at 1/7/2004 2:34:37 PM
Is there an equivelent in C# to this "Case 0 to 1.5"?
Thanks
... more >>
RowViewFilter
Posted by Jim Heavey at 1/7/2004 2:22:56 PM
Having some problems with setting my RowViewFilter when I am looking for a
column with Null Values.
I have tried the following:
dvAddSkaters_Lstv.RowFilter=
string.Format("(DateJoined = '{0}')",System.DBNull.Value.ToString())
This is obviously wrong, as when I look at it in the editor th... more >>
Transparency problem drawing bitmap
Posted by David Hoffer at 1/7/2004 2:13:30 PM
I am creating a custom user control and I am having problems with setting
the transparent color of the bitmap. Here is my code...
protected override void OnPaint( PaintEventArgs e )
{
System.Drawing.Imaging.ImageAttributes imageAttributes = new
System.Drawing.Imaging.ImageAttributes();
... more >>
C# vs. Java
Posted by Alexander Kaplunov at 1/7/2004 2:05:52 PM
Is there an article that does side by side compareson of major differences
between the two languages? Also, .NET and J2EE?
Thanks,
Alex.
... more >>
How to customies the button background
Posted by RA at 1/7/2004 1:54:42 PM
Hi
I want to be able to customies (using a different brush) the background of a
Windows.Forms.Button. How can I do it? If I derive and override then there
is no paint method that I can set the brush. Which way can I do this?
Thanks
... more >>
HTML And Regular Explression
Posted by orianavim NO[at]SPAM hotmail.com at 1/7/2004 1:42:25 PM
Hi , I'm working with C#.NET and I'm looking for the following.
I have a web page content and I want to pull all the text which appear
in the page without all the HTML tags.
I know that there is a way to do it with regular expression.
Does someone know how to do it ?
Please help….
T... more >>
User Controls: can they communicate?
Posted by Douglas Macnguyen at 1/7/2004 1:31:32 PM
I have multiple user controls (.ascx) on a page (.aspx). How can a user
control interact with each other? Also, how can a user control interact with
the page?
TIA,
Douglas
... more >>
a good ASP.NET book?
Posted by Jax at 1/7/2004 12:51:44 PM
Anyone know of one?
Best book i've read so far is Simon Robinson's Wrox
Professional C# book but the ASP.NET chapter is weak, i'm
looking for something more detailed, any suggestions?
jax... more >>
Simplest things made hard
Posted by Randy at 1/7/2004 12:48:08 PM
Hello,
Can someone please tell me how to set the bar color of a progressbar to
another color. You'd think there would be a simple progressBar1.ForeColor
method...but I guess that's too simple and easy.
Thanks for any help...
:)
... more >>
Database Connection String
Posted by Ann Marinas at 1/7/2004 12:40:34 PM
Hi all!
I know this post is kinda silly, but I'm just curious...
How can you build a database connection string using an excel file to get
your data?
Thanks a million!
Ann
... more >>
Simple Question: Windows Service Parameters
Posted by Scott at 1/7/2004 12:38:21 PM
How do I capture what parameters were passed to my Windows
service application?... more >>
Win api 32 help
Posted by Eitan at 1/7/2004 12:35:06 PM
Hello,
Where can I find good help file (*.hlp) or (*.chm) for windows api functions
(95 thrugh xp) ?
Thanks :)
... more >>
question about RegEx group capture in C#
Posted by josepinchero NO[at]SPAM yahoo.com at 1/7/2004 12:33:42 PM
There's something for me to learn with this example, i'm sure :)
Given this text:
"[Contact].[Region].[All ContactRegion].[ASIA
PACIFIC].[Japan].[Japan]"
and my first attempt at capture the groups:
"(?:\[)(.+?)(?:\])"
RegExTest gives me what i expect: 6 captured groups: Contact, Region,
... more >>
Adding a new user to admin group
Posted by Ching-Lung at 1/7/2004 12:32:49 PM
Hi,
Is there any way to add a new user to local admin group
via C#?
Please advice, thanks!
-CL... more >>
Implementing IFormatter for Custom Formatter
Posted by Eric Workman at 1/7/2004 12:21:00 PM
Hi Everyone-
I would like to implement the IFormatter class to create a custom
formatter that essentially does exactly what the
System.Xml.Serialization.XmlSerializer does, but also would allow for
the functionality of ISerializable (GetObjectData, and De-Serialization
Constructor) so that I ... more >>
Get information from printers
Posted by Mortel at 1/7/2004 12:18:19 PM
Hi,
How I can get information from printer about count of copy pages, who's
print pages etc. I want monitoring printers and save that information to
file log. Maybe printer has any events to do that ?
Thank's for all.
Boniek
... more >>
ADSI WinNT:// provider
Posted by Thomaz at 1/7/2004 11:35:52 AM
In VB, I can write the following code to get the list of
users and groups in the domain ASIA. How do I do the same
in C#
Set objContainer = GetObject("WinNT://ASIA")
objContainer.Filter = Array("user", "group")
For Each user In objContainer
List1.AddItem user.Name
Ne... more >>
Multi-instance vs single instance application
Posted by kathy at 1/7/2004 11:18:29 AM
I have a general question.
If I write a application using any language(C/C++/C#/VB).
How to make sure it only has one instance running? What I
need to write in source code? If multi-instances run. Is
any data confilct exsisted? Assuming I put the .exe in
shared network drive and the multi... more >>
stop page loading
Posted by Gav at 1/7/2004 11:11:51 AM
is it possible to put something in the pageload event to stop the page
rendering the rest of the page. or to tell the browser to execute the html
that it already has instead of wating until the page has finished loading?
... more >>
Question about event handlers and object scope.
Posted by Ken Varn at 1/7/2004 11:06:31 AM
If an object of class A adds an event handler to and object of class B, and
class A is finalized, does the handler delegate get removed from class B's
event handler or is there a bad pointer on class B's event handler? In
other words, do I have to put a destructor in class A to remove its event
... more >>
Using iphlpapi.lib
Posted by William Stacey at 1/7/2004 10:59:02 AM
How would you use iphlpapi.lib (from the platform sdk) from a c# app? I can
use iphlpapi.dll on w23 and xp, but seem to need this "lib" from w2k. If
need to wrap in c++ dll, please poing to example. Also, would you need to
distribute lib seperatly with you app, or would it compile "into" one c... more >>
Will not render in IE 5.5 browser
Posted by CSDunn at 1/7/2004 10:52:03 AM
Hello,
I am trying to help a co-worker of mine with a C# problem. The following
code will not render at all in the IE 5.5 browser we are using:
********************************************************
<html>
<head>
</head>
<body>
<form method= "post" runat="server">
<asp:Label i... more >>
2 IDE questions
Posted by Ray Mitchell at 1/7/2004 10:48:04 AM
Hello,
I am using VS 2003:
1. In VS 6 there was a "Run to cursor" choice in the
debugging menu. It was also done using Ctrl+F10. How do
you do this in VS 2003?
2. Back in the days of the Wordstar page editor (now you
know I'm old) there was a way to jump back and forth
between th... more >>
performance vs. readability/maintability
Posted by Daniel Billingsley at 1/7/2004 10:36:13 AM
In another online group in which I participate, we were discussing a
particular piece of code that had a pretty high risk for breaking in the
future (because it depended on something not changing that was outside the
developer's control) but was slightly more performant. One participant
posted:... more >>
Encryption Error
Posted by Dave Bailey at 1/7/2004 10:32:15 AM
I have developed a web app using DPAPI to encrypt a
connection string in the web.config file. The application
works perfectly on the development machine but when
deployed to the server when opening the app the following
wrror is generated:
Exception decrypting. Decryption failed. Key not... more >>
DOS Command calls VS.NET
Posted by Tim at 1/7/2004 10:08:50 AM
How do you call a DOS command from .NET? Specifically the
SORT method in DOS.... more >>
strange problem possibly related to caching
Posted by Gav at 1/7/2004 10:02:27 AM
Hi all,
I'm having this strange problem where, in a web app, I have 2 different
links to a different form. One is just a straight forward link the other is
a bit more complicated because it gets there from a user control I wrote to
display a menu. However both call the page in the same way usi... more >>
anyone using CommandBuilder to generate update logic at runtime?
Posted by Jason Shohet at 1/7/2004 9:40:28 AM
What we've done so far in our web applications:
1. We have no datasets dragged-and-dropped in Visual Studio. They are all
defined in the code, generated at runtime.
2. when a user updates or hits a 'delete' button next to a row in a
datagrid, we call a webservice. In there, we coded insert,... more >>
Deploying a web application
Posted by Jeremy Ames at 1/7/2004 9:28:48 AM
I have created a web application that uses a custom control and a web
service on my local system. I have gotten all of the bugs worked out on my
local system and now it is time to move it to the sever. I have tried
copying all of the files and folders within my application folder. I have
even tr... more >>
using directive and namespaces
Posted by neverstill at 1/7/2004 9:17:54 AM
Hello-
I am a little confused about something. I have create a .cs file that looks
like this:
using System;
namespace MyApp.Types
{
using INT = System.Int32;
}
In my Main() function, even though I have added the using sirective : using
Types; I get compiler errors with this line of... more >>
C# strings
Posted by Trevor at 1/7/2004 8:56:25 AM
I have a couple of questions regarding C# strings.
1) Sometimes I see a string in someone else's code like:
string foo = @"bar";
What does the '@' do for you?
2) Is there a performance loss if I start concatenating strings together
with the + operator ? In Java, they discouraged code... more >>
Getting System.ServiceProcess.ServiceController.ExecuteCommand(int) to work
Posted by Tom J at 1/7/2004 8:48:44 AM
What do I have to do to get
System.ServiceProcess.ServiceController.ExecuteCommand(int) to work?
I have written a service that overrides OnCustomCommand to handle commands
sent to it.
If I have application code like:
----------------------------------------------------------
ServiceC... more >>
assembly
Posted by Ricardo at 1/7/2004 8:46:44 AM
is there a method to do assemblies with visual
studio .net or i need to build a makefile all by myself???
... more >>
Monitoring a directory for new files
Posted by Scott at 1/7/2004 8:40:51 AM
I would like to develop a C# Windows Service Application
that monitors a directory for new files. When a new file
is detected, then I would like it to run an SQL Job.
Is there a command I can use with C# that would accomplish
this?
Thank you for your help.... more >>
XPathDocument problem
Posted by Chuck Bowling at 1/7/2004 8:16:28 AM
this refers to the knowledgebase article:
http://support.microsoft.com/default.aspx?scid=kb;EN-US;308343&FR=1
I can't get this sample to work...
It will compile but when the console window opens i get an exception:
An unhandled exception of type 'System.Xml.XmlException' occurred in
syste... more >>
WINAPI CALL
Posted by qindong_zhang NO[at]SPAM hotmail.com at 1/7/2004 8:02:29 AM
I have a API function which declared in VC++ like this:
DLLimport BOOL WINAPI bl_HERA16_SetPlayBuffer(int iChannel,BYTE
**bpBuffer);
How could I declare and call this function in C#. I have problem on
second parameter.
Thks... more >>
Assembly dynamic loading
Posted by Valéry at 1/7/2004 7:41:46 AM
I am currently developing an application, which receives=20
Assembly objects from the network. I would like to load=20
these assemblies dynamically in the application.=20
I looked the informations about the Load and=20
LoadWithPartialName methods. If I have well understood,=20
these methods loo... more >>
C# : How to make connection avilable to all forms & classes in an Application?
Posted by RD at 1/7/2004 6:59:33 AM
My application contains several Classes & Forms .
From the Login form I will get the User ID and Password for the
SqlConnection.
I established the connection through another class and I can get it in the
Login form.
In another form , say Employee form , I want to save the Empl... more >>
CSharp Class Design Issue
Posted by Sunny at 1/7/2004 6:32:36 AM
Hi All,
I have a serious issue regarding classes scope and
visibility. In my application, i have a class
name "TextFile", and also a few other classes
like "TotalWords", "TotalLines" and etc.., which are
suppose to describe the structure of my main TextFile
class. Also i have created some... more >>
Changing Datagrid row height
Posted by bwolfe NO[at]SPAM cgate.net at 1/7/2004 5:52:40 AM
I need to have each row of a datagrid to have a different height based
on the data. When debugging, I can change this value
((System.Windows.Forms.DataGrid)(m_MyGrid)).DataGridRows[0].Height
and achieve what I need to do. Apparently, this is a private member
because I don't have access to it. Is... more >>
ThreadAbortException
Posted by Bonj at 1/7/2004 5:36:13 AM
Say if i have a function,
void FuncStart()
{
try
{
FuncDoActions();
//<nextlineofcode>
}
catch(ThreadAbortException)
{
Thread.ResetAbort();
}
}
If I start a thread by calling
System.Threading.Thread mythread = new
System.Threading.Thread(new System.Threadi... more >>
Populating a CheckedListBox with a System.Collections
Posted by Chibi at 1/7/2004 5:35:50 AM
Hello!
I'm back again with another problem.
First of all, thank you to Jacob for helping me understand
a bit more about NNTP commands.
So now the problem:
I have a collection of potentially thousands of items. I
would like to load this collection and populate it in a
Windows.Forms.... more >>
disabling individual items in a listbox
Posted by kranthi at 1/7/2004 4:50:33 AM
I want to disable individual items in a listbox or listview... more >>
disabling list elements
Posted by radha at 1/7/2004 4:46:23 AM
hi
how to disable elements in listbox or listview in C#.if i
select one item the remaining must be disabled... more >>
Is there anything special about '%' or "%"?
Posted by Jax at 1/7/2004 3:46:36 AM
Custom control problem.
I'm modding a textbox so that it will always have a "%"
sign at the end of it.
I have overrided the Text property to account for the "%"
value within the textbox and have add BaseText to give
access to the baseText method too.
I have the text_changed event handler wi... more >>
Create a record
Posted by Ivan Sammut at 1/7/2004 3:03:09 AM
Hi,
Is there a possibilty in c# to create a record make up for
example of an Integer, string & char
Thanks
Ivan Sammut... more >>
Help! Question concerning C# project deployment
Posted by JimC at 1/7/2004 2:54:45 AM
I have .NET Frame projects that can be downloaded from the Web
in setup.exe files. These files are less than a megabyte in size.
They are demos for clients.
If the user's computer doesn't have .NET Framework installed,
he runs dotnetfx.exe. This is a 25-MByte file. Although it
can be redis... more >>
3rd attempt: UDP Socket Bug
Posted by Bryan Martin at 1/7/2004 2:32:57 AM
Using udp sockets inside a class called by ASP.NET
By impersonating you can use a TCP socket from a external class and call it
from a ASP.NET page. However, changing the socket type to UDP and binding
it to a port throws an error "An attempt was made to access a socket in a
way forbidden by i... more >>
Hebrew Help.
Posted by ben_k NO[at]SPAM cdcoin.com at 1/7/2004 1:52:04 AM
Hello,
I have a hebrew string that include numbers and other letters,
i need to revere only the hebrew fonts.
somebody told me using the bidi.
please help me.... more >>
|