all groups > c# > october 2006 > threads for friday october 27
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.BeginConnect -> "Safe handle has been closed"
Posted by semedao at 10/27/2006 11:47:30 PM
Hi ,
someone know the reason and how to handle it?
thanks
... more >>
Q:Inserting a value to a dataset.
Posted by Martin Arvidsson at 10/27/2006 11:43:49 PM
Hi!
I have a dataset, BindingSource, tablaAdapter.
I issue a BindingSource.AddNew()
After that i want to set a value in the dataset with table name projects and
fieldname projectsub to a specific value. (The value differs from time to
time)
This value is not show on the Form (Where the... more >>
Q: Displaying computed database fields, gives error on saving...
Posted by Martin Arvidsson at 10/27/2006 10:45:10 PM
Hi!
I have two computed datafields that i am displaying in my windowsform.
When i try to update the dataset and commit the transaction.
I get an error message telling me that i cant update calculated fields. That
i can understand
but how to tell the dataset or what ever to NOT do this up... more >>
How do I check to see if a dataset has a DBNull value
Posted by Dave at 10/27/2006 9:20:01 PM
If Iwant to check if dataset1.SelectQuery1[i].column1 ==
System.DBNull.Value. How do I do this? What I wrote above will give an error.
--
L. A. Jones... more >>
Config files
Posted by vicmann at 10/27/2006 9:05:48 PM
If xyz.exe is the executable name...
What's the purpose of "xyz.config" file?
For what is the "xyz.vshost.exe"?
Do they have to be created? Have to distribute them when distributing an
app?
Is there a special config file always called App.config? How is it different
from "xyz.config"?
... more >>
Learning C#
Posted by vicmann at 10/27/2006 9:01:56 PM
1. Put an application in sleep mode so that it consumes as little PC
resource as possible. When triggered by an event, back to normal/work mode.
After done with work, back to sleep mode again.
How can this be done in C#?
2. Is this wrong?
int *p;
*p = 5; // p is never initialized and could... more >>
Enums in a database
Posted by Jay at 10/27/2006 8:40:05 PM
In C# I can set up an Enum so that number are represented as keywords, which is very useful.
Is there such a datatype in a database?
I suppose I could use an extra table, with the ID column as the number, and a corresponding column
with strings representing the keywords. This sounds a bit in... more >>
String Manipulation - Substring, VB function Left, "length safe" Substring
Posted by kellygreer1 at 10/27/2006 8:36:28 PM
What is a good one line method for doing a "length safe"
String.Substring?
The VB classes offer up the old Left function so that
string s = Microsoft.VisualBasic.Left("kelly",200)
// s will = "kelly" with no error
// but
string s2 = "kelly".Substring(0,200)
// results in... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
programming windows media player in c#
Posted by Sirmarty at 10/27/2006 6:14:01 PM
I am using the visual express edition 20005 for C#. I am trying to write a
program which will randomly play songs weighted by a 0 to 100 rating scale.
I can player a single song using the windows media player, but I cnnot play
music continuously. I need to either add an event handler which ... more >>
How in c# lets the window in other procedures above? Is most frontdemonstrated?
Posted by Ares at 10/27/2006 5:45:01 PM
I come from China, English not to be good, sorry.
How in c# lets the window in other procedures above? Is most
frontdemonstrated?
May achieve in VB, how does in c#?
TopMost=true, is not
I need this window physical ability when meida the playerentire screen,
above him demonstrated he... more >>
Byte Swap Class
Posted by O.B. at 10/27/2006 5:26:41 PM
Is the following the best way to do byte swapping in C#? Or is there
something like this already built into the framework and I'm just
overlooking it?
class ByteSwap {
public static UInt16 swap(UInt16 input) {
return ((UInt16)(
((0xFF00 & input) >> 8) |
(... more >>
using vfoxpro dll in clickonce project
Posted by celerno at 10/27/2006 5:16:15 PM
Hi all, first some history: i'm developing an application who access
foxpro databases using VfpOledb provider... but this cause a headache
when i delete rows cause some tables call triggers... to fix it... or
to find other way i make a dll class in vfpro in order to use some
database and execut... more >>
deserialize and utf8 encoding
Posted by Heron at 10/27/2006 4:55:22 PM
Hi,
I'm having a problem deserializing my streams since they are utf8 encoded
(they are being received over tcp/ip) so I was looking for a way to make the
serializer use utf8, is there any?
I'm getting the following error:
There is an error in XML document (0, 0).
innerexception:... more >>
Get Users in my domain
Posted by Ivan Sammut at 10/27/2006 3:17:42 PM
Hi ppl
Is it possible thru c# to get a list of the users & groups in my domain.
10x
Ivan
... more >>
Adding a Click event to a Web Browser control
Posted by Jayyde at 10/27/2006 3:15:39 PM
Can anyone point me to a good guide for how to do this or give me some
pointers? What I'm basically trying to do is use the Web Browser as a
picture box that has a web source for the image, but it doesn't have a click
event for the control (so I can pop up a new window with an enlarged image)... more >>
MS Project interop
Posted by justin creasy at 10/27/2006 2:41:42 PM
Hello, I was wondering if anyone know of some good sources of
tutorials/source code for programmatically working with Microsoft
Project. I've done some interop with Excel in the past but not with any
other MS Office program. Any leads will be greatly appreciated, thanks.
... more >>
Since we cannot unlaod a assembly,Is there any reference about this indicate that this problem won't make smartclient use up memory?
Posted by navyliu at 10/27/2006 1:53:28 PM
I have raised a discussion about assembly unloading.But we can't get a final
solution.
Since we cannot unlaod a assembly,Is there any reference about this indicate
that this problem won't make smartclient use up memory?
Best regard
navyliu
... more >>
IEnumerable<> won't work
Posted by Gustaf at 10/27/2006 12:52:37 PM
Using VS 2005. I got an 'IpForm' class and an 'IpFormCollection' class,
containing IpForm objects. To iterate through IpFrom objects with
foreach, the class is implemented as such:
public class IpFormCollection : IEnumerable<IpForm>
{
ArrayList forms = new ArrayList();
... more >>
Converting byte[] to fixed byte[]
Posted by O.B. at 10/27/2006 12:21:48 PM
Given the following bit of code, the PtrToStructure is not correctly
copying the data into the PDU class. After it executes, the
pdu.buffer[] array looks nothing like the data[] array that I tried to
copy from. Help?
[StructLayout(LayoutKind.Explicit)]
public unsafe struct PDU {
... more >>
Unit Tests & access modifiers
Posted by Michael Bray at 10/27/2006 11:30:13 AM
I've just inherited a fairly large project with multiple classes. The
developer also wrote a huge number of unit tests (using NUnit) to validate
that the classes work correctly. However, I don't think that the class
itself should include unit tests, especially since it has to reference
nun... more >>
Why can't I get my ContextMenu to popup ?
Posted by MrNobody at 10/27/2006 11:27:02 AM
I overrided a TreeView control and then overrided it's MouseClick event like
so:
protected override void OnMouseClick(MouseEventArgs e)
{
// base.OnMouseClick(e);
TreeNode node = this.GetNodeAt(e.Location);
this.SelectedNode = node;
... more >>
How to customize Textboxes User Interface Dialog Box
Posted by André Dumolas at 10/27/2006 11:18:46 AM
I use the setup project of Microsoft Visual Studio.
I would like to customize one of the textbox in the user interface
dialog box of my program setup.
I would like to know if there is a way to add a property to one of the
EditNLabel in order to use it as a password textbox.
Thanks dum... more >>
In the ItemCheck handler of a checked ListView, how to find the Item.text value of the row whose checked value changed?
Posted by sherifffruitfly at 10/27/2006 11:05:35 AM
Hi,
Here's a skeleton-handler of what I'm trying to do:
private void editBbListView_ItemCheck(object sender,
System.Windows.Forms.ItemCheckEventArgs e)
{
string qEnabled = "";
string indexid = ITEM_IN_ROW_WHOSE_CHECK_JUST_CHANGED.Text;
(Update the database linked to the list... more >>
How to access files in a remote system
Posted by KAMAL at 10/27/2006 10:27:31 AM
Hi all,
I want to connect to a system remotely in .net and also i need to
access the files in the remote system. Can any body help me.
Thanks in advance.
Regards,
Kamal.
... more >>
Combobox options only
Posted by Ivan Sammut at 10/27/2006 10:00:22 AM
Hi,
I have a form on which I placed a combobox which then I related to my
database to show a list of countries. Now I need to let the user only select
entries from those available in the Combobox and not start typing anything.
Is this possible?
10x
Ivan
... more >>
How to Share a folder?
Posted by Michael Demb at 10/27/2006 9:49:44 AM
How can I create a share for an existing folder and set a permitions for it?
... more >>
Assign Fileextension to application
Posted by Howie Meier at 10/27/2006 8:50:25 AM
Hi NG,
i want to assign any file with an spezial Extension to an C#
application.
I know how to link the extension in the explorer options to an
application. Can this be done automaticaly ?
How can the application get the commandline parameters during the
start ?
(I am an MFC/C++ progr... more >>
I don't know why this fixes this... any ideas? (System.Drawing.Image.FromStream "parameter is not valid")
Posted by bookon NO[at]SPAM gmail.com at 10/27/2006 8:32:29 AM
I was running into the System.Drawing.Image.FromStream "parameter is
not valid" on some of the images I was retrieving from a blob column in
Sql Server. I thought there were corrupt images as almost all worked
(all are gifs), and only a few broke when this line ran: Image img =
Image.FromStream... more >>
How to add a custom event source in C# / .NET
Posted by T McDonald at 10/27/2006 8:28:02 AM
I've been having a problem writing to an event to the Application log. I
believe the issue is caused by the fact that the source was previously both a
custom log and the source.
I deleted the log using EventLog.Delete(logname);
I couldn't delete the source as it there was an error reportin... more >>
String Declaration
Posted by Jim Heavey at 10/27/2006 8:11:03 AM
I have an SQL statement which is quite long. I want to declare a string
variable with this SQL statement and I want to have span multiple lines. I
could scrunch it all up and place it on a single line, but then the SQL
statement would be unreadable. There was a way to do this in VB, but how... more >>
Efficiency about hashtable, arraylist, string and synchronization
Posted by chrisben at 10/27/2006 7:20:02 AM
Hi,
Here is the scenario. I have a list of IDs and there are multiple threads
trying to add/remove/read from this list. I can do in C#
1. create Hashtable hList = Hashtable.Synchronized(new Hashtable());
2. create ArrayList aList = ArrayList.Synchronized(new ArrayList());
3. create a strin... more >>
How to query for vertical scroll bar in RichTextBox control
Posted by Jesper at 10/27/2006 7:05:02 AM
Hi,
In a RichTextBox control I've have set the properties mulitline = true,
scrolbars.Both
How can I query a RichTextBox control for showing the vertical scroll bar -
i.e. query the RTB for showing all contained text or not?
regards
Jesper, DK.
... more >>
changing css colors
Posted by Sam Carleton at 10/27/2006 6:25:08 AM
How do I change the CSS colors via JavaScript DOM? Let me explain...
I am working on a Windows application (in C#) that displays some HTML.
In one place the HTML is a status window. What happens is the static
HTML page is embedded into the application. The static page displayed
and then the ... more >>
Performance issue!!
Posted by Varangian at 10/27/2006 6:24:43 AM
Hi,
I have a performance issue question?
which is best (in terms of efficiency and performance, I don't care
neatness in code)... building an ArrayList of Object Instances using
SqlDataReader OR using SqlDataAdapter to Fill a DataSet or DataTable ?
Thanks!
... more >>
Add ComboBoxes in runtime based on user input, how?
Posted by svein.erik.storkas NO[at]SPAM gmail.com at 10/27/2006 5:55:30 AM
I'm creating an application where the user first selects a number from
a combobox. Based on his choice of number, ComboBoxes and buttons are
to be created (at runtime of course).
Let's say that the ComboBox is to be named cboTeam and the index number
(cboTeam1, cboTeam2 ...) It is also to be a... more >>
timeout on Stream.Read
Posted by carmelo8 NO[at]SPAM gmail.com at 10/27/2006 5:48:21 AM
Hi there,
I want to timeout Read method of System.Stream class after 30 secs. of
no activity given a certain opened connection. That is, because some
incoming connections to my application just don't give any signal and
my Read method keeps waiting from the socket for some data to be read
ete... more >>
VB to .Net migration
Posted by Kannan at 10/27/2006 5:35:01 AM
Hi,
We are planning to migrate one VB project to .Net. But I have a common
questions. can any one clarify my below questions.
1. Is there is any advantage of using C# than VB.net. I feel both are same
in terms of performance, security and etc., Is it correct?
2. I feel that converting... more >>
Security Issue in Service
Posted by bthubbard at 10/27/2006 5:13:22 AM
Hello All,
I've run into a bit of an issue and I was hoping that someone here
could help me. I have inherited a Windows Service written in .Net 2.0
(C#) from a previous employee. It build successfully and I am able to
install it on the target machine via installutil but when I attempt to
run ... more >>
User Controls for changing form content?
Posted by DrPete at 10/27/2006 3:02:48 AM
Hi,
I'm trying to replicate how other applications work when it appears
there is one form, and the contents changes when the user clicks a Next
button. For example, adding a mail account in Outlook.
How is this achieved? Is it through User Controls? i.e. each "page" is
a user control and ... more >>
take information from web
Posted by Anja at 10/27/2006 2:57:02 AM
Hi,
I would have to transfer some data from web to reporting services. how I can
make this?
Thanks
Anja
... more >>
Visual Studio 2005 - Document window, what's with this drop down?
Posted by Simon Tamman at 10/27/2006 2:35:01 AM
In VS 2005 they've replaced (in the main document window) the handly
lefty/righty arrows with a hideous drop down list.
Anyone know how to change it back to VS 2003 style?
Simon... more >>
Arrow Keys neglected on User Control
Posted by Martijn Mulder at 10/27/2006 12:04:20 AM
/*
I have problems detecting the Arrow Keys on a User Control. A control
derived from System.Windows.Forms.Control neglects 'bare' Arrow Keys
but does react on the combination <Alt> or <Ctrl> + Arrow Key. The code
below shows what I mean. How can I cure this? (excuse me for the line
breaks... more >>
|