Alex Bibiano's Q&A profile
Software Development for Windows Vista Custom State Actvity
Hello All, I am new to the Windows Workflow Foundation. I want to create a State Workflow containing 6-7 states each having the same events like Approve, Reject, etc. I would like to know how to create custom state activity that I can use at each state. Also I would like know how can I retrieve the workflow instance properties that I have set at the beginning or at each state. I also need to create a custom state activity because I don’t want reconstruct the same state with events over and over again and to add behavior to simplify the creation of the workflow. For example: with copy past the names of child activities are screwed, so I want create a command in the propertygrid to rename the activity an ...Show All
Visual Studio 2008 (Pre-release) Problem locating ResourceDictionaries defined in external assembly
Here is a setup: First project, A.B.Common includes two ResourceDictionaries defined in two separate files: Resources\First.xaml Resources\Second.xaml Build actions for those files are set as EmbeddedResource. This project produces A.B.Common.dll Also there is another project, A.B.Controls where custom controls reside. That project references A.B.Common . Part of this project is generic.xaml file, themes\generic.xaml . This file references ResourceDictionaries defined in A.B.Common : ... <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="/A.B.Common;Component/Resources/First.xaml" /> <ResourceDictionary Source="/A.B.Common;Component/Resources/Second.xaml" /> </ResourceDictio ...Show All
SQL Server package detect that instance is already running?
Folks, I have a package scheduled to run every hour. Users have asked if, in addition to the scheduled run, they can have it so that they could dump a file into the input directory and then kick-off the package immediately. Problem is that things fail if they try to start the package when the scheduled instance of the package is still running. Is there any way that the package could check to see if an instance if itself is currently executing and refuse to execute if there IS an instance running PJ How do users start the package If they use the same job that you run periodically, just start it manually regardless of schedule using sp_start_job, the single-instance behavior will be i ...Show All
Visual Studio 2008 (Pre-release) Refresh data modified by an other source
Hi, When values are updated into my database from an other application, is there a way to update my DatabaseContext instance with the new content of my database For now, I am creating a new DatabaseContext each time, but it is really time consuming... At least is there a way to know if my DatabaseContext instance is not synchronized anymore with my data Nicolas, You mentioned that you found a way to create new DataContext fast. Can you elaborate on this I am currently implementing a class that contains an array of datacontext and manages their allocation. ...Show All
Visual Basic Remove Registry Keys when uninstalling my application
Hi, I have created a MSI installer and when I uninstall my application I need to delete some registrys also. The Registry keys were created by the application, not the installer. What I need to do is, when the application is uninstalled by the installer, The registry keys created by the application are also deleted. How can I solve this problem I have tried adding a custom action (the custom action deletes my registry key) to the uninstall folder in the setup projects custom actions. But it does not work. Here is my code for my custom action. Imports Microsoft.Win32 Imports System.IO Module Module1 Sub Main() Try Dim myRegistryKey As RegistryKey = Registry.CurrentUser.OpenSubKey( &quo ...Show All
Microsoft ISV Community Center Forums Method 'SnapshotPrint' of object 'ISnapshotViewer' failed.
I have code that is printing a snapshot file. This code works fine on a number of PCs, but on others it does not. On those PCs where it does not work I get the following error: Method 'SnapshotPrint' of object 'ISnapshotViewer' failed. or Method 'SnapshotPrintDirect' of object 'ISnapshotViewer' failed. I found Microsoft article 224002 which says to add "File://" to the beginnig of the SnapshotPath string. I have done that but it did not correct the problem. Below is my code: Dim vSnapShot As New SnapshotViewer vSnapShot.SnapshotPath = "File://" & vPath If fShowDialog Then vSnapShot.PrintSnapshot fShowDialog Else vSnapShot.PrintSnapshotDirect Application.Printer.DriverName, Ap ...Show All
Visual Studio IIS installation problems - staxmem.dll
While trying to install the IIS component in order to install the visual studio I am repeatedly faced with this error: File needed staxmem.dll from Windows XP Pro, Service Pack 2 CD (I know it isn't word for word, it's translated so bear with me). I have tried installing the IIS with both SP1 and SP2 and nothing seems to work. I've also came across an advice that stated I should run "esentutl /p %windir%\security\database\secedit.sdb" which didn't help either. Does anyone has any better suggestions Thanks in advance, Jonathan. Hi, try using /p it worked for me... esentutl /p C:\Windows\security\database\secedit.sdb Another option is to uninstall the n ...Show All
SQL Server Windows 2003 64bit running SQL 2000 SP4
I have been running Windows 2003 64bit and SQL2000 SP4 for over 2 months with out any issues. Sadly we had a server crash " NTldr missing or corrupted" now when the one engineer looked at it he suggested to reload the server with Windows 2003 32 bit version as there were known compatibility problems between 2003 64bit and SQL 2000 32bit but that you can install SQL 2000 32bit onto a Windows 2003 64 bit server. Now i dont really believe this statement nor can i find any documentation supporting this. I believe this server might have crashed due to a new patch that was released the last 2 or 3 week either on Windows or SQL. Does anyone know where i can verify what patches was released Maybe someone else can share ...Show All
Windows Forms Stacked column chart
hi, i got another question for u. I wish to draw a stacked column chart. I've tried so many ways and yet it jz couldn't show wat i want. Below are the data tabulated in excel file to produce the graph. WW FOCUS OTHERS L. BLEMISH S. BLEMISH CONTACT FOM TTL REJECTS ww01 2 2 1 5 ww02 1 5 2 8 ww03 1 6 4 11 ww04 1 11 2 14 ww05 1 3 1 5 ww06 2 1 8 1 1 13 ww07 2 7 3 12 ww08 11 1 2 14 ww09 1 21 2 ...Show All
.NET Development fast ping
Hi, I need to write a fast ping program to ping class C & D IP addresses. I have written a piece of code to open a socket, connect to it and receive data from it with a timeout. This is fast enough for a few IP addresses but I would need to ping 255x255 IP's. I have put this code on a separate thread which calls an asynchronous method to loop over the IPs. This is taking a minute for each set of class D IP's. How do I make it run faster Thanks PS: I am using the 1.1 framework Thanks for the reply, please find the code below. I am using the CLR profiler to look at the performance and I am trying to decipher the graphs it is s ...Show All
SQL Server If a database is down, I need to display a custom error message.
Is there any way to check if database is down or datasource can not connect to database in reporting services. I want to display a customer error message when the database is down. Thanks for help in advance. ...Show All
Visual Studio 2008 (Pre-release) How to draw on the desktop (pop max size?)
Hello, I trying to implement something like a rubber band that the user can move with the mouse anywhere in the desktop (outside the main window). I used a (transperent) popup with a canvas as child. For the rubber band I used a shape.Rectangle which I move around when user moves the mouse (I captured the mouse for that to work). The problem is that the popup can't be resized large enough to fill the entired desktop! Here is the code what fails: popup.Width = SystemParameters .PrimaryScreenWidth; popup.Height = SystemParameters .PrimaryScreenHeight; If I use a Window is works, but when I open the rubber-band-window the application main window gets deactiveted (which is wrong). My desktop is 1600x1200, the popup resizes max ...Show All
Software Development for Windows Vista Single-instance DCOM server problems with high/low integrity levels
I am working on an application that employs a single-instance DCOM server. The application works fine on all other versions of Windows except Vista. There is a strange behavior that I observe on Vista in regards of the instantiation of the singleton COM interface if there is a difference between integrity levels of the server and client applications. The single instance is accomplished by having the singleton interfaces declared with DECLARE_CLASSFACTORY_SINGLETON ATL macro. Additionally, there is a code in the application that ensures only one instance of application is running by utilizing a named mutex. The application checks if the mutex exists, exits if it does and stays running otherwise. The scenario of the problem I pbserve is the ...Show All
Visual C++ A lost WM in VS2005.
When I tried to use "WM_MOUSEWHEEL" in my program, but compiler warned me that "WM_MOUSEWHEEL" is undifined! I went in "WinUser.h" file and saw this message is commented out by following : #if (_WIN32_WINNT >= 0x0400) || (_WIN32_WINDOWS > 0x0400) #define WM_MOUSEWHEEL 0x020A #endif If I directly use 0x020A instead of "WM_MOUSEWHEEL", it works well. Why this happened My OS version is WinXP Pro, whith SP2. Yes, your suggestion will works, but that's not point. I'm wonder why compiler consider my Windows Version is so OLD In case my OS~WinXP Pro/SP2, _WIN32_WINNT should be larger than 0x0500. Where _WIN32_WINNT or _WIN32_WINDO ...Show All
Windows Forms RichTextBox - raw rtf appending problem
As RichTextBox doesn't implement all posiibilities of text formatting itself I'm trying to write simple method which will insert a table into my RTB control, but have problems while trying to append new formatted text into Rtf property of RTB. Here's an example of my problem with source code and result from debugger. Let's say that we have newly created RTB richTextBox1.Rtf = "{\\rtf1\\ansi\\ansicpg1250\\deff0\\deflang1045{\\fonttbl{\\f0\\fnil\\fcharset238 Microsoft Sans Serif;}}{\\colortbl;\\red0\\green0\\blue0;\\red0\\green0\\blue255;\\red0\\green255\ \blue255;\\red0\\green255\\blue0;\\red255\\green0\\blue255;\\red255\\green0\\blue0;\\red255\\green255 \\blue0;\\red255\\green255\\blue255;}{\\stylesheet{\\fs20 \\snext0Normal;}}{\\in ...Show All
