all groups > c# > july 2005 > threads for thursday july 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
System.Diagnostics.ProcessStartInfo to start a session
Posted by Eranga at 7/7/2005 11:57:25 PM
I have a windows application in C# which has the following method
public void InitiateSession(string server,string userName, string passWd
)
{
//To start the command
System.Diagnostics.ProcessStartInfo psi = new
System.Diagnostics.ProcessStartInfo();
psi.FileName = @"C:\WINDOWS... more >>
Printing in dot Net
Posted by Pohihihi at 7/7/2005 11:42:11 PM
Hello NG.
I am using System.Drawing.Printing NS to print few label style printouts. I
figured out how the basics goes in that namespace but there are still few
things that is holding me up from completing my work. Basic problem is that
when I select to print many copies or collate printout ... more >>
Writing a new KEY-VALUE pair into configuration file
Posted by VenuGopal at 7/7/2005 10:33:02 PM
Hi,
i have to write a new KEY VALUE pair programatically into the app.config file.
is this possible? i tried the ConfigurationSettings.AppSettings but it
raises an exception saying that Collection is Read Only.
so the question is ... upon clicking a button i want to add a new KEY VALUE
p... more >>
Method name expected
Posted by Vishu at 7/7/2005 9:48:09 PM
I m getting this error "Mehtod name expected" in my following code.
protected int GetSelectedIndex(string CID)
{
DataTable dt = ddlDataSet.Tables["Jobs"];
for(int iLoop = 0; iLoop <= dt.Rows.Count - 1; iLoop++)
{
if(Int32.Parse(CID) == Int32.Parse(dt.Rows[iLoop]("job_id")))
... more >>
dataset nulls
Posted by drg at 7/7/2005 8:14:02 PM
I have a DataSet with a DateTime field. I am using an EventRow r, to update
it with values from a TextBox in a DataGrid. Suppose a DataGrid in edit mode
had a field with value: 7/7/2005. Then the user deletes this value. Now, I
want to update the DataSet (I know how to update the database) wit... more >>
Looking for Olap cube with support for images
Posted by Joe at 7/7/2005 7:37:30 PM
I'm looking for a olap cube that can support having images in the cell. I
would want the images to all appear on a single line when not expanded and
single lines when they are expanded.
... more >>
How to assign the changed datatable in dataview back to a datatable?
Posted by TaeHo Yoo at 7/7/2005 6:32:24 PM
Hi all,
After sorting and grouping data using a dataview, then how to transfer
the changed datatable in the dataview to a datatable in C#?
Cheers
*** Sent via Developersdex http://www.developersdex.com ***... more >>
Programatically Login
Posted by Zachary Burns at 7/7/2005 5:04:31 PM
I'm trying to scrape a page that requires me to login to it. I'm not sure
if it uses cookies or not to track if I'm logged in, could it be using
viewstate?
Anyway, can I do this using the HttpRequest and HttpResponse methods?
I didn't see anything on google groups about this that was of a... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Can't get past Specified cast is not valid error
Posted by .Net Sports at 7/7/2005 4:54:29 PM
I have a datagrid codebehind script that takes data from sql dbase and
displays it in a footer row as a total. One column has amount_dollars
(which works fine), while another has new sales (which is "newstotal"),
but I'm getting an error (System.InvalidCastException: Specified cast
is not valid)... more >>
creating classes
Posted by TS at 7/7/2005 3:39:08 PM
When have a class, but need some info that is contained in other class, is
it worth the overhead to instantiate both objects if you only need 2
properties, or let those other properties piggyback on the first class which
would make it kind of ugly.
thanks!
... more >>
Best way to compare two sets of data
Posted by Terry at 7/7/2005 3:04:22 PM
I've got a situation where I have a set of data, and later take another
snapshot to obtain a second set of data. There will be one or more
changes in the second set of data and I need to be able to tell which
items were in the first set missing from the second set and which items
were added... more >>
handling dialog box
Posted by ronenk NO[at]SPAM tauex.tau.ac.il at 7/7/2005 2:05:08 PM
I have this code to load an authentication form once my app is loaded.
I want the authentication form to be closed if a user is authenticated
successfully and to give the option to close app on his decision.
private void MainForm_Activated(object sender, EventArgs e)
{
AuthFrm StartUpfr... more >>
Timeout exception with HttpWebRequest.getResponse but not IE
Posted by Jason Manfield at 7/7/2005 1:43:02 PM
I have the following URL:
http://patft.uspto.gov/netacgi/nph-Parser?Sect1=PTO2&Sect2=HITOFF&u=/netahtml/search-adv.htm&r=2&p=1&f=G&l=50&d=ptxt&S1=((teeth+OR+member)+OR+provide)&OS=+(teeth+OR+member)+OR+provide&RS=((teeth+OR+member)+OR+provide)
Accessing it with the following code snippet (which... more >>
How do you convert Eastern Time zone to GMT datetime
Posted by GG at 7/7/2005 1:36:36 PM
I have some datetime values in SQL server stored in Eastern time zone.
I need to convert them to GMT.
The pc that I will be running the app has local time zone set to eastern
time.
Is this code enough for the translation to GMT?
DateTime easternDateEime = value from the db;
easternDateEime.... more >>
SetChildIndex in ControlAdded Event
Posted by Jaret Brower at 7/7/2005 12:58:03 PM
I have a user control from a 3rd party that I want to make sure is at the 0
index of my form's Controls ControlCollection. To accomplish this I've tried
catching the ControlAdded event from the Controls object and then if the
control being added is of the right type, i do a:
Controls.SetC... more >>
Unmanaged C++ .lib to C#
Posted by Marty at 7/7/2005 12:45:30 PM
Hi,
I want to wrap an unmanaged c++ lib file (mylib.lib) to use it in a
VS.NET 2003 C# project.
I use the DLLImport but it can't see the lib file. Is it because it is
a lib file instead of a dll?
[DllImport("c:\\myLib.lib")]
public static extern string myFunction(string strTest);
... more >>
Save
Posted by Alvo von Cossel I at 7/7/2005 12:41:01 PM
hi,
you can create a file with the savefiledialog. once you have done that and
edit the file in the text editior that i wrote you cannot save the file, you
can only create a new file or replace the old one.
how do i save it again?
--
Alvo von Cossel I of Germany... more >>
Macros in c#
Posted by karunakar at 7/7/2005 12:32:17 PM
Hi All
I would like to use "Primaryid" instead of " Int32". how do i define it in
c#
Regards,
Venu.
... more >>
HttpContext.Current.Response.Redirect
Posted by Peter Kirk at 7/7/2005 12:26:50 PM
Hi there
I have a program written by another company (it's a "web control" which
returns a web-page: can I compare this to a servlet in the Java world?),
which they think is causing problems on their server.
But no-one really knows if this program is at fault because the problem only
exh... more >>
Docking and Movable Toolbars
Posted by Amey at 7/7/2005 12:03:06 PM
How to develop a dockable toolbar that turns into a palette window in C#.NET
2003. Similarly how to insert icons in menubars.
Regards
Amey... more >>
savefiledialog
Posted by Alvo von Cossel I at 7/7/2005 11:22:04 AM
hi,
i have a form with a multiline textbox in it. it also has a savefiledialog.
how do i save the text in the textbox?
can anyone help me?
i'd be grateful if you could!
--
Alvo von Cossel I of Germany... more >>
Convert Image to stdole.StdPicture
Posted by Joe at 7/7/2005 11:09:12 AM
I was looking at the StdPictureClass to see if it could be useful but I
can't seem to find any documentation on it.
The image is drawn dynamically therefore I cannot use OleLoadPictureFile
API.
Thanks,
Joe
... more >>
Separating a listed application in different folders
Posted by \ at 7/7/2005 10:54:15 AM
Hi dear Guys/Girls,
I want ur assistance to following issue
" At present in my project i m listing down all the folders or file in single
plane.
The customer would like to add ability to separate the listed applications in
different folders
We can think of application page as users start... more >>
sorting a datagrid in descending order
Posted by Newbie at 7/7/2005 10:31:04 AM
i am able to allow the user to sort the columns of my datagrid, but only in
ascending order. is there a way to allow sorting in descending order? thanks
in advance.
private void Page_Load(object sender, System.EventArgs e)
{
string sTODS = "Select * From TaskOrder";
SqlC... more >>
CodeDOM, declaring and setting a constant private field
Posted by DapperDanH NO[at]SPAM nospam.nospam at 7/7/2005 10:25:02 AM
Using CodeDOM, is there a way to declare and set a private field.
Something like:
private const int tableConstant = 10;
//Provide the type and variable name
CodeMemberField mymemberfield = new CodeMemberField(fieldType,fieldName);
mymemberfield.Attributes = MemberAttributes.Private;
... more >>
System events
Posted by spp at 7/7/2005 10:19:33 AM
How can I save the contents of System events into a new file and the clear
this event log.
I want to do programaticaly something like using event viewer with Save Log
File As... and then Clear all events.
... more >>
Filtering a ListBox
Posted by Greg Smith at 7/7/2005 9:42:26 AM
Is there a quick and dirty way to filter the lines displayed in a ListBox?
Any help is greatly appreciated.
... more >>
MS Guidelines for designing Windows dialog?
Posted by Mats-Lennart Hansson at 7/7/2005 9:32:07 AM
Hi,
I know that there is a guideline written by Microsoft on how to design your
windows dialogs. However, I can´t find it. Can anyone provide me with a
shortcut?
Thanks,
Mats-Lennart
... more >>
Formatting doubles
Posted by Homer Simpson at 7/7/2005 8:59:37 AM
Hi,
I'm looking for a way to format the output of my double value. For example,
the result of a calculation may be 12.3456789 but I want to display 12.346
(three decimal places of precision). How do I do this?
Thanks,
Scott
... more >>
how does (23+40)/2 become 31?
Posted by Homer Simpson at 7/7/2005 8:57:29 AM
Hi everyone,
I wrote a quick method to perform a calculation to determine the average of
two numbers. When 23 and 40 were used, the result was 31, not 31.5! I
discovered the problem, I was using long data types, not double. So, how
does c# and/or .NET round numbers? Does is just truncate th... more >>
WMI Hard Drive physical location and drive letter problem
Posted by jimdscudder at 7/7/2005 8:47:19 AM
How can I use WMI or a WqlObjectQuery to find the hard drive letter of the
physical drive location index.
For example the following code will give me the physical drive location:
StringCollection propNames = new StringCollection();
ManagementClass driveClass = new ManagementClass("Win32_DiskD... more >>
Remoting Impersonation/Delegation problem
Posted by martinpare258 NO[at]SPAM community.nospam at 7/7/2005 8:40:12 AM
Hi,
I am working on a n-tier app using remoting. I am using the VS 2005 beta
2. My server needs to access a remote resources on behalf on the connected
user.
I have configured my server like :
<channel ref="tcp" secure="true" port="8081" impersonate="true">
and my clie... more >>
Set StartUp Path FolderBrowser
Posted by MAF at 7/7/2005 8:40:06 AM
Does anyone know how to set a specific path for the FolderBrowser object?
here is my existing code.
private FolderBrowserDialog m_fb = new FolderBrowserDialog();
private DialogResult RunDialog()
{
m_fb.Description = m_description;
if (startUpPath == null)
... more >>
dataview not sorting properly
Posted by Phil Townsend at 7/7/2005 8:33:38 AM
I have a DataView derived from a Dataset object that gets its data from
an xml file. I am setting the Sort property of the Dataview object to
alphabetize the dataview. However, the resulting dataview is not sorted
but appears in the order of the original xml file. No exceptions are
thrown. Code ... more >>
Equivalent For Path.DirectorySeparatorChar
Posted by Jim Heavey at 7/7/2005 8:19:02 AM
Is there an equivalent for "Path.DirectorySeparatorChar" (VB.Net) in c#?... more >>
date time picker weekly
Posted by gregmalenky at 7/7/2005 8:15:13 AM
Visual C# 2005 Express -
I am creating a employee scheduling program for work.
When I need to do is for the program to open with a start date of the
previous sunday. I also want the ability to change the start date to create a
new schedule - however, it must begin on a sunday. I want the su... more >>
30 day trial
Posted by CodeRazor at 7/7/2005 7:57:07 AM
How is it possible to have the functionality as seen in many "try before you
buy" software apps that give you a free 30 day trial.
How could you mimic this in c#? I'm looking for theoretical approaches.
How is it able to count down 30 days.
....Session variable clears with every session, so... more >>
A generic error occurred in GDI+.
Posted by John Hoffman at 7/7/2005 7:33:01 AM
Hello,
I need some advice on what a generic error is and how to debug it...
Any ideas?
System.Runtime.InteropServices.ExternalException: A generic error occurred
in GDI+.
at System.Drawing.Graphics.CheckErrorStatus(Int32 status)
at System.Drawing.Graphics.FillRectangle(Brush brush, ... more >>
Is Double Encryption in possible in C#/.NET
Posted by viduras NO[at]SPAM gmail.com at 7/7/2005 7:22:20 AM
Hi,
Is there any way in .NET/C# where double encryption can be used in
exchanging a symmetric key ?
If I ellaborate it further, say in a client server application, the
symmetric key that would be used for encryption-decryption would be
generated. The server and client has already exchanged ... more >>
String formatting question
Posted by DanC at 7/7/2005 6:25:04 AM
How would you do the following in C#?
sprintf(szBuff, "MAC Address: %02X-%02X-%02X-%02X-%02X-%02X\n",
MACData[0], MACData[1], MACData[2], MACData[3], MACData[4], MACData[5]);
assuming that MACData had previously been defined as: unsigned char
MACData[6];... more >>
printing a datagrid
Posted by Newbie at 7/7/2005 5:42:01 AM
i have a c# asp.net webform that contains a datagrid. the datagrid has a
vertical scroll. i need to give the user the ability to print the datagrid's
entire content (all the rows). IE's print menu prints only the rows that are
currently shown. thanks in advance.
string sqlcmd = sqlSelect +... more >>
combobox
Posted by Alvo von Cossel I at 7/7/2005 5:41:04 AM
hi,
i have a combobox in a form. i want the user to be able to type in
something, do something else and then when he/she wants to type something
into the combobox, they have the thing they typed earlier as an autocorrect
option. how do i do this?
can you please help?
cheers
--
Al... more >>
openfiledialog for text editor
Posted by Alvo von Cossel I at 7/7/2005 5:36:04 AM
hi,
i have an openfiledialog and a multiline textbox. i want to be able to open
text documents in it. can you please give me the c# code to do this?
by the way, the textbox is called textBox1 and the openfiledialog is called
openFileDialog1
--
Alvo von Cossel I of Germany... more >>
ToolBar Icons problem
Posted by udir at 7/7/2005 5:00:03 AM
Hi,
I created a toolbar, added button and Icons from an ImageList.
The icons are transparent for disable mode.
The problem is that the icons does not look good, a blue outlet is added to
the icon.
If the image is not transparent everything looks good, but of-course, when
the buttons ar... more >>
Adding a Schedued Task using WMI
Posted by Gopinath M at 7/7/2005 4:38:01 AM
Hi,
I'm trying to add a scheduled task in Windosw XP operating system using
C#.net 1.1. Can you please tell me how to do this? Please provide code
snippets if possible.
Many Thanks in advance
Gopinath. M... more >>
Using Excel components
Posted by [Yosi] at 7/7/2005 4:31:02 AM
Can I make an Excel file without having Excel in my PC ?
I want to create Excel files from my C# application , then open those files
later in another PC who have Excel installed .
As we can open and read from Access files in C# application without having
Access in this PC in this case we inst... more >>
MS world Mail merge at runtime
Posted by Raj at 7/7/2005 3:44:01 AM
I have written a program which does late binding to generate mail merged
documents. Its working fine on the dveleopment machine. When I make a build
and run it on machine (framework installed) specially on NT 4 machine it
gives me the following error
***************************************... more >>
Adding control event handlers in VS .NET 2003
Posted by Jan at 7/7/2005 3:33:01 AM
When designing a form you place some controls on the form.
In a Visual Studio C++ project I can right click on a control to insert an
event handler.
The dialog for this lists all events for that particular control and also
which events you already have a handler for.
How do I do the same thin... more >>
Aspect oriented Programming
Posted by (cmrchs NO[at]SPAM yahoo.com) at 7/7/2005 1:36:47 AM
Hi,
I'm looking for a good Aspect-compiler + clear tutorial enabling me to experiment a little with the world of Aspect oriented Programming.
Anybody knows some good sites ?
Any help greatly appreciated
Chris
**********************************************************************
Se... more >>
Is it possible to know when TextBox loses focus to which object it
Posted by Gidi at 7/7/2005 1:18:04 AM
Hi,
Is it possible to know when TextBox loses focus to which object it lost it?
what i mean is when the LostFocus Event occur is it possible to know which
object got the focus instead?
thanks,... more >>
Listview vertical scrollbar only
Posted by tJ at 7/7/2005 12:15:55 AM
I am trying to replicate the functionality/display of the MS Outlook
attachment box.
I now know how to gather the file type icons and I'm able to use them
in my listview with its' view property set to "smallicon".
My problem is that when many items are displayed in the listview, BOTH
the ho... more >>
Calculator
Posted by Rodrigo Ferreira at 7/7/2005 12:00:00 AM
I'm developing a user control with a textbox inside. When i write something
like this:
123 + 456.456 + 456 / 453 * 45 + 4.155
and press ENTER, the control must have to show the result.
I don't know how to start!
Anyone can help me?
... more >>
Newbe Question. Adding items to Combo Box
Posted by Gav at 7/7/2005 12:00:00 AM
I am using VS 2005 and am trying to add items to a combo box using C#. I
know how to add simple text items but I am trying to add a value and some
text ie.
Value Text
A First Text
B Second Text
I've seen examples of ListItem but I can't seem to get this to work, can
anyb... more >>
Xml problem
Posted by quest at 7/7/2005 12:00:00 AM
<?xml version="1.0" encoding="UTF-8"?>
<VV version="2">
</VV>
I have a simple xml as above. I posted it (using HTTP post command) from my
Win32 app ("text/xml; utf-8" specified) to http handler written in C#. To my
surprise, I am gettting something like this from my http handler :
"%3C%3Fx... more >>
How to use Strings Class in C#
Posted by ad at 7/7/2005 12:00:00 AM
I want to use
string MyString="Test99";
Strings.Rigt(MyString,2);
to get the "22" from my string.
But I can't do that with CSharp.
Strings is belong to Microsoft.VisualBasic Namespace.
How can I use it with CSharp?
... more >>
Microsoft Enterprise Library - LoadDataSet - Stored Procedure
Posted by Vivek Sharma at 7/7/2005 12:00:00 AM
Hi,
Currently I am executing my store procedure using EXECUTEDATASET and
retreiving results in untyped dataset. I read somewhere that I can retreive
typed Dataset using LOADDATASET. I looked at the option and found
Database.LoadDataSet Method (DBCommandWrapper, DataSet, String)
Is it ... more >>
DataSet
Posted by Vivek Sharma at 7/7/2005 12:00:00 AM
Hi,
I have a dataset displaying the records. If someone adds a record
currently, I have to execute the SP again and reload the dataset. Is it
possible that a user can add a record to table and at the same time to the
current dataset and reload the dataset rather than requerying the databa... more >>
|