|
How can I get the window's or mouse's screen position in desktop in WPF ?
|
|
|
|
|
|
Windows Presentation Foundation - part of .NET Framework 3.0. It's a new UI platform.
|
|
|
|
|
I try to convert my project from version 1.1 to version 2.0 and using VB.NET.
When I run my project in VS 2005, I get this error:
Visual Studio cannot start debugging because the debug target 'C:\Projects\SCM\bin\SCM.exe' is missing. Please build the project and retry, or set the OutputPath and AssemblyName properties appropriately to point at the correct location for the target assembly.
Any ideas for error message above ??
angela
|
|
|
|
|
Have you checked the upgrade log for your project for any messages? Has the project been rebuilt successfully? Is the account you're logged in under a member of the Debugger Users group?
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I can't rebuilt my project succesfully cause get certain errors, those errors are about name, type of control or form is not defined
I had include one of the reference which is the version 1.0.0.0, isn't this matter cause I can't run my project properly??
By the way, how do I check the account that I logged is under a member of the Debugger Users group and upgrade log for my project
Thanks for your help, Dave Kreskowiak
angela
|
|
|
|
|
angelagke wrote: I can't rebuilt my project succesfully cause get certain errors, those errors are about name, type of control or form is not defined
I had include one of the reference which is the version 1.0.0.0, isn't this matter cause I can't run my project properly??
You can't run your project because you can't compile the bloody thing. Fix the problems first, then it'l compile, then you'll actually have something to run!
angelagke wrote: how do I check the account that I logged is under a member of the Debugger Users group
Right-click MyComputer, pick Manage. Expand the Users and Groups folder, then click on the Groups folder. Double-click the Debugger Users group.
angelagke wrote: upgrade log for my project
The Upgrade log will be in a file in your project's folder, called UpgradeReport.xml. Double-click that to open it in a web browser for all the details on what the Upgrade Wizard did and what it couldn't do.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
ok, i get it.
Thanks a lot for your explaination, Dave Kreskowiak
Angela
|
|
|
|
|
Hi,
So I'm using WMI in .net with C# to start up a set of processes on a large number of remote machines. All is working well in my code to start up the processes and they are showing up fine both in WMI queries as well as in the taskmanagers of the target machines. However, as per the default for process invocation in WMI I cannot see the apps' windows on the desktop of the target machines. I've been searching around all morning to help find an answer to allow the windows to show up on the desktop so i can watch their progress, but the best I could find was some VB/WSH examples like the following...
Const SW_NORMAL = 1<br />
strComputer = "."<br />
strCommand = "Notepad.exe"<br />
Set objWMIService = GetObject("winmgmts:" _<br />
& "{impersonationLevel=impersonate}!\\" _<br />
& strComputer & "\root\cimv2")<br />
<br />
' Configure the Notepad process to show a window<br />
Set objStartup = objWMIService.Get("Win32_ProcessStartup")<br />
Set objConfig = objStartup.SpawnInstance_<br />
objConfig.ShowWindow = SW_NORMAL<br />
<br />
' Create Notepad process<br />
Set objProcess = objWMIService.Get("Win32_Process")<br />
intReturn = objProcess.Create _<br />
(strCommand, Null, objConfig, intProcessID)<br />
If intReturn <> 0 Then<br />
Wscript.Echo "Process could not be created." & _<br />
vbNewLine & "Command line: " & strCommand & _<br />
vbNewLine & "Return value: " & intReturn<br />
Else<br />
Wscript.Echo "Process created." & _<br />
vbNewLine & "Command line: " & strCommand & _<br />
vbNewLine & "Process ID: " & intProcessID<br />
End If
Anyone know how to allow desktop interaction for the processes?
|
|
|
|
|
It's impossible!
It's even documented in the Win32_Process class of the WMI docs. "For security reasons the Win32_Process.Create method cannot be used to start an interactive process remotely."
And no, there is no workaround. What kind of security would that be?
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
It all only half makes sense to me...so ya I can't flood someones desktop with windows or on the other hand important information, but at the same time I can start background processes that can do all kinds of malicious deeds with no user awareness...
|
|
|
|
|
astonish wrote: but at the same time I can start background processes that can do all kinds of malicious deeds with no user awareness...
Only if the account that created the processes has the appropriate rights to the remote machine's resources. If the remote process tries to do something it doesn't have permissions for, it gets terminated very quietly.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
My PC had .NET.
For 1-2 months I did not use .NET.
Now if I select a new project template such as Windows application, ASP.NET application etc nothing happens. But if already existing project are clicked and made to run they do run.
The solution explorer do not show any project details such as name of project, files etc actually entire project tree is not shown.
Also when I select "IIS" element(in Systems & Services) from the Computer management console not a single folder, such as Default FTP site, Default web site etc, is shown.
What could be the problem?
Every thing will come to you if you have faith.
|
|
|
|
|
This may seem like a stupid question, but is IIS running? Is the wwwroot folder where IIS expects it to be?
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
The 'wwwroot' folder is at the desired location. That is not an issue.
The main thing is
1) The 'IIS' server has stopped working.
2) New .NET projects (VB C-sharp, VC++ any) can not be created.
Every thing will come to you if you have faith.
|
|
|
|
|
Amol Ravatale wrote: 1) The 'IIS' server has stopped working.
I asked if the service was running, not if it was working.
Check the Event Log to see if there are any messages specific to IIS. After that, you can start troubleshooting IIS by following these[^].
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hello i run setup wizard but before run in other pc it need frame work .net
how do it?
|
|
|
|
|
You might want to take a look at the Top 10 Downloads at the bottom of this[^] page. You're looking for the Redistributable for the version of the .NET Framework your app uses.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hello,
I am drawing on a windows form using System.Drawing.Graphics. Is there a way to wire up an onclick event to certain regions of the drawing?
Thanks in advance for the insight!
RC
|
|
|
|
|
No. Hit test in your Click handler to see if the cursor is in the region.
Josh
|
|
|
|
|
hello
please help me foe implement instalation pakage
thanks
|
|
|
|
|
Use the setup project wizard with VS.NET.
Best,
Jun
|
|
|
|
|
|
Possible Problem With Sockets 2.0 Implementation in .NET 2 with McAfee Software?
McAfee (Privacy Filter and Personal Firewall) installs it's own TCP/IP driver layer. This new driver does not seem to support sockets correctly. When attempting to connect to a remote server IPv4 TCP/IP using the Async BeginConnect you get "not supported on this object type" (unistall the Mcafee driver and it all works fine). If you do a sync connect using Connect the connection is established . However, if you then try to do an async send after connecting you don't just get an exception you get a full blown unmanaged general protection fault. This seems to be a pretty big problem has anyone else out there experienced it or maybe got a work around?
|
|
|
|
|
I'd guess they don't support binding to a completion port, or something like that. In the first instance complain to McAfee since their stack is at fault. It's possible that the kernel simply has a specific list of things that can bind to completion ports.
For some uses of the asynchronous pattern, .NET queues a work item to the thread pool and simply runs the synchronous version on the thread pool thread. For sockets, it's different: asynchronous I/Os are used. If the OS supports it - NT, 2000, XP, 2003 and successors - the socket is bound to a completion port which is a highly scalable way of receiving I/O completion notifications; otherwise it uses overlapped I/Os. In any case, the notification that the I/O is complete ends up on the thread pool, which then calls your callback function.
.NET 2.0 adds a new property to the Socket class which can be used to force the overlapped I/O mechanism and turn off the completion port feature: UseOnlyOverlappedIO . Set to true to stop it using the completion port. This may work around the problem, but McAfee really should fix it - .NET 1.x will always use the completion port if it's available.
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|