|
Hi,
Does anyone know how I would go about creating a .NET class library that is reentrant between multiple
applications? I need to use this mechanism to "share data" between applications on the same PC. Basically I need to ensure that all applications are using the one and only instance of the DLL. In the "old days" I would have written a reentrant DLL. What is equivalent in .NET? From digging around on MSDN I think I would create a singleton class and use remoting to access it or am I talking nonsense?
Cheers
alan
|
|
|
|
|
objectiveal wrote: From digging around on MSDN I think I would create a singleton class and use remoting to access it
Yep, that's exactly what you would use! More information can be found here[^].
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
|
Thanks guys,
I now have an object that is being used remotely (although on the same PC) via 2 client programs. I am calling methods, setting properties and receiving events from the shared object.
However, what I now need to know is - is this object "thread/process" safe. At the moment I am not using Locks or Monitors or anything on my shared object methods. If I want to make my object "thread/process" safe do I need to implement this or does the remoting architecture automatically take care of this?
Thanks again.
|
|
|
|
|
|
leppie, could you be a little more specific? You just want to display a specific menuitem in a certain location?
|
|
|
|
|
Nick Parker wrote: could you be a little more specific?
Like popping up the File menu, as if you would click it, but I wanna call it from say a button click or some other handler. I am trying to implement some functionality like menu accelerators without using the Mnemonic property. I just want to show a specific menu.
xacc.ide-0.1.2.6 New syntax highlight screenshots of xacc.ide
|
|
|
|
|
Gotcha, one solution would be to use an empty context menu as a container, and where ever you want to invoke your parent menu, simply merge the menu items into the context menu, which you can call the Show method of the context menu, associate it to a specific control and give the Point at which you want it to be displayed.
|
|
|
|
|
Nick Parker wrote: which you can call the Show method of the context menu, associate it to a specific control and give the Point at which you want it to be displayed.
The problem is where do u make that Point? Maybe a SendMessage will have an answers. I really dislike this native control layers they have...
xacc.ide-0.1.2.6 New syntax highlight screenshots of xacc.ide
|
|
|
|
|
I have written a program that access an sql server 2000 database installed on a windows 2003 server machine. Sql server is setup with integrated security and i don't want to change this. if i install my app in a computer that is a member of the domain and logins windows with the credentials of a windows server user account works good. Is there anyway from a computer that is on the same network that logins using a local windows account and does not have access to network resources access sql server? the result i want to have is :asking username and password for a windows 2003 server user account within my app and authenticate the user against windows server when the user wants to access the db.
Thanks in advance
From Greece:
Dimitris Iliopoulos
dimilio@yahoo.com
|
|
|
|
|
Hi, I have a principal class with properties and a GUI form. The menu on the form allows the user to pull-up a second form to input property values. How can I transfer the property values (text-box inputs) from the second form to the properties of the first class.
I've tried from the principal class (in menu-event code)
Form_params fp = new Form_params();
fp.ShowDialog(this);
so I pass 'this' to the next class. Is this right and how do I access the handle in the second class?
Thanks,
-Jay
|
|
|
|
|
Your description is confusing to say the least.
Are you saying the you want to show a second form that has a bunch of TextBoxs and you want to apply the values of these TextBox to the properties of your first Form???
Easy enough. Expose the vluaes of the TextBox's as Public Properties on your second form. Get the values using these property accessors and assign them to the properties of your form.
Form2 f2 = new Form2();
f2.ShowDialog();
this.Text = f2.TextValue;
public class Form2 : blah
{
public string TextValue
{
get
{
return this.TextBox3.Text;
}
}
}<pre>
Form Handles will have nothing to do with this at all.
RageInTheMachine9532<font size="-1">
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome</font>
-- modified at 11:14 Tuesday 7th February, 2006
|
|
|
|
|
I guess you are wondering how to access the "this"
Form_params( Form1 form)
{
// this refer to the form 1 now
...........
}
|
|
|
|
|
I have a 2 datatables
first one has only one column "FILENAME"
second one has columns "FILENAME","PATH","TITLE","LAYER"
FIRST DATATABLE HAS 20 ROWS
SECOND DATATABLE HAS 30 ROWS WHICH INCLUDES ALL 20 "FILENAME" OF FIRST DATATABLE.
NOW I WANT HAVE A NEW DATATABLE ROWS WHICH ARE THERE IN FIRSTTABLE AND COLUMNS AND CONTENTS OF SECOND DATATABLE
venkat
clavib
|
|
|
|
|
I wrote a program in c# and add it a setup deploying project.
I tried to Install the program on a client computer but I got an error:
EventType clr20r3 P1:... P2:....
P3:.... P4: system.windows.forms P5:.... P6:....
P7:.... P8:..... P9:.............
The "...." means just a bunch of latters or numbers that don't mean a thing..
When I install the program on my PC (the one that have VS) I don't get an error.
any Idea?
|
|
|
|
|
oh how I wished my errors massaged me.
I dont think the client machine you are trying to install on has the .NET framework.
|
|
|
|
|
I have developed an FTP Client and it is being used by several people to download from an FTP Server, via non-secure port 21, then using secure FTP to upload the files to my ftp://FTP. It works on everybody's FTP server, but this one. Every time it goes to download the files, the error log states "Download of info.txt Failed because No connection could be made because the target machine actively refused it." Can any one tell me why the ftp server would refuse the connection. The log file says it connected to the machine. He can also run FTP through the command line and get the file from the FTP server and then upload it to my FTP server. Any ideas or suggestions would be appreciated.
Thanks,
|
|
|
|
|
|
I detect if the connection needs passive mode and if it does it changes it.
Thanks,
|
|
|
|
|
I have heard of a way to code a save button so it will save the item you want to a particular disc platter on a harddisk for example:
A lot of harddisks (Larger ones 100GB+) have discs called platters which hold around 80GB or more each. When you save an item such as a text file it gets stored anywhere on these platters.
What I want my application to do:
1) on save command I want a dropdown box with the number of "Platters" The hardisk has and when you choose one the tiem will be saved on that platter on whereever you want likt this:
saving to: C:\WIndows
Saving on platter (1) this is top platter
Here is links to definitions of harddisk platters:
http://www.google.co.uk/search?hl=en&lr=&oi=defmore&defl=en&q=define:Hard+disk+platter[^]
In the end we're all just the same
|
|
|
|
|
|
Ummm... What idiot told you this???
Yes, hard drives are made up of platters. We all know this. This is basic information about harddrive technology.
But you don't get to pick the platter you want to save data on. The filesystem doesn't even let you do this. It makes managing partitions and volumes a nightmare if this was possible. Besides, what would be the purpose of this??? I can't think of a single good reason to do it.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I want to create a logon screen for my application like this:
The first time you use application you will get a unique random 6 digit characters code (Consists of letters and numbers) and when you start the application again it will ask you for this 6 digit code. If its incorrect, the application will have a messagebox saying "Error wrong code, try again" How would you do this?
In the end we're all just the same
|
|
|
|
|
Google is your friend.
Please dont flood post requests, for random samples of "How do I do XYZ" use google.
|
|
|
|
|
Is ther a way to find out what system requirments your application will need to run when you create it? Cause you aint going to know and people who will use it will need to know. You may need to know like this:
MyApp requires:
Pentium 266Mhz
64MB RAM
400MB Harddisk
x4Speed DVD ROM
ect...
In the end we're all just the same
|
|
|
|