Click here to Skip to main content
15,918,168 members
Home / Discussions / C#
   

C#

 
GeneralRe: How Do You Disable All Click Events For A .Net Control? Pin
Dave Kreskowiak4-Jun-07 14:00
mveDave Kreskowiak4-Jun-07 14:00 
GeneralRe: How Do You Disable All Click Events For A .Net Control? Pin
Ian Shlasko5-Jun-07 2:52
Ian Shlasko5-Jun-07 2:52 
Questionhow to check free space on disk using FTP client? Pin
wojti4-Jun-07 9:58
wojti4-Jun-07 9:58 
AnswerRe: how to check free space on disk using FTP client? Pin
Dave Kreskowiak4-Jun-07 10:32
mveDave Kreskowiak4-Jun-07 10:32 
Questionchange button shape Pin
ABBASI_RA4-Jun-07 9:03
ABBASI_RA4-Jun-07 9:03 
AnswerRe: change button shape Pin
Tarakeshwar Reddy4-Jun-07 9:07
professionalTarakeshwar Reddy4-Jun-07 9:07 
GeneralRe: change button shape Pin
ABBASI_RA4-Jun-07 9:20
ABBASI_RA4-Jun-07 9:20 
QuestionHow to find name of a library? (beginner) Pin
Christian Bailey4-Jun-07 9:03
Christian Bailey4-Jun-07 9:03 
Something's confusing me about identifying a library whose methods I want to access. In one case I got it to work but it seems oddly difficult to find the name I need to use for that library. In another case it hasn't worked yet.

So, somebody sells a .dll whose functionality I want, and I add this .dll as a reference in the Solution Explorer window. For example, the IMSL Library (as it's called on the CD it ships on), or ImslCS.dll (as the file's named), or ImslCS (as it appears in the Solution Explorer window). And I use its Math.Erf() function by writing Imsl.Math.Erf(). Why in my code does it look like "Imsl" and not "IMSL" or "ImslCS"? It seems to have several names, and this isn't even one of them. I did find it this way in an example, and this is the only way I've tried that does work. But how are you supposed to know the name to use, and can you find the right name from within VisualStudio?

Or in my other example, the SPCIO library, which is for manipulating .spc spectral data files from laboratory instruments. This seems to go by at least a dozen different names. All the names include the phrase "spcio" in various uppercase/lowercase combinations. Some are prefixed by "G" or "g". Some are postfixed by "LIB" or "lib" or "Lib". The documentation uses various versions of this name throughout the discussion and examples, including when explaining methods, and does not even include the name when explaining properties. After some fooling around I found that using "GSpcIOLib" gives me an error message "The type or namespace 'OpenFile' does not exist in the namespace 'GSpcIOLib' (are you missing an assembly reference?)", which looks like it is at least finding a GSpcIOLib namespace. All the other versions I tried just gave me "The name 'whatever' does not exist in the current context" which doesn't sound like it's finding anything. In Solution Explorer its name is "Interop.GSpcIOLib" (which does not work).

So, how is this supposed to work? Is there one real name, and how are you supposed to find it?

My code example follows:



using System;
using System.Collections.Generic;
using System.Text;

namespace Testing
{
    class Program
    {
        static void Main(string[] args)
        {


// Error generated by best attempt to use the OpenFile() method in the SpcIO Library.
// "The type or namespace 'OpenFile' does not exist in the namespace 'GSpcIOLib' (are you missing an assembly reference?)
// [I guess this gets further than all the later SpcIO attempts after it do?]
            GSpcIOLib.OpenFile(@"C:\a\spectrum_fitting\samples\09151024.spc");



// Errors generated by other attempts to use OpenFile() in SpcIO Library.
// All the following attempts create an error of the form:
// "The name 'whatever' does not exist in the current context"
// where whatever is a version of the library's name appearing in its docs.
// UNCOMMENT ONE OF FOLLOWING 5 LINES TO TRY THAT VERSION
//          SpcIO.OpenFile(@"C:\spectrum_fitting\samples\09151024.spc");
//          SPCIO.OpenFile(@"C:\spectrum_fitting\samples\09151024.spc");
//          GSPCIO.OpenFile(@"C:\spectrum_fitting\samples\09151024.spc");
//          GSPCIOLib.OpenFile(@"C:\spectrum_fitting\samples\09151024.spc");
//          GSpcIOLib.OpenFile(@"C:\spectrum_fitting\samples\09151024.spc");



// The following successfully uses a method in another library.
// Where should I be able to find that there is something named "Imsl.Math.Sfun()"
// other than reading it in one of their examples? Why does it look like "ImslCS..."
// in Solution Explorer?
            double x = Imsl.Math.Sfun.Erf(2.2);
            Console.WriteLine("Text Example, {0}", x);
            Console.ReadLine();
        }
    }
}




Thanks!
AnswerRe: How to find name of a library? (beginner) Pin
SimulationofSai4-Jun-07 22:31
SimulationofSai4-Jun-07 22:31 
Questionselected column header datagridview Pin
FernandoMartin4-Jun-07 9:02
FernandoMartin4-Jun-07 9:02 
QuestionEmail merg Pin
merwa4-Jun-07 8:49
merwa4-Jun-07 8:49 
AnswerRe: Email merg Pin
Muammar©4-Jun-07 11:05
Muammar©4-Jun-07 11:05 
Questionget current session ID Pin
crash8934-Jun-07 8:00
crash8934-Jun-07 8:00 
AnswerRe: get current session ID Pin
Tarakeshwar Reddy4-Jun-07 8:51
professionalTarakeshwar Reddy4-Jun-07 8:51 
GeneralRe: get current session ID Pin
crash8934-Jun-07 9:06
crash8934-Jun-07 9:06 
GeneralRe: get current session ID Pin
Giorgi Dalakishvili4-Jun-07 9:20
mentorGiorgi Dalakishvili4-Jun-07 9:20 
GeneralRe: get current session ID Pin
crash8934-Jun-07 9:22
crash8934-Jun-07 9:22 
GeneralRe: get current session ID Pin
crash8934-Jun-07 9:22
crash8934-Jun-07 9:22 
GeneralRe: get current session ID Pin
Tarakeshwar Reddy4-Jun-07 9:47
professionalTarakeshwar Reddy4-Jun-07 9:47 
GeneralRe: get current session ID Pin
crash8934-Jun-07 10:11
crash8934-Jun-07 10:11 
QuestionError 404 Pin
vunhat4-Jun-07 7:31
vunhat4-Jun-07 7:31 
AnswerRe: Error 404 Pin
Jasmine25014-Jun-07 7:49
Jasmine25014-Jun-07 7:49 
QuestionRe: Error 404 Pin
vunhat4-Jun-07 8:33
vunhat4-Jun-07 8:33 
AnswerRe: Error 404 Pin
leckey4-Jun-07 8:57
leckey4-Jun-07 8:57 
GeneralRe: Error 404 Pin
vunhat4-Jun-07 10:19
vunhat4-Jun-07 10:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.