|
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; }
|
|
|
|
|
Wow thanks, it really is easy as that? then the passwords in the XML file are totaly safe?
Cheers.
|
|
|
|
|
They can't be accessed over the web. If your box is hacked you're still sunk though.
|
|
|
|
|
They can still be read by someone on the webserver, but by placing them outside of any web directory they cannot be browsed using an internet URL.
|
|
|
|
|
Hi,
I'm completely new to DirectX, and have managed to create a 3D yawing, pitching, and rolling rectangle that zooms in (with the help of the graphics & game programming book by Tom Miller). I need to cut out a 3D triangle chunk (straight through, nothing fancy) from one of the long sides of the rectangle (about 1/4 size of that side and midway down).
To create my yawing, pitching, rolling rectangle, I used this:
private Mesh mesh = null;<br />
public void InitializeGraphics()<br />
{<br />
...<br />
mesh = Mesh.Box(device, 0.78f, 2.0f, 0.5f);<br />
...<br />
}<br />
protected override void OnPaint(System.Windows.Forms.PaintEventArgs e)<br />
{<br />
...<br />
DrawBox(angle / (float)Math.PI, angle / (float)Math.PI * 8.0f, angle / (float)Math.PI, -0.41f, 0.8f, hDepth);<br />
...<br />
}<br />
private void DrawBox(float yaw, float pitch, float roll, float x, float y, float z)<br />
{<br />
angle += 0.01f;<br />
device.Transform.World = Matrix.RotationYawPitchRoll(yaw, pitch, roll) * Matrix.Translation(x, y, z);<br />
Material boxMaterial = new Material();<br />
device.Lights[0].Type = LightType.Directional;<br />
device.Lights[0].Diffuse = Color.Red;<br />
device.Lights[0].Direction = new Vector3(0,-1,-1);<br />
device.Lights[0].Commit();<br />
device.Lights[0].Enabled = true;<br />
boxMaterial.Diffuse = Color.White;<br />
device.Material = boxMaterial;<br />
mesh.DrawSubset(0);<br />
}
I basically tried following the same steps as above to put a black triangle into that chunk of rectangle.
private Mesh tmesh = null;
(in InitializeGraphics) tmesh = Mesh.Polygon(device, 0.5f, 3);
(in OnPaint override) DrawTriangle(angle / (float)Math.PI, angle / (float)Math.PI * 8.0f, angle / (float)Math.PI, -0.41f, 0.8f, hDepth);
and then a private void DrawTriangle(float yaw, float pitch, float roll, float x, float y, float z) with basically the same innards as the DrawBox (replace mesh with tmesh , got rid of boxMaterial , and made Color.White (so I could see it)).
I'm thinking that this isn't the way to go because it's not doing what I'd like it to do. It appears to create a triangle, but only in 1 plane (Mesh.Polygon doesn't ask for for depth like Mesh.Box does). I then tried creating a bunch of triangles to create layers and it didn't work so well either. What's the best way to cut this chunk out?
Thanks so much!
Mel
|
|
|
|
|
Hi,
I run into a localization problem. I created a framework consisting of a few custom controls I want to use in different applications. I tried to localize the controls into different languages. Now, when I include them into the applications, they never display the local language but the neutral language, although the current culture is german and all strings that are localized in the main application appear in the correct language. Only the user controls that are localized inside themselves are not displayed correctly. I don't have implemented any localization code except the generated code by the designer. Do I have to add any code that tells the controls excplicitely which culture to use?
thanks,
alex.
modified 23-Aug-18 21:01pm.
|
|
|
|
|
You have to create language-specific copies of the .resx files for your custom controls. You do this by setting the Localizable property to True. When you set the language to something other than the default it will create a .resx file with a name something like this "Control.es.resx" if you are localizing to Spanish. So you can have two .resx files. The default will be in German but if your user is on a machine set up with Spanish as the language being used, their computer will load the Control.es.resx file.
Here is a link to an article that discusses this some more.
http://www.ftponline.com/vsm/2005_05/magazine/features/lhuang/[^]
Andy
Deus caritas est
|
|
|
|
|
Thanks, but I did that. all user controls have two resx files. one named "form.resx" and one "form.de.resx". I localized them with the IDE - just as you said. But that is the point where I don't know, why the application shows the correct (.de.resx) files/localization, but the controls don't.
alex
modified 23-Aug-18 21:01pm.
|
|
|
|
|