all groups > c# > november 2006 > threads for wednesday november 22
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
Path.InvalidPathChars question
Posted by schaf at 11/22/2006 11:17:15 PM
Hi !
I have determined, that Path.InvalidPathChars does not return an array
with all invalid path characters. For instance the question mark (?)
does not appear in the array, but it is not possible to create a folder
with a question mark (?).
How can I get the whole range of invalid path cha... more >>
Code insert values into database
Posted by Sirisha at 11/22/2006 10:11:37 PM
Hello,
I am New to the C#.Net,
i want code for insert values into the database.(in C3#.net)
Regards,
A.Sireesha.
... more >>
Error installing CAB
Posted by Joachim at 11/22/2006 9:29:02 PM
When trying to install the Composite Ui Application Block software I get the
following error message
"An unexpected error occurred generating the Visual Studio Solution files.
You may have to manually create solution files for the projects you have
installed."
What is wrong? How can I in... more >>
Resizing Frame
Posted by wardemon at 11/22/2006 8:11:21 PM
Hi All,
I would like to ask how can one resize a frame in a website w/o
postback?
My scenario is the following
I have a left frame, a top frame, and a "contents" frame.
I placed an imagebutton in the top frame that once clicked, it will
fire
a javascript code the will resize the lef... more >>
How do I use HTML textbox in C#?
Posted by Dan Aldean at 11/22/2006 7:56:33 PM
I need to use a HTML textbox in C# code.
Any hints, please?
Thanks
... more >>
NetworkStream Read/Write operations - # bytes read/written.
Posted by Charles at 11/22/2006 5:54:01 PM
Hi,
Is there a way to find out how many bytes NetworkStream Read/Write actually
read/wrote when there is an exception (i.e. socket read/write timeout). Or,
can I assume that if there is an exception that no bytes are read/written.
Thanks,
Charles.... more >>
An instance of a form in another
Posted by Dan Aldean at 11/22/2006 5:53:07 PM
Hi,
2 web pages, One of them has properties that I need to read in a second
form:
First Form
public class FirstForm : System.Web.UI.Page
{
private void submitButton_Click(......)
{
Server.Transfer("SecondForm.aspx")
}
public string UserName //property
... more >>
Strange Label behavior
Posted by SLIMSHIM at 11/22/2006 5:15:01 PM
Can someone explain this one to me ...?
Add one Label and one Button to form .
Set RightToLeft of Label to True.
try this
Label1.Text="12345.";
on display you will see
..12345
the decimal jumped to the wrong side
if you then do this
Label1.Text = Label1.Text + "00";
on screen you wi... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
A threading problem
Posted by nick.fletcher NO[at]SPAM iinet.net.au at 11/22/2006 4:53:26 PM
This concerns controlling access to methods in different classes.
The meat of it is as follows:
public class CommsControl
{
private InputBuffer ib = new InputBuffer();
private OutputBuffer ob = new OutputBuffer();
ib.StartComms();
ob.StartComms();
}
protected class I... more >>
PreTranslateMessage
Posted by Il Duce at 11/22/2006 4:04:22 PM
Hi,
In MVC++ it is possible to override PreTranslateMessage. Is this not
possible in a form under C# ?
- H... more >>
Jpeg Image and Picture Box
Posted by ZS at 11/22/2006 3:20:02 PM
Hi,
How can I display a jpeg image on a Picture box or Panel and be able to set
scrollbars to it.
Thanks
-zs... more >>
The Reason why ComboBox control is unfinished (3 times !)
Posted by TheSteph at 11/22/2006 3:18:25 PM
Hi !
I have a question : the ComboBox control have NO single border, and height
is at least 1 pixel higher than TextBox.
There is absolutely NO good reason for making a ComboBox looking that way.
My question is WHY Microsoft did that in the 3 versions of Visual
Studio/.NET releases ... more >>
Get error messages back from a Remote machine
Posted by Jason at 11/22/2006 3:15:04 PM
I've a c# app that I execute on a remote machine, which works as I expect it
to, but when I encounter an error on the remote machine how do I know what's
going on, since it's a remote app?
For instance on the remote app that I execute I check for the existence of a
file, and if it's not the... more >>
Renaming a directory
Posted by Janiek Buysrogge at 11/22/2006 1:30:51 PM
Hello,
Maybe this has been covered in the past in this group, but I wasn't
able to find any references. If it has been covered, please provide me
with a link of some sort.
I'm trying to rename a directory, eg.: C:\TestDir\Dirname1 to
C:\TestDir\dirname1, as you can see, this is only changed... more >>
Array of Class Question
Posted by jm at 11/22/2006 1:07:40 PM
I'm looking at this code at MSDN:
http://msdn2.microsoft.com/en-us/library/system.collections.ienumerable.aspx
using System;
using System.Collections;
public class Person
{
public Person(string fName, string lName)
{
this.firstName = fName;
this.lastName = lNam... more >>
Code design ideas?
Posted by Jens Jensen at 11/22/2006 12:53:22 PM
Hello all,
I need some design advice for my web service.
I' have written a web service that exposes a function that takes some
parameters
and return an xml.
The function have up to 10 parameters. There are many situations where the
function returns an error xml.
The parame... more >>
Get Calling Class type in base clases static method.
Posted by parez at 11/22/2006 12:22:55 PM
Hi All,
How do you think i can get this to work..
Der1.GetCallingClassType() should return Der1
public class Base
{
Base()
{}
public static string GetCallingClassType()
{
//how do i set the value for str
return str
}
}
public Der1:base
{
Der1(){}
}
p... more >>
ValueType reference in objects
Posted by Andre Azevedo at 11/22/2006 11:56:01 AM
Hi all,
With the followin code:
class MyClass
{
public int i;
public MyClass(ref int I)
{
i = I;
}
}
class Program
{
static void Main(string[] args)
{
int i = 50;
MyClass c = new MyClass(ref i);
Console.WriteLine(c.i);
... more >>
DataBinder question
Posted by Kevin Blount at 11/22/2006 10:21:22 AM
In a DataList, I'm using the following:
<%# DataBinder.Eval(Container.DataItem, "characterization")%>
I was wondering if it's possible to create a string that would contain
the value of the above line, so that I can manipulate it:
I tried
string resultText = DataBinder.Eval(Container.D... more >>
create a keystroke logger
Posted by Steve Y. at 11/22/2006 10:15:51 AM
I've been asked by senior management to create and deploy a keystroke logger
application (log to a local or network folder). Active directory already
blocks the target users from opening task manager (they won't be able to see
it running) so it needs to be straight forward and just capture ke... more >>
Add C code to my C# application?
Posted by cyberco at 11/22/2006 10:12:43 AM
I'm developing for Windows Mobile 2005 PPC using Visual Studio 2005.
I need to invoke methods on a DLL (Iphlpapi.dll) but I can't get this
working from C# using p/invoke so I want to write some C code that
invokes the DLL. Similar to this:
http://msdn.microsoft.com/library/default.asp?url=/l... more >>
Custom Form working at runtime but cannot be loaded in designer
Posted by ThunderMusic at 11/22/2006 9:43:35 AM
Hi,
I have a custom form that works fine when I debug it or run it in release
mode but cannot be loaded in the designer... Actually, it can be loaded in
the designer when no control is on it, but the resizing tool (in the
designer) is offset both horizontally and vertically and when I put a ... more >>
ConfigurationManager Seemingly Simple
Posted by Mark at 11/22/2006 9:01:41 AM
I am trying to read the appsettings section of a configuration file
using the ConfigurationManager object (ASP.NET application) with the
following three lines but for some reason the ConfigurationManager does
not recognize there is an appSettings section in the file and the last
line throws an e... more >>
simple question about ref with object?? PLEASE HELP
Posted by giddy at 11/22/2006 8:45:28 AM
ok i have a datagridview in my app and i have a function defined like
so:
public void FillColumns(ref DataGridView theDGV)
when i call it ... like this :
FillColumns(ref dataGridView2);
i get : Object reference not set to an instance of an object.
i dont get it , is'nt my datagridview ... more >>
C#3.0 extension methods and the like for the Gurus
Posted by Deckarep at 11/22/2006 8:44:50 AM
I recently got into somewhat of a debate with a fellow co-worker.
First I asked him if he new of a way to add a method to an existing
class like enhancing a class but without using Inheritance. He asked,
"Why on earth would you want to do this? Just inherit." I told him
other dynamic language... more >>
Firing Events using reflection
Posted by mswlogo at 11/22/2006 8:25:26 AM
I looked high and low for code to do this and finally found some VB
code that did it right.
This is a C# flavor of it.
public event EventHandler<EventArgs> MyEventToBeFired;
public void FireEvent(Guid instanceId, string handler)
{
EventArgs e = new Eve... more >>
Interfaces in a separate assembly...remoting
Posted by Junoti at 11/22/2006 7:48:42 AM
Hello, I'm hoping someone might be able to help me out. I'm creating a
shared assembly with my interface definitions similar to the following.
When I try to compile the RemotingInterface, everything works. When I
go to compile the RemotingServer assembly, I receive the following
error message. I... more >>
Graphics Help
Posted by Henry at 11/22/2006 6:46:59 AM
Hello, the objective was to print a filled circle to the picturebox, and
print the color name to a textbox each 2 seconds. Following is the code I
used, however, I could never see anything except the last item in the
arraylist being printed, tried different ways to iterate through the colors,... more >>
populating a combo box
Posted by dshemesh at 11/22/2006 6:36:02 AM
Hello,
I'm new to C# and I can't seem to manage doing something which is supposed
to be very simple:
I have a table in SQL Server with 2 columns: Id, Name.
I have a form in visual studio 2005 in which there is a combo box. I want to
fill this combo box manually (not using binding) with these ... more >>
Event regsitration and finalizer
Posted by Sharon at 11/22/2006 6:21:25 AM
When an object is register to event (delegate marked as event) with one of
its methods, what happen when the event is raised if the object is dead
(finalized)?
In this case the delegate invocation is trying to invoke a method on a null
object, this should generate en exception.
What exceptio... more >>
VirtualPathProvider without a file name
Posted by mdufour NO[at]SPAM paradox.ca at 11/22/2006 6:15:50 AM
Hi all,
I am working on a VPP and i would need some help.
I built my VPP using the model in the Sept 06 issue of Visual Studio
Magazine article RESTful ASP.NET app (Page 46).
I got the code done (In C# instead of VB.NET) and if i use the url
http://locahost/Test all i get is the 404 messa... more >>
Load different CSS files for different browsers
Posted by Sehboo at 11/22/2006 5:56:06 AM
I have a CSS file which shows things perfectly in IE, but it doesn't
work in Opera. If I change the CSS file for opera then it doesn't work
in IE. We only support these two browsers.
What I need to do is find out which browser I am in. If it is IE then
load CSS1. If I am in opera then load... more >>
Composite UI Application Block issues
Posted by Joachim at 11/22/2006 5:50:01 AM
I'm trying to figure out how to make a SmartPart visible on my screen through
a SmartPartPlaceHolder. I have the following code (I don't have so much
understanding of CAB yet so there might be a few things wrong here and there
- I hope you can help and correct me):
//------ CABTest2 project... more >>
Embedded Resource Files
Posted by doomsday123 NO[at]SPAM gmail.com at 11/22/2006 5:25:21 AM
Is there an easy way to copy an Embedded Resource file to the file
system? I have a config file that is an Embedded Resource in my project
that I want to copy to a location in the file system but the only way I
can think of doing it is to read it and then create a new file and
write to the file.... more >>
How to read operating system's current culture (regional settings)
Posted by adi at 11/22/2006 3:58:35 AM
Hi
I'm using .NET Framework 1.1
My application needs to read the system's language settings.
How to do this?
Thanks.
... more >>
Exception handling, Retry, Resume Next
Posted by Adil Akram at 11/22/2006 3:11:01 AM
There are situations where you want to retry/rerun the same code again (if
user wants) for unlimited times for a particular exception thrown. For
example in situations like there's no CD in the drive or some file is locked
by another process you want to display message dialog to user with "Ret... more >>
Convert an Image to 8-bit grayscale
Posted by platinumhimani NO[at]SPAM gmail.com at 11/22/2006 3:00:01 AM
-> How to convert any image(8,16,24,32 or 64-bit) to 8-bit grayscale
-> i have tried to convert a 24-bit image to grayscale using setpixel
and getpixel functions, in vb.net
but i am unable to save that image in grayscale format.How do i do
that.It still saves in true color format.
-> i used p... more >>
Thread ending
Posted by Jon Slaughter at 11/22/2006 2:51:44 AM
Since a thread doesn't have a Stop feature and I'm not supose to use abort,
I'm wondering how I stop a thread?
My problem is that I simply want to excute a function in the background and
possibly "restart" it.
What've been doing is essentially:
if (SerialRowThread != null)
{
Seria... more >>
short res = shortA + shortB result in compiler error. Why?
Posted by nyhetsgrupper NO[at]SPAM gmail.com at 11/22/2006 2:24:13 AM
The following code result in the following compilation error: Error 1
Cannot implicitly convert type 'int' to 'short'. An explicit conversion
exists (are you missing a cast?)
short a = 1;
short b = 2;
short result = a + b;
Can anyone explain why??
... more >>
Inheritance
Posted by Soobrassen Thoplan at 11/22/2006 1:32:01 AM
HI guys,
I am developing an application using c# sharp.I have a base form and all
other forms inherits from the base form.
all was running so well until i was given the task to find out which
inherited form is actually being used.
i.e i have a button in my base form and on clicking th... more >>
CheckBox
Posted by Bhagya at 11/22/2006 1:11:36 AM
Help me to validate a checkbox wherein i want to display different
messages when the checkbox is checked and unchecked.....
... more >>
attributes on enum members?
Posted by Simon Dahlbacka at 11/22/2006 12:31:09 AM
Hi,
I have an occasion where it would be useful to add attributes to
individual enum members, and I can do that very well enough, the
problem is: how do I access them "after the fact"?
the obvious
Thing foo = Thing.Bar;
object[] attrs = foo.GetType().GetCustomAttributes(false);
does n... more >>
on_which_takes_a_“refâ€_param
Posted by Cmtk Software at 11/22/2006 12:23:03 AM
The following code:
public __gc class MyClass
{
public:
void MyFunc (int __gc* number);
};
Generates the following metadata for C# when compiled in VC 2005 with the
/clr:oldsyntax switch in a DLL project:
public class MyClass
{
public MyClass();
public void ... more >>
C++/CLI managed Enum appears empty in CSharp
Posted by Cmtk Software at 11/22/2006 12:22:01 AM
I'm trying to define an enum which will be used from unmanaged c++, C++/CLI
managed c++ and from C#.
I defined the following enum in a VS dll project set to be compiled with the
/clr switch:
public enum Days
{
Sunday
};
After building the project, I added the created DLL as a refer... more >>
Implementing near string matches
Posted by Gustaf at 11/22/2006 12:00:08 AM
This is for an educational program in which the user is asked to type
things and have the answer validated. I can manage alternative
spellings, but if the user types "ikipedia" when the answer is
"Wikipedia", I'd like to do something special. I tried to search for
this, but I don't know what... more >>
Stream stats
Posted by Michael C at 11/22/2006 12:00:00 AM
I've heard it's possible to extract information from a game as it's running.
For example some people extract the RPM of a car and have a real tacho
connected to their PC, or just log certain information to a file. How is
this done? I've tried google but can't find anything because I'm not sure... more >>
Object design question
Posted by Peter Richardson at 11/22/2006 12:00:00 AM
Hi,
I'm wondering if someone can help me with some design questions I have. I'm
trying to create a class in C# to represent my customers. I know how to
create teh Customer class and all, but my problem comes with some conceptual
issues I have:
Let's say I have a business layer and a data... more >>
get count of ReadLine in StreamReader
Posted by somequestion at 11/22/2006 12:00:00 AM
Question 1.
i am using StreamReader Class like this...
string str = string.Empty;
StreamReader sr = new StreamReader(fsIn,Encoding.Default)
while ((str = sr.ReadLine()) != null)
{
// wanna get line Count of Sr
}
i just want to get a count of s... more >>
Form inheritance
Posted by Alan T at 11/22/2006 12:00:00 AM
How do I create an inherited form in a Class Library project ?
... more >>
Listview click question
Posted by Alan T at 11/22/2006 12:00:00 AM
I want to catch the event when I click the listview.
However, if the listview is empty, I cannot catch the click event.
... more >>
GUI Buttons like VISTA
Posted by Howie Meier at 11/22/2006 12:00:00 AM
Hi,
i´am searching a good tutorial "how to create buttons" (the
images/Icons) like the look and feel from vista. I want to polish up a
C# dialog application.
How do you make the icons ?
Thanks in advance,
Howie... more >>
Exception from HRESULT: 0x8007007E
Posted by zoltix at 11/22/2006 12:00:00 AM
Hello,
I have a problem with an IIS server on windows 2003 server. I developed a web application on Windows Xp with the standard classes
Membershi(System.Web.Security.SqlMembershipProvider, System.Web.Security.SqlRoleProvider). When I finished my development I copy my Web application on the ... more >>
test
Posted by tony at 11/22/2006 12:00:00 AM
design question
Posted by tony at 11/22/2006 12:00:00 AM
Hello!
What is the recommended way to solve design when creating system today.
Assume you use windows forms.
You can use thin client PC(terminal server) which is a special kind of PC
where you put all the execution on the server and only show the presentation
on the client or you can use a tr... more >>
|