|
Hi!
With VS2005 you can directly reference an exe, IIRC.
With VS2003 or earlier, you can simply rename the .exe to .dll and reference this file.
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
|
I created a .dll in C# using the "Class Library" option in Visual Studio .NET 2005. I also created a test application, and the .dll works flawlessly with it. The problem comes when I try to add it to Access (2000 or 2003). Access says it can't be done. I have come to believe that I need to register the .dll and I've tried to do so using the following lines in the command prompt:
cd /d %windir%\system32
regsvr32 "(absolute path to .dll)"
When I do this, I get an error saying that it can't find the entry point of the .dll. I don't know how to fix this. Any help is greatly appreciated.
-Fred Morstatter
|
|
|
|
|
Hi , to register your .Net DLL as a COM like stuff, you have to use regasm.exe tool, also do not forget to give the [GUID.....] attribute to your class,
you can also go by another approach of using tlbexp.exe to get a COM like dll and then register using regsvr32.
Live and let live
|
|
|
|
|
You're mistaken. The dll is not a COM dll, and therefore cannot be registered. What makes you think that Access should be able to use a .NET dll ? 2000 is before .NET was released.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Hi Chris,
We can export it in to COM using tlbexp, is that not possible??
|
|
|
|
|
1. How to get actual usage of processor?
2.How to get actual usage of RAM ?
3.How to get list of physical drives ?
4.How to get information about network card?
I will be very greatfull if you could give me answer to any of that questions, thank you very much in advance!
|
|
|
|
|
WMI is what you need for most of this. To get the drives is easy, there's an API that returns them all, in System.IO, from memory.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Could you tell me some more about it?
|
|
|
|
|
hi there.
to use WMI, visit "http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/wmi_reference.asp"
here is an example to collection physical drive info.
namespace: System.Management
ConnectionOptions conOpt = new ConnectionOptions();
conOpt.Username="administrator";
conOpt.Password="password";
ManagementScope localScope = new ManagementScope("\\pcgnadeem",conOpt);//computer name
ManagementObjectSearcher searcher = new ManagementObjectSearcher();
//searcher.Scope=localScope;//required only for remote computers
ObjectQuery query = new ObjectQuery("Select Name from Win32_LogicalDisk Where DriveType=3");
searcher.Query=query;
ManagementObjectCollection ResultsCollection = searcher.Get();
foreach(ManagementObject obj in ResultsCollection){
MessageBox.Show(obj["Name"].ToString());
}
|
|
|
|
|
hi,
in the link below is an example of what I want to achieve, but in a smart client winforms app.
in my app, the listboxes would be directly on the Employee add/edit form.
http://examples.codecharge.com/ExamplePack/ManyToManyListboxes/ManyToManyListboxes.php?emp_id=20
i've been googling for days, but haven't found an example, and I am too unexperienced to figure it out by myself.
any help or pointing in the direction very much appreciated
am using VS2005, in a C# Windows application.
Let's say I want a form to add a new Employee and assign projects to him on the same form by having a list of available projects and a list of selected projects.
Should the first list box be databound to a bindingsource ? When I assign a project to the employee it should dispaear from the available list, but not from the underlying database.
The selected projects should add records to the Employee_project table (join table for the many to many relationship)
I'd like to see an example of this using bindingsources as the datasource for the listboxes.
i'm using nettiers/codesmith
|
|
|
|
|
hi all,
I am presently creating a text editor for c# .In that application I would like to include one help file in the menu item for c#.I have written the help file in notepad and now when I click the c# menuitem it should open the help notepad to the viewer.
can anyone tell me how to do this.
Don't wait to hear a word of thanks from anybody when you help them instead ask them to help three other people and ask them to continue in chain.
|
|
|
|
|
you could try Process.Start()
ex Process.Start(@"C:\windows\system32\notepad.exe",@"C:\help.txt")
More Info[^]
Don't be overcome by evil, but overcome evil with good
|
|
|
|
|
hi all,
I am presently creating a text editor for c# .In that application I would like to include one help file in the menu item for c#.I have written the help file in notepad and now when I click the c# menuitem it should open the help notepad to the viewer.
can anyone tell me how to do this.
Don't wait to hear a word of thanks from anybody when you help them instead ask them to help three other people and ask them to continue in chain.
|
|
|
|
|
process.start can be used to open a file with the default program.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Hi,
I am working on simple file downloader but I got stuck, I dont know how to limit speed of download ?
Is there any way to limit download speed ?
|
|
|
|
|
I want to draw a line on the panel of another form(such as Form2),part of
the code :
private void button3_Click(object sender, EventArgs e)
{
Form2 form = new Form2();
Graphics graphics = form.panel1.CreateGraphics();
graphics.Clear(System.Drawing.SystemColors.Control);
Font drawFont = new Font("Arial", 10);
SolidBrush drawBrush = new SolidBrush(Color.Red);
Pen pen = new Pen(drawBrush);
graphics.DrawLine(pen, 0, 0, 100, 100);
form.ShowDialog();
}
But I couldn't see the red line,I don't know why.
Thanks for your help!
|
|
|
|
|
Try this
private void button3_Click(object sender, EventArgs e)
{
Form2 form = new Form2();
Graphics graphics = form.panel1.CreateGraphics();
graphics.Clear(System.Drawing.SystemColors.Control);
Font drawFont = new Font("Arial", 10);
SolidBrush drawBrush = new SolidBrush(Color.Red);
Pen pen = new Pen(drawBrush);
form.Show();
graphics.DrawLine(pen, 0, 0, 100, 100);
}
|
|
|
|
|
Thank you very much!But when I move the Form2,the line disappear.
|
|
|
|
|
That is because the form gets damaged. You have to redraw the line each time the form gets damaged.
|
|
|
|
|
You're confusing the concept of "drawing a line" with "creating a static line control". Drawing is done in response to a paint message by Windows. The call to form.Dialog() causes the instance of Form2 to repaint itself. Since the form doesn't contain a red panel with a red line, it isn't shown when the form is displayed.
/ravi
|
|
|
|
|
Thank you very much!But could you conduct me to solve the problem,"creating a static line control".
|
|
|
|
|
After making an executable program in Visual .NET C#.
I click to the icon of the program and the windows is appearing.
And I click second time, the another copy of the program is appearing.
I'd like to avoid from opening copy of the program even after clicking to the
icon of the program.
How to avoid from copy of windows.
|
|
|
|
|
Hi,
just use the search[^] function.
Robert
|
|
|
|
|
Search the forums and articles for "single instance", these are the right keywords you are looking for.
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|