ctsand's Q&A profile
.NET Development Any way to contro which CPU a thread runs under
Is there any way of launching a process and controlling the CPU used I have a need to be able to start several copies of the same single threaded executable, and try to control which CPU a thread is running on. It appears that the executable is managing to interfere with another thread on the same CPU You seem to be asking two seperate things... controlling which CPU a thread runs on as well as which CPU a process runs on... I suspect though that you are more concerned with the process case... In order to control the CPU that a process runs on you'd want to modify the ProcessorAffinity property of the Process class that references the application. Take a look at the MSDN page on Process.ProcessorAffinity for det ...Show All
Visual C# MessageBox.Show() - specify location of where box should pop up?
I'm calling a MessageBox, and would like it to show up in the center of the form that called it, rather than the center of the whole computer screen. Is there a way to do this Nah, Defaulr Message Boxes doesno support this behavior, You need to create your own using Form setting some properties like BorderStyle = FixedSingle, ControlBox = false, put some Labels and buttons and Associate Dialog Results with those buttons. Cheers ;-) ...Show All
Windows Forms creating registry key based upon selected application path
I am trying to make a registry key that will reference the path of where my application is going to be installed. Since I can't figure out how to only specify the path to install and NOT allow the user to specify their own directory, my registry key path might be wrong. How do I either: 1. disable the browse folder location so a user can specify where the application is installed or 2. Specify in the registry editor where the key path is DYNAMICALLY based upon where the user selected the folder ex: string value name: "my value name" value: "c:\Program Files\the folder\my application.exe" Thanks! I think I should clarify what I need to do. Upon ins ...Show All
Visual Studio Tools for Office Grant full trust using setup project
How do I grant full trust to an assembly that should be included in a setup project I guess it has something to do with strong key signing, but I don't know how to do that. Please help me. I use VSTO2005SE. Thanks for the reply! VSTO is really great, but deployment is a pain... I mean - 19 pages walkthrough just to deploy a Word template To attract more VBA developers I think this has to be alot easier. ...Show All
Visual Studio Express Editions my code is ***
Can Someone Plz Tell Me wats wrong with this code!!! It will open files, but it won't edit or create files (and no it's not read-only!!) Please respond ASAP. Public Class Html2007 Dim strFileName As String ___________________________________________________________________________ Friend Sub SaveAsToolStripMenuItem_Click( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SaveAsToolStripMenuItem.Click saveFD.InitialDirectory = "C:\" saveFD.Title = "Save a File" saveFD.Filter = "Text Files|*.txt|HTML Developer Project|*.HDP07|All Files|*.*" saveFD.ShowDialog() strFileName = saveFD.FileName End Sub _______________________ ...Show All
.NET Development date in the sql query
I have an access db with two short date fields and in my vb.net application I need to display in a dgw the data between two chosed values. Every time I try the "Data type mismatch in criteria expression" appears. I use two Datatimepicker formated as Short. In the database the field are also formated as Short Date. What could be the reason for that Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim con As OleDb.OleDbConnection = New OleDb.OleDbConnection("Provider = Microsoft.Jet.OleDb.4.0;Data Source=C:\Maint.mdb") Dim cmd As New OleDb.OleDbCommand Dim cmda As OleDb.OleDbDataAdapter Dim dset As New DataSet 'Dim cb As OleDbCom ...Show All
Gadgets Launching a page in the default browser
window.open() opens IE, how do I open the default browser (ie opera or firefox) Do I need to use an ActiveX control Thanks for your help Andy Andy, Is there a way to know if an specific extension is associated to a particular application In windows XP I used to go through the registry in order to ontain that information, but in Windows Vista it they changes the association to be bu user. I could have special code to do the same in Vista but I was looking for a way to do it programatically without having to check the registry, I searched un der the Shell32 API and I was not ablt to find anything. I know that ShellExecuteEx() returns an error if the file extension is not associated, but I would like to know whether ...Show All
Windows Forms PrintPreviewControl connected with WebBrowser control
Hi I'm using the WebBrowser control in VS2005 When I navigate to any page I want to show to the users a preview dialog of the page directly without show them the browser with the page loaded. If I use WebBrowser.ShowPrintPreviewDialog() the preview is going to appear in a new windows showing the browser. My question is: Can I connect the webBrowser control with the PrintPreviewControl or the PrintPreviewControl works only with the PrintDocument control Thanks This stuff doesn't get documented, you just have to know. That's why we have these forums... ...Show All
Software Development for Windows Vista Tracking : Roles in State Machine Workflow
Hi, I am implementing a tracking service for a state machine workflow in order to update user tasks list based on the Roles property specified in HandleExternalEvent/WebServiceInput activities. I am extending the TrackingService class in order update my task list when StateEventActivity is at Executing status or when in the case where there is a StateInitializationActivity is after that activity has closed. Anyway I am having problem getting the Roles property out of the HandleExternalEvent/WebServiceInput activities. On my first try, I get the WorkflowDefinition from the runtime, this does a clone of your current WorkflowInstance and the Role property doesn't get clone in this process. Another way I am thinking to do this is to use the Ac ...Show All
Visual C++ Destructor of Static Object Not Called on Exit
It looks like the problem described in knowledge base article 236114 has reappeared in Visual Studio 2005. Under some circumstances the destructor of a static object is not called on exit. When I built and ran the example in Visual Studio 2003, it runs correctly, but when I build and run it under 2005, the destructor is not called. I have SP1 installed. ...Show All
Visual C++ Visual C++ Express, open a child form.
When I try to open one form from another, I get the error at compile: 'Manifest' : is not a member of 'AlaskaFreight' Mainfest is declared as follows in the Manifest.h file containing the form code: namespace AlaskaFreight { public ref class Manifest : public System::Windows::Forms::Form { Manifest shows up under 'AlaskaFreight' in the Solution Explorer, Class View explorer and even pops up from Intellisense when I type in the code: AlaskaFreight::Manifest^ oform = gcnew AlaskaFreight::Manifest(); oform->Show(); I'm not sure if it's appropriate to use the pointer Manifest or not, but either way I still get the error. Any ideas Thanks Never mind, I found ...Show All
Visual Studio breakpoints are disabled on a dll.
Hi All, I am developing in c++ on visual 2005 My solution contains two projects: an executable and a dll. Sometimes ( like today :-( ) breakpoints on the dll project are diabled and when I move the cursor to the breakpoint mark, I have the following message : " The breakpoint will not currently be hit. No symbols have been loaded for this document". Sometimes after rebuild or after I get a new version from the source safe it works but not today. Any Ideas Thanks, Udi. In the output window when you debug your application, do you see anything about your dll That the loaded path is incorrect or that no ...Show All
Visual Studio 2008 (Pre-release) Cannot install .NET Framework 3.0
I downloaded the .NET 3.0 Framework installer, the SDK installer, and the VS Extensions. I then accidentally ran the SDK installer first. Following that I ran the .NET Framework 3.0 installer, but when I realized that I had accidentally installed the SDK first, I stopped the Framework installer. When I stopped the Framework installer it had downloaded 14 out of the 30 MB of data it needs. I then uninstalled the SDK. Now when I try to run the Framework installer, it cannot download anything past the 14 MB of data it originally downloaded. I tried erasing the cached data from the Temp directory. Even after doing that, the Framework installer will run to the point where it has downloaded 14 MB and then the transfer rate hits 0 kb/sec. Even ...Show All
Game Technologies: DirectX, XNA, XACT, etc. PIX Experiment File Version Mismatch Problem
Hello. Everyone. I've just got a problem with using the PIX utility. When I want to use the PIX, it almost always messages me: "PIX Experiment File Version Mismatch" This program expects and experiment file version of 202, but the file 'C:\Some Directory Path\PIXD4.tmp ' has a version of 0. Proceeding may cause this program to crash or behave incorrectly. Continue loading file So, I can't anything to do with the PIX, .... even just one screen capture. Anyone know about why this problem is occured And, how can I solve this problem I really want to utilize the PIX program. Help me~~~ ...Show All
Visual Studio Tools for Office Outlook Addon - MessageBox not displaying in the current active window.
I have created an Outlook add on which performs actions when the ItemSend mail event occurs. I have a confirm dialog box that pops up. 1) If the e-mail message is open on my secondary monitor the messagebox will display on monitor 1. 2) If the e-mail message is open on my primary monitor the messagebox will be displayed BEHIND the message window. I suspect the problem is that I need to pass the MessageBox the parent window to be displayed in. Just I don't know how to go about doing that. At the moment all I have is: MessageBox.Show("Hello World"); Thanks. Thanks guys. That looks like what I am after. I kind of knew why the problem was happening just didn't have a clue at how to fix it. I will tak ...Show All
