|
I have a MenuStrip that contains ToolStripMenuItem's with submenus. In a few of the submenus, I have two ToolStripMenuItem's to move up or down a list of options with keyboard shortcuts. For example:
RootMenuItem (e.g. File)
SubItem0 (e.g. New)
SubItem1
SelectPrevious (Ctrl+Left)
SelectNext (Ctrl+Right)
---------------------------
Option 0
Option 1
...
Option N
SubItem2
SelectPrevious (Ctrl+Up)
SelectNext (Ctrl+Down)
--------------------------
Option 0
Option 1
...
Option M Now, all of the "Option N" ToolStripMenuItem's have their CheckOnClick property set to true, and they all have the same event handler. When I click the "SelectPrevious" or "SelectNext" options, everything works fine (Option N is unchecked, and Option (N - 1) or (N + 1) is checked, as appropriate). In addition, if the final option is selected SelectNext is disabled, and the same for SelectPrevious when the first option is selected.
Here is the problem: If I use any of the keyboard shortcuts for SelectPrevious or SelectNext, the next time I hover over the associated SubItem, then hover over a different SubItem, the entire menu is closed.
Here are the steps to reproduce:
1. RootMenuItem->SubItem1->SelectPrevious using the shortcut Ctrl+Left
2. Hover over RootMenuItem->SubItem1 until the submenu appears
3. Move the mouse over RootMenuItem->SubItem0 (or SubItem2)
After step 3, the entire menu closes. The next time I attempt to open the menu (without using a keyboard shortcut in between), everything works fine. Basically, every time I use the keyboard shortcuts any number of consecutive times, the next time I open the submenu that hosts a ToolStripMenuItem that was clicked via a keyboard shortcut, the menu closes and resets to some "good" state that allows it to work correctly the next time.
Has anyone else experienced this? Is there any way to fix it, or is it just a .Net bug? I'm using .Net 4.0 on Windows XP SP3, in case it matters. Thanks,
Sounds like somebody's got a case of the Mondays
-Jeff
|
|
|
|
|
I can't say I've seen this exact issue but the mention of shortcut keys and disabled menu items made me recall something similar.
I had a contextmenustrip where items were enabled or disabled dynamically in the Opening event. The shortcut keys were a bit erratic and eventually I discovered my mistake.
What I hadn't understood was that a shortcut calls the item's click event handler directly but only if the item is enabled. The shortcut did NOT trigger the menu Opening event which I was relying on to set the item enabled states correctly.
Is your problem caused by some logical fault related to assumed enable states of menu items?
Alan.
|
|
|
|
|
Thanks for posting a response! However, I don't think that is the issue in this case. The only events I am subscribed to are the click events on leaf items (definition: leaf items are menu items without submenus). All of the buttons in all of my menus are coming out with the appropriate checked and enabled states. The problem is just that something is happening to tweak the menu state when I use the shortcut keys instead of clicking the button through the GUI. None of my code is behaving differently depending on whether the menu items are clicked via shortcut keys, using the keyboard, or with the mouse. This has to be a .Net anomaly, but I was hoping someone else had seen this issue and knew a work-around.
My next step is to comment out each line of code in my click event handler, to see if removing any of the commands makes this work so I can be more specific on what the problem is. Thanks for your time,
Sounds like somebody's got a case of the Mondays
-Jeff
|
|
|
|
|
Hi.
I have a big problem. I need some help with my cheat detector application which I created in C#. This application scan and detect almost all cheat for Counter Strike 1.6, but a cheat it can't be detected with my application because it doesn't modify the size of modules from process hl.exe and it doesn't appear with a strange *.dll
The cheat is called Leis (Silent Aim) and it is just an executable with some files (*.cfg). For the cheat to work , the process hl.exe must be opened and the video renderer of hl must be OpenGL. The cheat is an executable (called leis.exe) which once opened it inject the code into *.dll (i think it is opengl32.dll) and it close. So, it became hard to detect this cheat with my application.
I tried:
* with Checksum (MD5 / CRC32 / Tiger and other) of modules from hl.exe and checksum of process hl.exe - doesn't work, because its the same checksum even though the cheat is activate or not.
* with memory adress - doesn't work.
* with debugger to see the dll necessary for his work: cprytbase.dll , sspicli.dll, sechost.dll , lpk.dll, user32.dll, gdi32.dll, usp10.dll, rpcrt4.dll, advapi32.dll, kernelbase.dll, msvcrt.dll, kernel32.dll, ntdll.dll, imm32.dll, msctf.dll, opengl32.dll, glu32.dll, ddraw.dll , dciman32.dll , setupapy.dll, cfgmgr32.dll, oleaut32.dll, ole32.dll, devobj.dll and user32.dll.
In common with Counter Strike 1.6 it has: ntdll.dll, kernel32.dll, msvcrt.dll, sechost.dll, ole32.dll and opengl32.dll.
Any ideas? Please, I need some help to finish my project
I want to specify that I am still a beginner in C# .
Sorry for my bad english.
Thank you in advance.
modified 19-Apr-12 12:30pm.
|
|
|
|
|
amx_tiger wrote: once opened it inject the code into *.dll
Do a diff between a regular and an infected opengl32 library. Sounds like that's the signature you'd want to detect, not hl.exe.
Bastard Programmer from Hell
|
|
|
|
|
The problem is that the signatures match in each case I said in the first post that I checked the signatures for all the modules used by the hl.exe process, and all the signatures match between them There is no difference between them in: signatures or memory adress for all the modules used by the hl.exe process. This is why I came here with this questions/problem.
Anyway, thank you for the answer.
Another idea?
Again, I am sorry for my bad english
|
|
|
|
|
Use an app that captures and compares the registray, before / after the attack. Use another tool to track what files it's writing.
Does the lei-patch always work, or does it *need* specific versions to work? What happens if the targetted files are readonly?
Bastard Programmer from Hell
|
|
|
|
|
All the version of that cheat (leis/silent aim) run perfectly in any Counter Strike 1.6 (original or modified) which video renderer is set to OpenGL, if I set the video renderer into D3D (Direct3D) or Software, the game with the cheat activated will crush after connection to a server.
I tried to set the folder of counter strike 1.6 to ReadOnly, but the cheat still work I tried to set the attributes at opengl32.dll to ReadOnly, but I haven't access to modify that attributes .
About registry, the cheat seems to don't modify anything .
Thank you for your response
Again, I am sorry for my bad english
|
|
|
|
|
this thing probably modify memory direct without writing to any file, if no address changes between executions, them i think you won't be able to detect this cheat, unless you can scan the memory for inconsistences with a clear hl.exe process...
it's necessary to execute the exe file whenever you want to use the cheat? if yes, them you can simple scan the file system for this exe and assume that the user is using it if it is found.
sorry if i said sh*t, my english sucks and i never tried to make an app like this...
I'm brazilian and english (well, human languages in general) aren't my best skill, so, sorry by my english. (if you want we can speak in C# or VB.Net =p)
|
|
|
|
|
Yes, it is neccessary to run the cheat (executable) everytime you want to play with cheat.
I thought on this solution with a simple scan , but it isn't so efficient because the player can detele the cheat and then to scan of cheats
Thank you for responose
Other ideas?
|
|
|
|
|
Hi all,
It's been few days I have interoperability issue with service WCF(MICROSOFT FRAMEWORK.NET 3.5)deployed in IIS 7.5 and Java client Unit Testing Spring Framework. The service uses a MTOM property to send attached file in the SOAP Header request.
To check if my WebService works well, I developed a C# client and it works, my client .net can communicate with my service .net.
But the goal is to call this service with Java client.
I've done two test, one with SOAPUI and I get this error message :
"IIS 7.5 Erreur détaillée - 400.0 - Bad Request"
and the other one is with a Java client I got the same error message.
I do not have any clue about where does it might come from?
Moreover, I enable Java client and server side, the MTOM property even in SOAPUI.
If anyone got an idea or a solution, I will really appreciate.
Thank you.
My Configuraion Binding Java client Side (Context File) :
<jaxws:client id="myService"
serviceClass="myServiceSoapBinding">
<jaxws:outFaultInterceptors>
<ref bean="clientWSOutFaultInterceptor" />
</jaxws:outFaultInterceptors>
<jaxws:binding>
<soap:soapBinding version="1.1" mtomEnabled="true" />
</jaxws:binding>
<jaxws:features>
<cxf:fastinfoset />
</jaxws:features>
</jaxws:client>
|
|
|
|
|
have to develop a application where to send sql scripts ,Report RDL's or database or files as fixes,to the client who r using our product developed in vs2008 c# and SQL server.
in the application we have to add RDl files or database from front end "browse" button to browse the items and "build" button is clicked it should generate and .exe or .msi or whatever file with the RDLs or Database build with it,and this file will be sent to the client to deployed in there system ,while executing the .exe or .msi file it should be executed in the respective server
|
|
|
|
|
|
Nice requirements !
No memory stick has been harmed during establishment of this signature.
|
|
|
|
|
Please do not cross post
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Please stand in front of my pistol, smile and wait for the flash - JSOP 2012
|
|
|
|
|
And what do you want from us?
|
|
|
|
|
Hi everybody.
I have migrated my software from VS2005 to VS2010, and when debugging my windows services, trying to attach to the process I get this error:
"Unable to attach to the process. Visual Studio has insufficient privileges to debug this process. To debug this process, Visual Studio must be run as an administrator."
So, I run it as an administrator, I checked the permission on VSLauncher.exe and devenv.exe to make it run always as an admin, but I still get the error.
I am an administrator already. Has anybody have this same problem?
BTW, I'm using W7, VS2010.
|
|
|
|
|
Did you try Opening the application as with Run as Administrator? And does the service also run in the same account ?
Sastry
|
|
|
|
|
Thanks for your answer Sastry.
Yes, I tried selecting the box "Run as administrator" on the Visual Studio launcher, and also tried with right click -> Run as administrator. The top of the window says "Visual Studio 2010 (Administrator)" . And the service is running in my user.
I don't know why is this still happening. Any other idea?
First I thought that the problem was to try to debug the code on the network, but I also copied the solution to my C: and it still happens.
|
|
|
|
|
It was a permissions problem.
Win7 comes with a new security system, and I had to add to my profile (even being an admin) this permission:
Control panel -> Administrative tools -> Local Security policy -> Local Policies -> User rights Assignment -> Debug programs -> Add user or group .
And there, I added my own user. Reboot machine(Important!! Without rebooting, it won't work).
After that, I was able to attach processes to debug them. It's been a really long time to solve this, I hope to help other people that find this same problem.
Thanks everybody for your help.
|
|
|
|
|
Hi,
I have created a database inside the windows application project.Now i am trying to insert data into that database 'database.mdf'.But data are not inserted as well as not showing error also.But same code is working for inserting data in database which one i created outside the visual studio using sql server management tool.Why is the problem?
|
|
|
|
|
may be your sql command query problem!!! show me your code then i may help u
|
|
|
|
|
|
If you want help then post any further information here, so it is available for everyone to see. Do not try to create private message threads.
Binding 100,000 items to a list box can be just silly regardless of what pattern you are following. Jeremy Likness
|
|
|
|
|
Debug through your source code, pick up the query from the code and then run it in SQL Server management studio.
This should give you a fair idea of what you might be doing wrong with the query.
|
|
|
|
|