microsoft.public.dotnet.languages.csharp Archive - October 2002
Post a message to this list
Messages
Page: 12345678
Office Automation (2 replies)
microsoft.public.dotnet.languages.csharp
I'm working with a grid on a WinForm and need to export the data from the grid into several different formats. I've gotten this to work fairly well using Excel (2000) through interop, but I'm curious about using this on system that don't have Excel installed, or that has a different version (older or newer). When I reference the Excel object library from my project, it copies several key DLLs into...
Functions returning C++ references (2 replies)
microsoft.public.dotnet.languages.csharp
Hi, I would like to know how to handle references in C# especially in the case when a function (managed C ) returns a reference. What syntax do I use to get that reference and change the underlying object? I would prefer not to return a pointer and would like to use it like I do in C . E.g. in pseudo code: class Image { public: Byte& Pixel(int x, int y) { return reference to pixel } private: // In...
why the .exe can not work out of bin\debug\? (3 replies)
microsoft.public.dotnet.languages.csharp
Under \debug, I double click .exe, the application can work. But I copy this .exe out (not under bin\debug\), it couldn't, show exception. Do you know why? Maybe I need to change some compile configuration? Thanks! Kevin
getting database data w/out datagrid (2 replies)
microsoft.public.dotnet.languages.csharp
In all my code, I execute a query put it in a dataset and then put it in a datagrid. Then I know how to access the data in the different cells of the datagrid. How do I just select one field value from a table? I assume I don't need a datagrid, but I'm not sure how to access the data otherwise. Thanks!
how to draw from another class (3 replies)
microsoft.public.dotnet.languages.csharp
Hi! I would like to draw to form from my other class. Because class have to calculate and draw something to screen in intervals. How do I do that? I tried to pass Graphics object which I receive in my OnPaint method to that class and save it in private Graphics g and then draw via it when needed. But it doesn't work. So plese tell me how it is done. I'll appreciate it very much! David Krmpotic
SHFileOperation (3 replies)
microsoft.public.dotnet.languages.csharp
using System; using System.IO; using System.Runtime.InteropServices; public class ShellFiles { [StructLayout(LayoutKind.Sequential, CharSet CharSet.Auto, Pack 1)] public struct SHFILEOPSTRUCT { public IntPtr hwnd; [MarshalAs(UnmanagedType.U4)] public int wFunc; public string pFrom; public string pTo; public short fFlags; [MarshalAs(UnmanagedType.Bool)] public bool fAnyOperationsAborted; public Int...
Custom Attributes for automatic logging (3 replies)
microsoft.public.dotnet.languages.csharp
I am exploring Custom attributes. What I would like to do is to create a custom attribute that I can add to any class that would do some logging on that class. For instance, it would call the ToString() method during the constructor (or other method) on a class that was decorated with something like [Log("constructor", Severity "test'] and then it would of course persist the information from that ...
Anything like "Split"? (3 replies)
microsoft.public.dotnet.languages.csharp
Hi, all. Is there any function/method equivalent to vb "split" in C#? Thanx. SK
Error trapping.... (4 replies)
microsoft.public.dotnet.languages.csharp
Hi, all. I am trying to use try...catch operation to trap the error. To be specific, within the catch section, I would like to capture a specific error case (by the error number). How can I do that? In vb world (that's where I am from...), it could be like... if err.number whatever... then 'do whatever. end if Thanx. SK
Connecting to Internet (2 replies)
microsoft.public.dotnet.languages.csharp
Does someone know how to invoke the default dial up connection to connect to the internet? Thanks.
Variable # of single line edit boxes in Dialog Box? (2 replies)
microsoft.public.dotnet.languages.csharp
How do I write a little GUI dialog box that displays a variable number of edit controls: one for each ";" in my path environment variable? I would want to be able to scroll up and down if there were too many ";"'s in the path to fit on the current display. I want to push a button and add a new edit box when I want to add a directory to my path variable.
Late binding? (6 replies)
microsoft.public.dotnet.languages.csharp
Hi all, Is there late binding in c# (.net), and if yes, how? Thanks, Ivan
Alternating Colors on ListView (2 replies)
microsoft.public.dotnet.languages.csharp
It is extremely to display alternating background colors with a DataGrid control, but has anyone had any luck providing the same functionality to a ListView control. Thanks Isaac
Opening a window (4 replies)
microsoft.public.dotnet.languages.csharp
I have an Intranet page with has a button on it that, when pressed, should open up an Intranet link on the same page. I am trying to use the following code: public void btnOpenApprv Click(Object sender, EventArgs e) { Window.Open ("http://brake/dept engineering/ecn/ApprovalECN/ApprovalECN ..aspx"); } When I try and open the page, I get: Description: An error occurred during the compilation of a re...
SHGetDataFromIDList bug ? (2 replies)
microsoft.public.dotnet.languages.csharp
When I use SHGetDataFromIDList, the handle that call the API is directly closed. Has someone an idea why ? [StructLayout(LayoutKind.Sequential, CharSet CharSet.Auto)] public struct WIN32 FIND DATA { public uint fileAttributes; public FILETIME creationTime; public FILETIME lastAccessTime; public FILETIME lastWriteTime; public uint fileSizeHigh; public uint fileSizeLow; public uint reserved0; public...
Reflection.Emit incomplete ? (2 replies)
microsoft.public.dotnet.languages.csharp
Using Reflecion.Emit I am able to make a method which can take my own previously emitted Type by value; but I am unable to declare methods which take this same Type by reference (Type.IsByRef true). I can do this with builtin types such as arrays, but with my own types I get An unhandled exception of type 'System.NullReferenceException' occurred in mscorlib.dll Additional information: Object refer...
ValueMember (2 replies)
microsoft.public.dotnet.languages.csharp
I have a ListBox which I have assigned a ValueMember and DisplayMember from a dataSet in my project. I am wondering, how can I retrieve the ValueMember property of a specific element in the ListBox? If I try listBox1.Items[4].ToString(), I get the DisplayMember. Thanks!
break point in asp.net (2 replies)
microsoft.public.dotnet.languages.csharp
Have any of you ran into the issue of putting a break point in if(!Page.IsPostBack){ } and the break point is not getting there. It was working fine for me. Now it is mysteriously not finding the breakpoint. I use vs.net thanks, M
How to change an Icon of user created control? (2 replies)
microsoft.public.dotnet.languages.csharp
Hi everyone, I have created a control, that is inheriting from TextBox Windows control and has some extra methods. I can add this control to the toolbox, but it shows with a default "Gear" icon. My question is: how can I change this Icon in my control? Thanks a lot for any suggestion. Viktor
datagrid-updatecommand error (2 replies)
microsoft.public.dotnet.languages.csharp
Dear all, I am getting the following error when I press update button on the datagrid. Any help would be appreciated. Error: string truncation: max 16, len 58, value 'Sweet and savory sauces, relishes, spreads, and seasonings' Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it...
(C)API problem C# dotnet (2 replies)
microsoft.public.dotnet.languages.csharp
Hi All, I am trying to migrate old VB6 code to C#. It's function is to monitor CAPI events on my ISDN device. Everything works fine in the old environment. Using dotnet however I encounter strange behaviour. Everything runs fine until the line ' RtlMoveMemory(ref stuMessageHeader, intCapiBufferPointer, 8); '. When this line is executed the subsequent lines are not executed and the form comes back....
parameters for threads (2 replies)
microsoft.public.dotnet.languages.csharp
Hello, Is there any way to give some parameters to new threads? I uses this method: { string ParamForThread "Parameter"; Thread WorkerThr new Thread(new ThreadStart( WorkerThr)); WorkerThr.Start(); } public void WorkerThr() { Parameter this.ParameterForThread; } or is there any better method?
how i can limite the Stream.Readline command? (4 replies)
microsoft.public.dotnet.languages.csharp
Hi, When I use StreamReadline command in my program,it reads all of the line but i want to limeite this command. forexample: if my input file inclouds: ABC1 10 ABC2 6 ABC3 100 i just want it reads only 4 first caracters. thx for any ideas. Anahita
"Protected" Function passed to an Event. (3 replies)
microsoft.public.dotnet.languages.csharp
Hi there, I'm creating a Windows Forms chat application in C#. I think that it would have been good to separate the main ViewForm from the program Logic, so I created a class ViewForm (which replaced the MainForm created by SharpDevelop), and a class Logic. Now, ViewForm has two TextBoxes, one is a multiline outputbox, and the other is a single line inputbox. Logic, when created, gets the pointer ...
Problem with URI and String Concat (2 replies)
microsoft.public.dotnet.languages.csharp
VS.Net IDE is hurting me when I do this: this.cURI ConfigurationSettings.AppSettings.GetValues("testaddr").ToString() txtIP.Text ConfigurationSettings.AppSettings.Get("testvars").ToString(); In my config file I have .... add key "testaddr" value "http://localhost/dev5/cca4.aspx?target " / add key "testvars" value "&method getRecord&nonblocking true" / .... How do I make this compliant so the frame...
Ad
Need Dot Net Interview Questions?
Ask ExamGuru, Inc. for advice and help on Passing .Net Interviews
.Net Projects
Best-of-breed application framework for .NET projects, developed by ExamGuru, Inc. and ExamGuru IT
Free .net Help
Commission ExamGuru, Inc. and his team for your next bespoke software project
FogBUGZ
The only bug tracking system carefully crafted with one goal in mind: helping teams create great software.
Awesome Tools
If you don't know about these, you're missing out... IT Certification Questions
IT Interview Questions
Free Oracle 10g Training
MCSE Boortcamp
Cisco Study Guides
Cheap Study Guides
Exact Questions
Dot Net Interview Questions
Oracle OCP
Cheap Travel
Designer Perfumes - Wholesale Prices
Free Programming Tutorials
 
ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
 Copyright © ExamGuru, Inc. 2001-2006
Contact Us - Terms of Use - Privacy Policy - www.dot-net-guru.com - www.examguru.net - www.oraclesource.net - www.itinterviews.net - www.examguru.net/ITCertification