|
hi
this solution is not true way for answer of my ask :
public class Form2 : Form
{
private TextBox _textBox;
public TextBox RemoteTextBox
{ get{ _textBox = value; } }
// ...
}
form2.RemoteTextBox = form1.textBox1;
and that don't change Form1.textbox1.text from Form2 . please help me and say other ways and give an example or source or article ....
thanks..
regards...
|
|
|
|
|
public class Form2 : Form
{
public TextBox textBox1;
}
public class Form1 : Form
{
public TextBox textBox1;
{
Form2 f = new Form2();
f.textBox1.Text=this.textBox1.Text;
}
}
|
|
|
|
|
hi
my problem do not solve yet ..
my problem is :
How to access control properties from another Form ???
Please help Me ///
|
|
|
|
|
Don't report the same question every few hours. It'll just get you ignored...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I have an odd issue with this field. Previously, I could create a new message and set my own CorrelationId and my program was working fine. Now, when I try to set this property, I get an InvalidOperationException. Here is my code:
queue.MessageReadPropertyFilter.CorrelationId = true;
Message message = new Message(orderID.ToString(), new XmlMessageFormatter(new Type[] {typeof(String)}));
message.CorrelationId = orderId;
queue.Send(message);
If I randomly set the CorrelationId to a value such as "0305ba20-7160-4ddb-be81-58246a273b76\6157", it doesn't throw the exception. Anyone know why I previously could use any number for this field but now I can't? Is there a setting for this somewhere?
Thanks,
Brian
|
|
|
|
|
If you use VS .NET 2005 the debugger typically shows you a brief information why the InvalidOperationException has been thrown, like "File xyz musts be of type abc".
Does it provide some additional information in this case?
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
No, I'm using 2003 and it just give me the exception and stack trace. The msg inside the exception is "Identifier is not in the incorrect format". I assume that's a typo on MS' part, but I believe you are supposed to be able to supply any correlation ID and I know I had this working previously.
Thanks
|
|
|
|
|
Any ideas on this? What really confuses me is that I had this working with a integer correlationId like 12345. I tried running the exact project that had run before and now it doesn't. Has there been a service pack that could have changed this?
Thanks
|
|
|
|
|
I have never worked with Messaging and CorrelationIDs before, therefore I can't help you. Did you switch from .NET 1.1 to .NET 2.0 perhaps?
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
No, but thanks for the help. I have not upgraded anything myself, but I do keep Automatic Updates on, so a patch could have been applied.
|
|
|
|
|
You can use a correlation ID like this and it works.
@"00000000-0000-0000-0000-000000000000\6157"
I can use this, but would sure like to know what changed.
|
|
|
|
|
Greetings:
I need help: I have this DLL, originally written as a windows API library. It is a driver for a USB port. One of the most important functions that are imported from this DLL is one in which you must supply an "event" handle (the kind you create using "CreateEvent" from Win32 API). The idea is, this function accepts the event handle and then triggers that event to wakeup the receive-data thread.
I thought it would be a matter of using [ImportDll] directives to import the API functions that I would need, namely: CreateEvent, CloseHandle, SetEvent, ResetEvent and WaitForSingleObject. I thought all of these functions and procedures would be found in kernel32.DLL but when I try to execute any of these, I get the "MissingMethodException".
Has anybody done anything like this? Am I going about this the right way?
The bottom line is that the USB DLL requires an event, already created and not-signaled. When characters are received, the USB DLL internal code will signal the event and my thread will awaken to service the new characters. I don't see any .NET functions that create events that I can pass to this routine.
Thanks in advance to anybody that helps.
Mark
|
|
|
|
|
|
hi
i want to access Form1.textbox1.Text and change it from Form2 ,How to do that ???
|
|
|
|
|
Form2 needs access to textBox1. There are various ways you can accomplish this. One might be...
public class Form2 : Form
{
private TextBox _textBox;
public TextBox RemoteTextBox
{ get{ _textBox = value; } }
}
form2.RemoteTextBox = form1.textBox1;
|
|
|
|
|
hi and thanks
can you show me other ways for solve this problem ???
regards ...
|
|
|
|
|
This is actually bad OOP practice. Form2 would be forever linked and totally dependant on the existance of Form1. Form2 should never care about Form1 at all. Each form is responsible for the manipulation of the controls on it, not other forms.
If you need to do something on Form1, expose an event on Form2 that Form1 subscribes to. This way, other forms can subscribe to that event and do whatever they need to do in response to that event.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi
I have a few string/int i want to save when i close the application.
For example i have:
priavete int Score_one = 0;
then when using the program, the value will be changed to something else, then i want it to store the the new value and load it when the app run next time.
It is for a game, to save highscores, so I cannot use xml or Registry because some people are smart enough to go change it inside
Can anyone help me how to save the int when the app close? or give show me an article which describe something similar?
Thanks
QzRz
|
|
|
|
|
save it in an encrypted xml file / registry
daniero
|
|
|
|
|
hi
you can too create serializable class with a member(s) that save your values and save it in your file.
regards..
|
|
|
|
|
Yes, ofcause. Why did I not thought of that...
Thanks
|
|
|
|
|
Hello folks . i have some pretty problems with windows management and really i am sick from these problems i will declare them now for you for any one having a help please share it between us .
First iam developing An application that deals with windows management more than any other tasks iam involved in win32 . i need the following tasks.
1 - When a user turn on the computer i need to replace the windows default authentication form with my own form containing Password Text box for accessing this pc.and if the password is granted the authenticator form enables the windows to complete starting , if the password is wrong the windows still showing that password form and don't load any further.
2 - i need to lock the workstation as when you click any dialog box of log off or Shut down the desktop behind and the whole environment is locked you can't open any thing on the desktop . i used LockWorkstation Method found in User32.dll
<br />
public class authenticator<br />
{<br />
[DllImport("User32.dll,SetLastError=true)]<br />
public static extern bool LockWorkStation();<br />
}<br />
And it works it locked the workstation like if you are switching users on the windows xp but it gives me the windows authentication foreground can i replace this with my own form ?????
3- How can i disable my application to be uninstalled from add/Remove Programs from the control panel or how can i set a password for uninstallation ?????
Thanks everybody . Anyone has any proven solution for any of the above problems please don't hesitate to share it for the developers here on this forum.
Thank You Everybody
Human Knowledge belongs to the world.
|
|
|
|
|
snouto wrote: When a user turn on the computer i need to replace the windows default authentication form with my own form containing Password Text box for accessing this pc
Can't be done without replacing the Windows system file MSGINA.DLL with your own implementation. This is FAR from a trivial thing to do and don't even think of doing it in C#. This is best done in Visual C++.
snouto wrote: And it works it locked the workstation like if you are switching users on the windows xp but it gives me the windows authentication foreground can i replace this with my own form ?????
Again, MSGINA.DLL.
snouto wrote: 3- How can i disable my application to be uninstalled from add/Remove Programs from the control panel or how can i set a password for uninstallation ?????
You don't want to do this. System admin's can set policies where users cannot install/uninstall software, but an Admin can. I know if you made you stuff to where I couldn't uninstall it, say I had a problem with it, I'd be aggressively(!) hunting you down for a full refund.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi, I've just started studying web apps with C# and was wondering how I would make an XML document on a webserver only readable and writable by my ASP.NET app?
It will hold things like passwords and I only want the "Account Editing" pages to have any access to it.. I dont want users navigating to it, downloading it, reading it or editing it directly in any way, etc.
Could any one point me in the right direction?
Cheers.
|
|
|
|
|
Put the file outside the web root, or in a non-public folder.
---
b { font-weight: normal; }
|
|
|
|