all groups > c# > march 2005 > threads for thursday march 3
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
Socket Exception question..
Posted by Naveen Mukkelli at 3/3/2005 11:15:02 PM
Hi,
I'm writing a client/server app.
I want to run my server on "Windows Server 2003" PC.
This PC has two network cards. 1 for Internet and other is plugged into
a switch. My plan is that I'll connect 2 or 4 PC to the switch and the
server
PC will give out DHCP IP address.
I... more >>
ADO.NET problems to access data and saving date/time to database
Posted by Ruy Castelli at 3/3/2005 11:13:23 PM
I created a ASP.NET page using C# and I'm using two components to access a
MS-Access database, which are:
- oleDbConnection
- oleDataAdapter
The MS-Access database is in the correct directory, IIS has permission to
write. Everything seems ok, but IIS says that it can't open the file becau... more >>
Key handler problem
Posted by Chuck Bowling at 3/3/2005 9:39:25 PM
I'm got a little problem that I can't figure out. I have a UserControl and
I'm trying to detect the Shift key. I'm using KeyUp and KeyDown event
handlers to set a flag when the Shift key is pressed. My problem is that the
handlers aren't getting called. I have the handlers registered with the ... more >>
Scrollbar maximum property?
Posted by Thorbjørn Jørgensen at 3/3/2005 9:31:24 PM
Hi
I have some problems understanding the properties for the scrollbar class.
F.eks. how do I set the Maximum property in comparison to the Height
property if I for example want to have the scroller to have half the size of
the scrollbar? If the question is formulated a little weird, an explanat... more >>
fetching boolean value from sql query result
Posted by Daves at 3/3/2005 9:24:26 PM
trying to get a boolean value from DataReader (that is, result from a SQL
query);
boolean MyBool = MyDataReader.GetBoolean(3);
well it works using that number 3 but of course I would like to do something
like
... = MyDataReader.GetBoolean["IsLocked"];
since I don't always know the fie... more >>
Directory and file list box
Posted by Patrick Johnson at 3/3/2005 9:10:43 PM
Under visual basic there used to be a directory tree list box and file =
list box controls that could be placed on a form and linked together.
Is there anything similar for C# or VB.net, I couldn't find anything...... more >>
Trouble with culture
Posted by Alberto at 3/3/2005 8:39:43 PM
In a report I have the simbol "ó" but when I print it, the simbol appears as
¾. I'm working in Spain.
How can I solve this?
Thank you very much
... more >>
Voice
Posted by Woojtos at 3/3/2005 8:30:48 PM
Hi,
I've got question:
How to get any sounds from microphone and play them using the speakers?
Thanks in advance... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Problems With XMLWriter and Cryptostreams
Posted by Will at 3/3/2005 8:20:09 PM
I'm having problems with the following code:
public static void saveEncryptedSession(DataSet ds, string pathToSave)
{
const string encryptionKey = "base64-string-snipped";
byte[] myKey = Convert.FromBase64String(encryptionKey);
XmlTextWriter w = new XmlTextWriter(pathToSave, Encoding.UTF8);
... more >>
Preload an image?
Posted by pnp at 3/3/2005 7:55:07 PM
How can I preload an image in an application before showing it in a panel?
-pnp... more >>
Code conversion
Posted by Jesse at 3/3/2005 7:39:06 PM
Hi All,
Can someone convert the following vb code into c# for me
ReadOnly Property IEnumerator_Current() As Object Implements
IEnumerator.Current
Get
Return baseEnumerator.Current
End Get
End Property
Thanks,
Jesse
... more >>
Help me!
Posted by Nhi Ha at 3/3/2005 7:03:02 PM
I am a developer in C#
When I use Reverse engineering function in C# to export to Visio diagram
then I received a message follow:
Exporting UML model to Visio...
Reverse engineering failed.
Couldn't load the UML model into the Visio diagram. Error number 42.
Could you help me? ... more >>
WhiteSpaces & Strings
Posted by Dave at 3/3/2005 5:55:03 PM
Hi
Have a method that builds and returns a of specfic accounting codes to a
datagrid textbox field.
eg, if a user types in "200" the method builds & returns the code "200.00.00".
also if a user types in "51" the method should return " 51.00.00" but I am
finding difficulty adding a whit... more >>
Design question - Abstract, base, interfaces, ack!
Posted by Rachel Devons at 3/3/2005 5:27:58 PM
All,
I'm struggling with an OOP concept. Let me try to define what I'm wanting by
using some classic examples.
Let's say that I have classes called Square & Circle that derive from class
Shape. Within class Shape, it has a method called Save to save the object to
disk. It's defined in Sh... more >>
when to use "ref" and when not? please help!
Posted by Tee at 3/3/2005 4:30:12 PM
Hi guys,
I am confused about the usage of "ref".
Please see this code:
private void button3_Click(object sender, System.EventArgs e)
{
DataTable dt = new DataTable();
AddColumn(dt);
Console.WriteLine(dt.Namespace);
RefAddColumn(ref dt);
Console.WriteLine(dt.Namespace);
... more >>
Session Timeouts - Notifying The User
Posted by David P. Donahue at 3/3/2005 4:21:58 PM
What is the best way (or what ways have been successful for you) to
notify a user on a website that their session has timed out?
I've seen various sites around the internet (my bank, for example)
which, when the browser is left untouched for an extended period of
time, forward the user to a... more >>
Create Function Pointer from IntPr
Posted by Dennis Vansickle at 3/3/2005 4:15:02 PM
Hi all.
I'm working with the Tao OpenGL libraries for C# but ran into a problem
getting a function to work.
What I've done is:
// Set current context
Wgl.wglMakeCurrent(hDC, hRC);
// get entry point of the function
IntPtr pfnColorTableEXT = Wgl.wglGetProcAddress("glColorTableEXT");
... more >>
Width property is lost when using the GetResponseStream() function
Posted by Andres Romero at 3/3/2005 3:59:03 PM
I'm using the next code to get the source code from a web page and save it to
disk, all works fine except that the width property is lost:
wrRequest = (HttpWebRequest)HttpWebRequest.Create("www.server.com/page.aspx");
wrResponse = (HttpWebResponse)wrRequest.GetResponse();
srReader = new... more >>
Is it possible to make the UserControl derived class run in another AppDomain?
Posted by ZhangZQ at 3/3/2005 3:54:22 PM
Supposing I have a class "UserControl1 : System.Windows.Forms.UserControl"
in an Assembly "UI.dll", now I create an Application project and want to use
the "UserControl1" in another AppDomain,
private void CreateUIInAnotherDomain()
{
UI.UserControl1 ui =
(UI.Cls)domain.CreateInstan... more >>
My c# can not dispose my application :(
Posted by John at 3/3/2005 3:38:26 PM
Hello all:
When I run my application in emulation, all of the program are disposed
successfully, but the application can not be startup, is that my Dot Net
Compiler mistaking?
... more >>
Override Equals ... AND Hashcode?
Posted by Mark at 3/3/2005 3:34:03 PM
I've built a class and overroad the Equals method. I've gotten the warning
below. I'm unfamiliar with the "GetHashCode" method. An explantion of the
method and its relation to the warning would be appreciated.
warning: 'myClass' overrides Object.Equals(object o) but does not override
Objec... more >>
Casting returned object
Posted by Stuart Miles at 3/3/2005 3:32:46 PM
I have a 3rd party DLL with a function that has a return parameter of type
object.
After I make the call:
messagingClass.eGetUnreadMessages(ref myId, ref msgs);
when I look at it in the Locals window I get the following:
- msgs {System.Array} System.Object
[0,0] "AFPSDEV1" string
... more >>
DataColumn Expression Q
Posted by Vai2000 at 3/3/2005 2:58:13 PM
Hi All, I have a dataColumn type of string which has values in form of range
like 0-80 or sometimes just 1 value like 100. I want to add another
column[numeric] which basically computes the count of the range & displays
it. I know the hard way of doing this, but was wondering can Expression
Pro... more >>
Type from ProgID on remote machine
Posted by sjoshi NO[at]SPAM ingr.com at 3/3/2005 2:49:07 PM
Hello All
I'm using the Type tp = Type.GetTypeFromProgID(progID, machineName)
call to get a COM object type from a remote machine. The wierd thing is
that, even though the remote machine does not exist, I still get a
System.__COMObject for tp. As per doc, I thought it would be null.
Can someo... more >>
How to get the geometry of HDD
Posted by Sergio Diaz at 3/3/2005 2:49:02 PM
Is there a way to get the geometry of a HDD? ... more >>
can I replace a pressed key by another in a control
Posted by jean-dot-paul-at-opelwilly-dot-com at 3/3/2005 2:25:29 PM
Hello,
Is there a known way to replace a pressed key by an other.
KeyPressEventArgs.KeyChar is read-only so is there a work arround.
I want to change the decimal point of the numeric keypad into
CultureInfo.CurrentCulture.NumberFormat.CurrencyDecimalSeparator
at anny time.
Greet... more >>
Crystal Report
Posted by Marty at 3/3/2005 2:18:59 PM
I created a report with paramters and set the PromptText property of
each parameter at runtime and then used the PrintToPrinter() method.
All the parameter fields are blank. Is this the correct property? How
do you do a print preview? Thanks again.
... more >>
Keeping application to notify icon
Posted by Beenish Sahar Khan at 3/3/2005 2:12:52 PM
I am using C#.I want to start my application so that its notify icon is
added to the
system tray, i don't want to show any starting form. I want user to interact
through the notify icon...just like MSN. Is there any way to do this?
regards,
beenish
... more >>
Keeping application to notify icon
Posted by Beenish Sahar Khan at 3/3/2005 2:12:34 PM
I want to start my application so that its notify icon is added to the
system tray, i don't want to show any starting form. I want user to interact
through the notify icon...just like MSN. Is there any way to do this?
regards,
beenish
... more >>
Query size of scrollbars
Posted by felix at 3/3/2005 2:05:05 PM
Hi,
I've a UserControl with the property AutoScroll = true. Thus, when
child-controls overlap the visible area, the scrollbars are shown.
How do I query the size or width of the scrollbars? In my
DisplaySettings of windows I can set the width of the scrollbars
(currently 17px on my machi... more >>
regex groups
Posted by dwight NO[at]SPAM trumbower.com at 3/3/2005 1:28:42 PM
How does one figure out match.groups for a regex string? Here is the
expression,
"([12]\d{3}-[A-Z]\d{3})(\d{3})?((-)(\d{4})(\d{2}))?((-)(0\d{2})(\d{2}))?((-)(0\d{2})(\d{2}))?((-)(0\d{2})(\d{2}))?"
and here is an example string 1013-A109400-480001-00701-05601-06501 .
I've tried searching msdn... more >>
document management from microsoft?
Posted by RA at 3/3/2005 1:27:44 PM
Hi
Is there any document management that microsoft provides? A large
organization need a tool that gets information and can generate documents
based on a pre defined templates.
Thanks
... more >>
passing arrays between C++ and C#
Posted by Gregory Khrapunovich at 3/3/2005 1:08:58 PM
Hi,
I need to pass a structure between C++ DLL and C# client
(both ways). Among other elements the strcuture must
contain a fixed size array of integers. In C++ I can
successfully declare a structure like this:
public __gc class MyStructure
{
public:
int* __gc arr;
MyStructure(){ar... more >>
Descendant form will not display in design mode
Posted by Chris at 3/3/2005 12:33:01 PM
I have a winform base class in which I dynamically set a web reference Url:
myService.Url = <WebServer> + "MyService.asmx";
where <WebServer> is pulled from my App.config file.
There is no problem working with this base class and the solution compiles
and runs fine. However, I am unable to... more >>
Volatile & Interlocked
Posted by Pierre at 3/3/2005 12:14:05 PM
Using the "volatile" keyword, creates a problem if I intend to use any of
the interlocked APIs. The compiler generates an error if I use the following
line, for example:
Interlocked.Increment(ref count);
The error says that a volatile field cannot be used as ref or out, but if I
don't u... more >>
C# application loading OCX, problems after exiting
Posted by lpinho NO[at]SPAM gmail.com at 3/3/2005 12:10:26 PM
Hi there C# experts,
I'm building a C# windows applications that loads some OCX (made using
VB 6), I'm able to load the OCX and then dispose it (at least
apparently), but when I'm exiting my C# application a crash occurs.
The error is:
The instruction at "0x275abc77" referenced mamory a... more >>
Enabling Button when All Textboxes have information in them.
Posted by JM at 3/3/2005 12:03:01 PM
Good Day
I am new at this programming thing but I thought I would give Windows Forms
a shot.
I have a form that has 3 text boxes on it and a button which is Disabled by
default in the properties. I want to "enable" the button when there is text
in the 3 textboxes.
Is there a property... more >>
C# inheritance
Posted by AJ at 3/3/2005 11:55:02 AM
Is multiple inheritance is possible in C#?... more >>
Writing to a particular position
Posted by lexicon at 3/3/2005 11:54:03 AM
Hello;
I have a text file. Assume that this file has some textual content. I
want to append a text into this file at a specific position; not to the
end of file. I assume that one way of doing this would be setting the
stream length, shifting the characters after the position + lengt to
the end... more >>
How to create a MSDE Setup Package Using C#.NET
Posted by Sumit at 3/3/2005 11:44:06 AM
Hi
I'm trying to create an installation application that will install
MSDE.
However, I'm having trouble in doing that.
I have consulted the link http://support.microsoft.com/kb/325004/EN-US/
By following the steps given in the above mentioned link i am able to
create the setup(it creates 5 f... more >>
Create Native DLL
Posted by Elton Rabello at 3/3/2005 11:27:03 AM
Hi
I don't know if it is possible, but I need to create a DLL in C# or
VB.Net, that can be invoke by function Loadlibrary from Delphi.
Is this possible? How?
Thanks a lot
Elton... more >>
Toolbar's, ImageLists, and Manifest Resources
Posted by anthony.duerr NO[at]SPAM gmail.com at 3/3/2005 11:22:57 AM
I have encountered a problem (most certainly a .NET bug), that, for the
life of me, I cannot figure out how to work around.
Using Visual Studio 2003, with enabled XP Visual Styles.
There are two possible scenarios here, the first one works properly,
while the 2nd one doesn't.
Scenario 1
... more >>
Write byte[] in file
Posted by Mark at 3/3/2005 11:13:30 AM
Hello.
How can I write binary data from byte[] to some file on disk?
Thank you.
... more >>
Presentation Layer vs. Business Logic Layer
Posted by Michael Rodriguez at 3/3/2005 11:08:13 AM
I have a windows form that makes a call to my BLL to get some data. The
windows form has a progress bar component that I would like updated as the
data retrieval takes place. However, strictly speaking, the BLL is not
supposed to know anything about the presentation layer. Also, since the
... more >>
How to pass pass XmlResolver to Transform() method?
Posted by Tony Fabian at 3/3/2005 11:06:24 AM
Hi,
the code below produces the following warning:
'System.Xml.Xsl.XslTransform.Transform(System.Xml.XPath.IXPathNavigable,
System.Xml.Xsl.XsltArgumentList)' is obsolete: 'You should pass XmlResolver
to Transform() method'
Anyone know how to do that?
XmlDocument _xmlDocument;
XmlDoc... more >>
Changing TextBox BackColor / ForeColor When Disabled
Posted by Steve Le Monnier at 3/3/2005 10:07:45 AM
When you make a textbox control disabled ( txtText1.Enabled = false; )
You're left with grey text on a greyer background, which is not ideal. The
Read-Only property is no use to me as I need to prevent complete access, so
i've been trying to change the visual display of a control once I have ... more >>
How to Link Class files to multiple projects.
Posted by Edward Mitchell at 3/3/2005 10:07:12 AM
I am trying to include two class files into a web service project. The
structure I have is a top level solution and project in a folder and below
that, the web service project in it's own folder. In the top level folder I
have two class files, classA.cs and classB.cs.
In the web service p... more >>
Writing to a configuration file
Posted by FireStarter at 3/3/2005 10:01:39 AM
I know how to read from an application configuration file, by using
System.Configuration.AppSettingsReader.
This object does not allow writing a value back though. Does anybody
know how to do this?
The application is Windows Forms.
Thanks.
FireStarter.... more >>
How can I call this?
Posted by trint at 3/3/2005 9:23:28 AM
How can I call this?
This doesn't work:
SendReceiveTest4();
public static int SendReceiveTest4(Socket server)
{
byte[] msg = Encoding.UTF8.GetBytes("This is a test");
byte[] bytes = new byte[256];
try
{
// Blocks until send returns.
int i = server.Send(msg... more >>
unsolved issues!!
Posted by Vadivel Kumar at 3/3/2005 9:22:47 AM
I have posted issues lot of times. Initially, some body will respond to that
and once i replied there is no proper response after that.
What is the way to let the people respond to my old, unsolved issues.
Thanks & Regards
Vadivel Kumar
... more >>
IIS Configuration - ASP.net doesn't work
Posted by Ruy Castelli at 3/3/2005 9:19:49 AM
Hi,
I'm using version 5.1, with .net framework 1.1, and I'm trying to create a
very, very, simple application, where I would enter a text on a TextBox and
when the user clicks on submit, it saves this data on a table. This is just
for testing and learning purposes.
My problem is that eit... more >>
Calling ALT-TAB
Posted by Chris Mason at 3/3/2005 8:27:51 AM
I have an application that runs full screen on a system and I would like to
be able to (at times) switch another program using an ALT-TAB like
interface. However the system only has a touchscreen display so doing this
from a keyboard is not an option. Is there any way I can instantiate the
bui... more >>
Boxing & UnBoxing access question
Posted by Ed A at 3/3/2005 8:25:04 AM
Hi all:
I'm using a struct of type Point that is being passed on to a method as a
refrence type (boxing), the UpdatePoint method changes the coordinates of
this point as such:
Point p = new Point();
UpdatePoint( P );
..
..
..
void UpdatePoint( Object oP )
{
((Point) oP).X = 5... more >>
How to edit multiple rows in web application
Posted by ad at 3/3/2005 8:15:41 AM
I use DataGrid in my web application for editing data.
But the DataGrid can edit one row at a time.
How can I let the user edit multiple rows at a time?
... more >>
DateFormat 03/05 to MAR05, how?
Posted by chrisben at 3/3/2005 8:07:04 AM
I have a DateTime type data for my grid column. I want to display it in the
cells as
MONYR, as MAR05 JAN05 etc. Cannot find it in DateTime format, is there any
quick way to do it (instead of convert my column type from DateTime to string
and then parse it by myself)?
Thanks a lot
Chri... more >>
Visually Editing Panels and DesignerAttributes
Posted by AndrewDucker at 3/3/2005 7:50:14 AM
I've just started working with some people that have an odd setup and
I'm wondering if someone can point out a better way of doing things (or
what I'm doing wrong).
They have a base form class, derived from the standard Form, but with
the ability to show a list of panels in order.
Each of t... more >>
System.Web.Mail
Posted by bernardpace NO[at]SPAM yahoo.com at 3/3/2005 7:48:17 AM
Hi,
I am writing a windows form application to send mail. I am using
the System.Web.Mail namespace, but the Mail namespace is not being
found. Should I install something or what am I doing wrong.
Thanks... more >>
Export To Excel Problem
Posted by kscdavefl at 3/3/2005 7:09:11 AM
When I execute the following code:
private void excelButton_Click(object sender, System.EventArgs e)
{
Response.Clear();
Response.ContentType = "application/vnd.ms-excel";
Response.Charset = "";
this.EnableViewState = false;
System.IO.StringWriter tw = new
System.IO.St... more >>
Versioning of Xml configuration files (C# project)
Posted by TT (Tom Tempelaere) at 3/3/2005 6:53:03 AM
Hey everyone,
I'm currently writing software for a project that uses a lot of Xml files
for configuration. The project is written in C#/.NET. Each such xml file has
a schema defined for it (Xsd file). This schema is not used at run-time. What
we do is use XPath expressions to query for requ... more >>
How to set a user Profile in AD from c#? Any ideas
Posted by j2222 at 3/3/2005 6:23:04 AM
Creating a user, setting various parameters ... can't set PROILE path ...
anyone have a code snippet,
Thanks,
James... more >>
Problem with Toolbar and ImageList
Posted by bernardpace NO[at]SPAM yahoo.com at 3/3/2005 6:01:27 AM
Hi,
I am writing a windows application. To my form I have added a
ToolBar componenet and have created a collection of buttons within it.
I have also created an ImageList, where I have loaded the collection
of images into this component.
In the toolbar component I set the ImageList propert... more >>
Highlighting entire row when cell is clicked in datagrid
Posted by Charlie NO[at]SPAM CBFC at 3/3/2005 4:14:18 AM
Hi:
Using the WinForms DataGrid, I would like to have the entire row highlight
rather than just the cell that was last clicked. How do you do this?
Thanks,
Charlie
... more >>
Form Icon
Posted by Just D. at 3/3/2005 4:02:23 AM
All!
Who knows how can I change the form image (left top corner)? I can add bmp
and ico images as resources to the Windows Application Project and if I
create a link on the desktop I see this icon correctly. But I can't change
the left top corner of al forms.
Thanks,
Just D.
... more >>
passing an event as a parameter
Posted by Vadim Berezniker at 3/3/2005 3:55:53 AM
Let's say I have a base class BaseClass that defines an event
'ValueChanged' and then I have inherited classes that have specific
'SomeValueChanged', 'SomeOtherValueChanged' events.
I want to have 'ValueChanged' fired every time one of the value change
event fires in the subclasses. My first tho... more >>
How can I hide the SMTP authentication data?
Posted by Sharon at 3/3/2005 2:27:03 AM
I’m sending mail form my C#/.NET assembly, and for that I’m doing
authentication like that:
MailMessage MyMail = new MailMessage()
MyMail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1")
MyMail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/se... more >>
Getting a list of available Oracle Servers in Domain
Posted by Alexander Wehrli at 3/3/2005 2:21:01 AM
Hi,
How can I get a list of all Oracle Servers in my network? It isn't possible
by calling NetServerEnum, the matching ServerType does not exist.
Any idea?
Regards Alexander... more >>
Resize a form by height only
Posted by Steven Blair at 3/3/2005 2:14:46 AM
Hi,
I have a windows form which can only be resize by height. At the moment,
on the Resize event I have the following code to prevent the user
changing the width of the form:
this.Width = DEFAULT_WIDTH;
Its not ideal this method, since the user can still see the window being
resized (har... more >>
Threading problem
Posted by Magali Desmedt at 3/3/2005 2:07:05 AM
Hi,
I have to send several messages at the same time and wait for the replies,
so I use a thread for each message.
//Get all the data at the same time.
foreach(Thread thread in threads) thread.Start();
//Wait till all the data is retrieved.
foreach(Thread thread in threads) thread.Joi... more >>
How to hide code in the assembly?
Posted by Sharon at 3/3/2005 1:47:03 AM
I wrote an assembly in C#/.NET that includes some personal information.
But this information can be revealed by opening the assembly in tools like
the ‘Microsoft .NET Framework IL DASM’ and ‘Reflector’.
I do not want to expose this code.
How do I hide it?
--
Regards
Sharon G.... more >>
syncfusion dll reference problem
Posted by ksskumar2000 NO[at]SPAM gmail.com at 3/3/2005 1:28:44 AM
Hi,
Even I referred Syncfusion.Tools.dll in my project, while I compiling I
got the following error message.
'AnimationDelayInMilliSeconds' is declared in project
'Syncfusion.Tools.dll', which is not referenced by project
'Inventory.WinApp.dll'.
What could be the problem?
kumar
... more >>
|