all groups > c# > september 2004 > threads for thursday september 9
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
Word does not show up when trying to open doc thro C#
Posted by vaishp NO[at]SPAM gmail.com at 9/9/2004 11:54:47 PM
Hi,
I am trying to open an existing word document, the execution happens
with no error but Word does not come up and my document does not open.
This is the code I am using..
Microsoft.Office.Interop.Word.ApplicationClass WordApp = new
Microsoft.Office.Interop.Word.ApplicationClass();
o... more >>
Tool Tip for disabled control
Posted by Rachel Suddeth at 9/9/2004 10:00:53 PM
I didn't know what to put for a subject, so I just tell you a problem
requirement they want for my ap. If the user hovers over a disabled control,
they want a text bubble to explain why it's disabled. (This does not seem
unreasonable. There are tool tip bubbles coming up on the disabled toolbar
... more >>
using reflection to get array of type
Posted by Gary Brewer at 9/9/2004 9:58:03 PM
G'day,
If I have an object of type 'Type' how do I get a type of the same object as
an array of x dimensions at runtime?
For example,
Type t=typeof(string);
Type tAsArray=typeof(string[]);
Can I programmatically get tAsArray from t without having to explicity
declare the type at... more >>
Is it possible to use C++ code in C#?
Posted by Nick at 9/9/2004 8:43:00 PM
Hi,
Is it possible to use C++ code directly in C#? (not by COM interop)
Thanks.... more >>
Easy Question about SDK Code New
Posted by john_20_28_2000 NO[at]SPAM yahoo.com at 9/9/2004 8:08:38 PM
I got the code below from the .NET SDK. I am still new to C# and I
don't understand how the code works. And by that I mean I don't
understand how the program knows to execute it. I can find no entry
point besides main. I cannot find an event that calls the code. It
is a simple GDI+ applicat... more >>
Webform: Password Textbox Server Control
Posted by Chris Scragg at 9/9/2004 7:44:34 PM
Hi all:
Through a Session variable, I am populating among other things the password
field in a user's profile page (the Webform);
this.TextBoxConfirmPassword.Text = Convert.ToString(Session["sPassword"]);
The odd thing is, when you view the Webform, the password (if even it were
maske... more >>
Please tell me the absolute beginner level GDI+
Posted by john_20_28_2000 NO[at]SPAM yahoo.com at 9/9/2004 7:23:23 PM
I am beginning using GDI+, C#. I am trying to find the absolute
beginner place to start. Most places assume I know System.Drawing. I
just can't put it all together. Code snippets alone don't help.
Thank you.... more >>
Raising events cross threads
Posted by Wavemaker at 9/9/2004 6:17:12 PM
I have a component class that has a set of events. The class
uses a worker thread to do some processing. When it is
finished with the processing, it raises the appropriate
events.
Problem, since these events are being raised in the worker
thread, the clients connected to the events are receiv... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
How to receive repeated MouseHover events in form/controls?
Posted by amyn NO[at]SPAM ideamancer.com at 9/9/2004 5:47:13 PM
Receiving a single mouseHover is simple, just move the mouse over my
control and wait. However, following this mouse hover event, if I
move the mouse around within the control and once again wait, nothing
happens. I have to move out of the control's perimeters and come back
and wait to trigger... more >>
Looking for .NET alternative to the LockWindoxUpdate function
Posted by Steph. at 9/9/2004 5:09:49 PM
Hi,
Is there a .NET alternative to the LockWindowUpdate from Windows's =
user32 dLL ?
Or is the only way to get this kind of function to import it from the =
DLL and by this way making the .NET application only running on Windows =
System ?
Thanks for help,
Steph.... more >>
reading "binary struct"
Posted by Pawe³ at 9/9/2004 5:06:11 PM
Hi!
I want to read with C# some binary file with well defined binary structure.
In C++ I was declaring appropriate struct, like:
typedef struct {BYTE b1; WORD w1, w2; DWORD dw1} REKORD1;
REKORD1 buff ;
and then read record from file with
read (file, (void *) &buff, sizeof (REKO... more >>
UDP and Packet size
Posted by SRLoka at 9/9/2004 4:05:44 PM
I am designing a UDP server(still on paper) that will receive data from
various client applications(residing on PocketPCs using GPRS)
I am using Richard Blum's 'C# Network Programming' as my guide.
One thing I wanted clarification on was, when the author says "UDP
maintains message boundary... more >>
Setting default selection on tab page
Posted by Rachel Suddeth at 9/9/2004 4:03:14 PM
I have an form where the whole display is a tab control (well, that plus a
status bar.)
I want to set the focus to the first TextBox on the first TabPage when it
loads. I tried to put that into the FormLoad event, but the form still comes
up with the focus on the tab for the first tab page. An... more >>
Directory.Move
Posted by rv at 9/9/2004 3:49:24 PM
I am developing an ASP.NET website with C#, VS 2003 and Framework 1.1. For
some reason every time I execute a Directory.Move command, the next command
takes 10-20 seconds to execute. Has anyone else experienced this? I just want
to rename a directory, so if there is a better way I am all ears... more >>
ebook chapter
Posted by Joel at 9/9/2004 3:44:26 PM
Hi all,
Do you know some sites wich offer to download sample chapter of book about
dotnet ?
I'm very interested in this free documentation :-)
Thank you in advance
Joel
... more >>
problem with text in DataGrid
Posted by PawelR at 9/9/2004 3:35:13 PM
Hi,
I use dataGrid to show data from DataBase. In one table I've text field
(varchar 2048) and data in this field is very long (more characters). How
show this text in datagrid as multiline or which component use to show
multiline date.
Thx PawelR
... more >>
StringBuilder Q
Posted by Vai2000 at 9/9/2004 3:33:02 PM
Coming out from the VC++ Background I was trying to clear the Stringbuilder
object with sb.Length=0
Is this approach OK? If not what's the alternative, looks like I have run
into an exception when the size of the SB is gargantous!! like > 200MB
Please advice
TIA
... more >>
Upload file via HTTP
Posted by Paw Pedersen at 9/9/2004 3:18:13 PM
I would like to do the same in C# code as a simple html page does with this
code:
<form action="http://vej-w2k3-psp/sslmodtag/WebForm1.aspx" method="post"
ENCTYPE="multipart/form-data"
ID="Form1">
<input type="file" name="test" ID="File1"> <input type="submit"
ID="Submit1" NAME="Submit1"... more >>
Loading an image, modifying that image, losing mods when minimized
Posted by Novice at 9/9/2004 3:05:04 PM
I'm afraid I will incur the wraith of Mr. Powell on this one - but I did read
his #1 FAQ and some others and I still can't figure this out.
I created this little c# app. and I have a PictureBox in my Form. I load
this image from the filesystem into the PictureBox and then I draw random
lit... more >>
InstallUtil.exe is not recognized as an internal....
Posted by shaddock NO[at]SPAM gmail-dot-com.no-spam.invalid at 9/9/2004 3:02:50 PM
Hello,
When trying to run the InstallUtil.exe, I get the error below. Any
insights?
'installutil' is not recognized as an internal or external command,
operable program or batch file.
Thanks
Stewart
... more >>
newbie: nullterminated array's to string ?
Posted by dtdev at 9/9/2004 2:23:15 PM
When translating a char array to a string, does C# treats bytevalue 0x00 as
terminator as in C ?
I have an char array with strings that ends with 0x00 as stringterminator -
if ToString() doesnt work with this, what should i do instead ?
... more >>
Code dom and Attributes
Posted by Wayne at 9/9/2004 2:15:38 PM
I need to add some attributes and look at existing attributes to a property.
Not the private/public stuff, but rather something like:
System.Xml.Serialization.XmlElementAttribute
What should I look at for doing this?
Thanks
Wayne
... more >>
pull text from a web site
Posted by Mark at 9/9/2004 12:59:14 PM
Using the code below, I can pull the text from a file and store it in a
string. I'd like to be able to do the same thing with a web site ...
perhaps www.cnn.com. How can you do this?
StreamReader objStreamReader = File.OpenText("c:\somefile\blah.txt");
//Replacing this with a URL errors out.... more >>
change the value of a custom attribute on a <BODY> tag
Posted by Chris Millar at 9/9/2004 12:46:58 PM
wondered if anyone could help me - i'm trying to control the value of an
attribute of the BODY tag on a page. So i've got:
<html>
<body test="colin">
<form ......
** content **
</form>
</body>
</html>
I want to affect the value of the 'test' attribute from the code-behind
file.
I'... more >>
"strncpy()" equilvant ?
Posted by dtdev at 9/9/2004 12:32:54 PM
hi,
i have a:
char[] record = new char[100];
In this i am loading a fixedlength record from a file.
What i would like to do, is to copy segments from this array into either
smaller strings or smaller arrays.
In C i would probably do something like this:
strncpy (field1, &record... more >>
XmlDocument.Close ???
Posted by kids_pro at 9/9/2004 12:10:11 PM
Hi there,
I can not find Close method of XMLDocument object.
How long will it stay in the memory after it created.
How can I make sure that it not in the XmlDocument object I create no long
exist?
Will dipose or = null help?
Cheers,
kids
... more >>
Problem with Bound TextBox on TabControl
Posted by sandman at 9/9/2004 12:03:16 PM
When you put a bound TextBox on a tab control, the underlying Text
property does't get loaded until the tab age is clicked and the text box
is visible. Why is that? Is there a way around it? How can I validate
the data on the tab pages that the user didn't visit?
*** Sent via Developersdex... more >>
Conditionally exclude from Release build
Posted by Nevyn Twyll at 9/9/2004 11:47:44 AM
I have a bunch of test case classes (.cs) files in my executable.
For security and bloat reasons, I don't want them to compile into a Release
executable - only into a Debug build.
How do I conditionally exclude files or classes from my Release builds?
In old C++ we would use #ifdef ... #end... more >>
Create an array of pointers?
Posted by Wendell Wilkie at 9/9/2004 11:23:37 AM
I am working with a 3rd party unmanaged dll, and I need to pass an array of
char* as an argument.
I can used fixed to get a single char* as follows:
char[] buf = new char[64];
fixed (char* p = buf) { ... }
But I do not know how many of these to create until runtime. I cannot think
of a ... more >>
SubForms?
Posted by John Smith at 9/9/2004 10:50:01 AM
Hey folks,
I'm creating a Windows application in C#. I have a form with 2 tabs. I
want the second tab to display a different form as its' contents.
I thought I remembered doing this back in VB6 days by adding a Sub Form. Is
this still possible, and if so, how do I do it?
Thanks!
... more >>
Operator Overloading?
Posted by JP Wrye at 9/9/2004 10:33:48 AM
Hello All,
I'm wondering if the following is possible. I'm explicitly overloading
SqlParameter, but get the following error when I try to convert to and from
arrays.
Cannot convert type 'EntityPersistence.DataFieldParameter[]' to
'System.Data.SqlClient.SqlParameter[]'
Thanks,
JP
... more >>
32K limit in TextBox ?!
Posted by Paul E Collins at 9/9/2004 10:33:17 AM
I'm writing an application with a TextBox control on its main form.
I'm running the application under WinXP Pro, so (as I understand it)
there should be no practical limit to the number of characters in a
text box.
However, when I paste in a large amount of text, the text box
truncates it at ... more >>
Double Dispatch in C#?
Posted by dan NO[at]SPAM nonsequitor.com at 9/9/2004 10:25:40 AM
I'd like to find an elegant solution to the problem of calling a
certain function based on the types of two parameters. In my case,
the functions compute the distance between different types of
geometric objects, and I want to call the function that gives me the
most accurate distance.
I hav... more >>
Passing a "str.basic_string" from C#
Posted by ScottyO at 9/9/2004 10:18:34 AM
Hello,
I have some legacy C++ code that was re-written as a managed class. I made
a C++ class library with it and I want to use it in my C# program.
I created a reference to it and it instantiates the object ok, but when I go
to use one of it's methods I have a problem.
The method requir... more >>
Session time out event?
Posted by Kavvy at 9/9/2004 10:14:45 AM
Is there an event that triggers when a Session times out?
I want the Intranet site I'm developing to automaticaly inform the user that
they have been logged off.
Thanks,
Rich.
... more >>
Datagrid Multi Row Select???
Posted by Darryn Ross at 9/9/2004 10:11:43 AM
Hi,
I need to delete all the selected records from a Datagrid, but i cannot seem
to work out how from code you can tell what records are selected in order to
build my adapter delete command?
Any help would be great.
thanks
Darryn
... more >>
type difference
Posted by Viktor Popov at 9/9/2004 10:09:26 AM
Hi,
I am tryind to delete from a table using a Stored Procedure, but I don't
know how to do the following:
The DELETE STATEMENT must be:
DELETE FROM MESSAGES
WHERE MSSGID IN (@MSGIDS)
The problem is that @MSGIDS always is something like this:
1,3,5,7,11,12. It's VA... more >>
pass byte-array by reference from c# to managed c++
Posted by Ekim at 9/9/2004 9:47:18 AM
hello,
I'm allocating a byte-Array in C# with byte[] byteArray = new byte[5000];
Now I want to pass this byte-Array to a managed C++-function by reference,
so that I'm able to change the content of the byteArray and afterwards see
the changes in C#.
(if you wanna know more details: the goal i... more >>
convert
Posted by Ion Lenta at 9/9/2004 9:18:10 AM
Hi,
I have in database a colomn "color". In this colomn colors are saved in
hex format. Now, I have to use this format for windows BackColor.
1. Can I use this format directly without some convertions?
2. If no, how can I convert (add) it to RGB format?
Thanks a lot,
Ion.
... more >>
Remoting and calling functions in another class
Posted by msmont NO[at]SPAM yahoo.com at 9/9/2004 9:06:17 AM
What I want to do is call a function in my main form/class from the
server (which the another program/client calls). The main form does
not really create a server object so I can't pass the frmForm class
into the constructor of MyServer (the client side would have no idea
what to pass into that... more >>
How to get the parameter and return types of a delegate from its Type?
Posted by Ruediger Klaehn at 9/9/2004 9:05:22 AM
I have written an arithmetic expression compiler. Now that it is finished I
would like to give it a nice interface. Currently I have this interface:
delegate double Function(double x);
class ArithmeticExpression
{
public static Function Compile(string text);
...
}
This can be used lik... more >>
Regex.Replace to make links
Posted by Hugo Wetterberg at 9/9/2004 8:50:30 AM
Hi,
I would like to make a regex replace in a text where links are specified
like this:
Click here[http://www.info.com] to read more about this subject.
And i would like to have it translated into:
Click <a href='http://www.info.com'>here</a> to read more about this
subject.
Is it pos... more >>
How big can XML file be?
Posted by kids_pro at 9/9/2004 8:09:40 AM
Hi there,
I have a quick question. I want to store all my data in XML file so that I
don't need to depend on database backend. But I wonder how big can my XML
file be?
I don't mind to span the data into multiple file but I less I know the
limitation first.
Cheers,
Kids
... more >>
Extracting String Info from WebRequest Cookie
Posted by James Johnson at 9/9/2004 7:43:40 AM
Dear C#dex,
I define a variable: HttpWebRequest webRequest and run the following
request
webRequest = WebRequest.Create(TARGET_URL) as HttpWebRequest;
The webRequest object returns values and in the debugger I can see the
value I want in the property
webRequest._ChallengedUri.Absol... more >>
Updating excel
Posted by Dwight Trumbower at 9/9/2004 7:19:56 AM
There has to be a better way than the following code. My main area of
question is getting data from a cell.
This following statement is the only way I can get it to work. Just seems
like to much clutter.
ConvType = CurWorkSheet.get_Range (CurWorkSheet.Cells[Row,
3],CurWorkSheet.Cells[Row, 3]).... more >>
Unbind a textbox
Posted by jonesg NO[at]SPAM boystown.org at 9/9/2004 6:06:51 AM
How do I unbind a textbox in C#.
Thanks... more >>
using the ListBox class and File I/O
Posted by Light at 9/9/2004 4:43:19 AM
Hi
I am a relatively inexperienced and I need help in this, what seems to
be a simple task
I am trying to read from a text file which contains a list of peoples
names in the format 'Surname Firstname' e.g 'Mo Greene'
each line in the textfile is a name. I want to select a name, I was
thinkin... more >>
Network programming book
Posted by Terry at 9/9/2004 3:51:20 AM
Could someone please suggest me a good book to learn
network programming.
I have been programming in C#/VB.NET/VB 6.0 and have
also used a bit of C++ (not MFC/ATL/COM)
I am a total novice when it comes to networks and I don't
even know the basics.
I need a book which teaches me ev... more >>
Constructor call within a constructor
Posted by Greg at 9/9/2004 3:46:11 AM
Is it possible to call a constructor from within a
constructor
I mean
Class A
{
public A(string getModifiedVal)
{
.........
}
}
Class B
{
public B()
{
//Do some processing to get modifiedValue
A(mod... more >>
How to use resource file (like a icon file, icon1.ico) in C# codes?
Posted by Brian at 9/9/2004 3:34:53 AM
I have already created a resource file (icon1.ico).
... more >>
Passing an Enumeration Variable by Ref
Posted by johndoe NO[at]SPAM driver.net at 9/9/2004 3:28:29 AM
I have MyEnumeratedSet { ... some values go here ... }
I have a variable that is defined as
MyEnumeratedSet MyVariable;
I have a function that needs to be able to set a variable by Ref
MyFunction(ref System.Enum Parameter)
{ ..... Parameter has to be set here }
so I have tried calli... more >>
TextBox.textChanged
Posted by Camelia_Flower at 9/9/2004 3:15:08 AM
I create a new Textbox from code and i assign it a default value,
TextBox AddQtytxt = new TextBox();
AddQtytxt.Text = "test";
When the user change the text (to "testDone") i want to redirect the user to
a page and write the new value entered by user, i tried to use :
AddQtytxt.Attributes["on... more >>
|