|
Dave,
I've only just noticed your last reply, I don't know how I missed that. However, I'm glad you figured it out and thanks for letting me know how, for future reference.
Paul
Why don't you take a good look at yourself and describe what you see - Led Zeppelin, Misty Mountain Hop
|
|
|
|
|
Hi,
I seem to have a problem with a debug version of a DLL that i am calling. It enteres the function OK and goes to the end but when the function returns it tries to store the return value of the functoin in the register ESI from EDX. Visual C# then throws an access violation error. It works fine in release mode and uses the same registers.
Has anybody seen this before and know how to resolve the issue.
Thanks
Ceri
|
|
|
|
|
Ceri wrote:
Has anybody seen this before and know how to resolve the issue.
Not exactly but I have had similar problems before, there are often vast differences between debug and release versions that you don't see.
For example, I've written DLLs for Windows Installer using VC++ which work fine in debug mode and not in release mode. When I switched the release mode optimisation off, it worked fine.
If possible, it's worth looking at the differences in the commandline options for the DLL in release and debug mode and adjusting them until they both act the same way. Then at least you'll know what is causing the problem.
Paul
Why don't you take a good look at yourself and describe what you see - Led Zeppelin, Misty Mountain Hop
|
|
|
|
|
Don't see the relation with C#, appart the fact C# is hosting your client.
Try compiling the DLL by changing the signature of methods (__cdecl, __fastcall, ...) : Project settings / C/C++ tab / code generation / calling convention.
From what I remember, the return value is always stored in EAX.
How low can you go ? (MS retrofuck)
|
|
|
|
|
Hello,
I'm currently playing a lot with the WebBrowser control and C#. I made several programs interacting with the DOM of pages I use for testing.
One of my programs traverse the DOM tree of a page, find all the images tags and click on them. Nothing really fancy .
My point is sometimes when I click on an image a JavaScript is called in the page and this JavaScript opens a messagebox using window.alert.
The problem is that I want to execute the scripts but disable those modal messageboxes who freeze my program.
My question is: how to disable the window.alert function ? Or how to intercept a window.alert call ?
I explored the window object and I think you can't not change the window.alert default behaviour.
Thanks,
R. L.
|
|
|
|
|
A very crude method would be to read in the script before clicking the image and then remove, or comment out any calls to window.alert
What do u think?...too much work maybe
May the Source be with you
Sonork ID 100.9997 sijinjoseph
|
|
|
|
|
Hello,
Thank you for your idea but it is note very nice.
I would prefer a solution:
- to redefine the window.alert behaviour and cancel the opening.
- or to catch all the modal messageboxes opening from IE and close them.
Any idea ?
R. L.
|
|
|
|
|
html filter proxy
How low can you go ? (MS retrofuck)
|
|
|
|
|
Hello Stephane,
Thanks for answering me again.
Your solution sounds good but what is the technical meaning of this term ?
I apologize for my lack of knowledge .
I'm starting to search about html filter.
R. L.
|
|
|
|
|
html filter proxy[^]
No need to tell me that's exactly what you are looking for. I know.;P
How low can you go ? (MS retrofuck)
|
|
|
|
|
Overkill i think
May the Source be with you
Sonork ID 100.9997 sijinjoseph
|
|
|
|
|
My value-object, one like:
[SerializableAttribute]
class sealed class TableNameAsTheClassName
{
private int FieldNameAsTheNumberName_id;
Private string FieldNameAsTheNumberName_name;
public int ID
{
get { return FieldNameAsTheNumberName_id; }
set { FieldNameAsTheNumberName_id = value; }
}
public string Name
{
get { return FieldNameAsTheNumberName_name; }
set { FieldNameAsTheNumberName_name = value; }
}
}
I will transfer this object between data-access layer and business layer from both side. Need it to support strongly named assembly and ApplicationName assemply?
I know if it needs ApplicationName assemply, it has to support stronly named assemply first. Thanks ahead!
|
|
|
|
|
I am trying to figure out how to detect when a popup menu is "showing" and when it is not. I know that the context menu has the popup callback, so I can tell when it is poppuped up, but I can't figure out how to tell if the user gets rid of it w/o clicking on one of the buttons in the menu.
Any thoughts?
Darryl Borden
Principal IT Analyst
darryl.borden@elpaso.com
|
|
|
|
|
Context menus also respond to the disposed event. I'm not sure when exactly this is called, but if it is called when the menu disappears couldn't you set a flag on the popup event and clear it on the dispose event? Then you could use it tell if the menu is currently open?
Just a guess since I've never had cause to do this.
|
|
|
|
|
It sounded like a great idea, but I tried it and the event does not get called when the menu goes away. I think you have to actually dispose of it to generate that event.
Any other ideas?
Darryl Borden
Principal IT Analyst
darryl.borden@elpaso.com
|
|
|
|
|
Hi, I have being trying everything for the last hour and can't find anything in the .NET classes to make a tooltip for the treeview nodes. You can only register the tooltip for the control (the tree) whereas I need to add it for the nodes so when the mouse stops on them the tooltip will show up. I tried many tricks like using the mousepositions and getting the node name by the x and y position and then making a tooltip when the mousemove is fires and things like that. But they all reach an end point where first the code is inefficient and second one thing at least goes wrong (like the tooltip appears for ever and otherthigs like that) Does anyone know how to do this in the propper way?
Thanks
K.D.
|
|
|
|
|
The way you've described it is the way I've done it. Basically, you create a ToolTip on your form. Then in the control's OnMouseHover() event, you use the mouse position to figure out what text should be in the ToolTip, set that text on the ToolTip object, and then enable the ToolTip and show it. After that, you can either have the ToolTip timeout automatically, or keep it alive until the mouse moves out of that TreeNode's visible region.
--
Russell Morris
"Have you gone mad Frink? Put down that science pole!"
|
|
|
|
|
In the following example, I use a Tootip control and I create a new class derived from the TreeNode class. This class contains a Tooltip property. And I display the tooltip when receiving the MouseMove event, using the GetNodeAt method to know what is the node pointed by the mouse.
using System;
using System.Drawing;
using System.Windows.Forms;
class TreeViewWithTooltip: Form
{
private ToolTip m_tooltipCtrl = null;
public static void Main()
{
Application.Run(new TreeViewWithTooltip());
}
public TreeViewWithTooltip()
{
Text = "Tree View with tooltip";
m_tooltipCtrl = new ToolTip();
TreeView tree = new TreeView();
tree.Parent = this;
tree.Dock = DockStyle.Fill;
tree.ShowLines = true;
tree.MouseMove += new System.Windows.Forms.MouseEventHandler(tree_MouseMove);
MyTreeNode myTreeNode1 = new MyTreeNode("This is node 1");
myTreeNode1.Text = "node1";
tree.Nodes.Add(myTreeNode1);
MyTreeNode myTreeNode11 = new MyTreeNode("This is node 11");
myTreeNode11.Text = "node11";
myTreeNode1.Nodes.Add(myTreeNode11);
tree.ExpandAll();
}
private void tree_MouseMove(object sender, System.Windows.Forms.MouseEventArgs e)
{
TreeView tree = (TreeView)sender;
MyTreeNode myTreeNode = (MyTreeNode)tree.GetNodeAt(e.X, e.Y);
m_tooltipCtrl.SetToolTip(tree, myTreeNode != null ? myTreeNode.Tooltip : null);
}
}
class MyTreeNode : TreeNode
{
private string m_tooltip;
public MyTreeNode(string tooltip)
{
m_tooltip = tooltip;
}
public string Tooltip
{
get { return m_tooltip; }
set { m_tooltip = value; }
}
}
|
|
|
|
|
Thanks for the code, but the problem is that I want it to act like regular tooltip which fades away after a while(without going out of the whole tree control) when staying staionary for some time.
Add the following line to your code in the event handler and you will see that the tooltip comes right back on, as soon it fades. I think it somehow calls the mousemove event when the tooltip shows up!
m_tooltipCtrl.AutoPopDelay = 1000;
any ideas?
K.D.
|
|
|
|
|
Hi,
I need to delete files that are in use.
I can´t restart my computer or neither exit programs that are using them. Any suggestions? Need to work on NT/2000 server.
/Ola Carlsson
|
|
|
|
|
You can't delete a file that's in use - that could break someone else's running program. You can mark them for deletion on reboot or you can kill the other programs that are using it.
Paul
Why don't you take a good look at yourself and describe what you see - Led Zeppelin, Misty Mountain Hop
|
|
|
|
|
How do you mark a file for deletion on reboot? I didn't know you could do that! Do tell!
|
|
|
|
|
Registry Key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\
Name=PendingFileRenameOperations
Type=REG_SZ_MULTI
Entry=filename.txt\0\0
Or using the Win32 API, you can use MoveFileEx with a null destination file and MOVE_DELAY_UNTIL_REBOOT.
[edit]Probably worth noting, in case someone comes searching later that the first approach doesn't work on Win 9x or ME, only on NT/2K/XP. To use in 9X, you have to store some details in WININIT.INI; to use in all versions of Windows, MoveFileEx is probably your best bet.[/edit]
Paul
Why don't you take a good look at yourself and describe what you see - Led Zeppelin, Misty Mountain Hop
|
|
|
|
|
Hi,
I've developed a thin client for a project I'm working on, that gets presented with a load of assemblies to load when it connects to the hub (a web server on the network which exposes a few webservices). It then proceeds to load these assemblies using the System.Reflection.Assembly.LoadFrom(<url>) static method.
When it downloads the modules from the server I'd like to be able to display a status message to the user and update a progress bar as to the download size and progress.
This is purely from a support issue side of things, because the application either loads it from the GAC or from the server depending on the version. If a client stop working suddenly it would be nice for the user to be able to tell me when it updated the assembly.
Does anyone have any ideas?
--
Richard
|
|
|
|
|
>>
Richard Smith wrote:
It then proceeds to load these assemblies using the System.Reflection.Assembly.LoadFrom() static method.
<<
I'm not sure about the actual question you ask - but this isn't the preferred method for handling that scenario. I beleive the preferred method for doing this is to use a .config file for your thin client app that uses the <assemblybinding> tag to redirect the assembly loader to a URL when it looks for certain assemblies (as long as those assemblies have strong names). This will allow you to link directly to your assemblies that are to be deployed on the server, instead of having to use reflection.
So if your thin client linked to MyServerSideAssembly.dll, version=1.0.0.0, culture = neutral, public key token = 012345 , you would have a 'yourthinclient.config' file that contained something along the lines of:
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="MyServerSideAssembly"
publicKeyToken="012345"
culture="neutral" />
<codeBase version="1.0.0.0"
href="http://your.server.com/MyServerSideAssembly.dll"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
You would then deploy MyServerSideAssembly.dll to a the 'your.server.com' web server.
The assembly loader will take care of downloading the assembly, caching it, and proceeding from there when the thin client tries to reference a type defined in 'MyServerSideAssembly.dll'.
Take a look at the '.Configuration file schema' in MSDN help to get a good idea of all the nifty things you can do with .config files.
--
Russell Morris
"Have you gone mad Frink? Put down that science pole!"
|
|
|
|