Janni Kajbrink's Q&A profile
Visual C# Passing Command using shortcut
I want to allow my application to capture some command that the user can pass into the application by define it in my application's shortcut properties, Shortcut Tag, Target field. Just like microsoft access shortcut, you can assign some command on the access shortcut properties. Is it possible for me to write an application that can capture the command assign in the shortcut using C# I, as I assume most of the others here, am having some trouble understanding what it is you want. What is the form of this "command" you wish to capture. Is it text An object Keystrokes Where is it coming from Do you have complete control over the applications this is for, or are parts written elsewhere &am ...Show All
Visual Basic Timer Ticks Twice
Hi All I am experiencing a small problem (challenge). I have a VB.net (2003) windows service that fires off a routine every 2 minutes. In fact, it executes an external program, so it doesn't really do much. Everything is great until I try to add threading to the process, either by way of the Imports System.Threading statement directly, or by referencing a library that includes that line. When this is done, the OnTick event is fired twice. For example, the following is logged, so it seems to be serial, not simultaneous (Can't be sure though). ---------------------------------------------------------------------------- 09:11:43:S001 Service Started ---------------------------------------------------------------------------- 09 ...Show All
Software Development for Windows Vista Are the Real-time Communications (RTC) APIs present on Vista
Hi there, Are the Real-time Communications (RTC) Client APIs, e.g. IRTCClient http://windowssdk.msdn.microsoft.com/en-us/library/ms775463.aspx , going to be available on Vista They don't seem to be present in Beta 2. Thanks. ...Show All
Visual C++ .dsw file association
We recently deployed MS C++ Pro 6 as an MSI to our engineers. We used to manually install this software. I have one engineer that whenever he tries to open a file with .dsw exentsion, Visual C repeatedly prompts for the correct file extension. We have checked off "open every file like this with this......" but it has not picked up that this is how to open these files. Anybody have problems with this Other engineers are opening these files fine and this engineer doesn't have any other program association problems. Right Click on the link dsw file and try "Open with " from the listed programs, select Microsoft Developer Studio and make sure that you have selected the checkbox &quo ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Runtime assembly info with GetRuntimeReader()
Hey everyone, I'm having a bit of a problem and was hoping someone might have some insight. After writing my own content processor, I've noticed something. The ContentTypeWriter, as has been pointed out before, has to overload the GetRuntimeReader method to return, to my knowledge, the full assembly path to the Reader as it will be called at runtime. So for instance, if I want to use my processor or importer with a project, I have to go back and edit the ContentTypeWriter's GetRuntimeReader method to look for an assembly in that new project. Here's some pseudocode- Project A - Processor RuntimeTypeWriter (...) string GetRuntimeReader() { return "(ReaderNamespace)(ReaderName), ProjectB ,..."; } Project ...Show All
Visual Basic Opening a Word file stored as a Resource
I can add a Word file as a resource to my application, and it then shows up in the Solution Explorer. But how can I then open this file from within my application I know I need to add a reference to the Word object library, but what then Thanks. Actually I do want to modify the document, so I will need the reference to the Word library. I am having some success with the code below, but I can't manage to delete the temporary file at the end of the process - Word acts as if I'm opening it rather than just borrowing it as a template. How would I fix this Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click Dim b As Byte() = My.Resources.QUOTE Dim TheFil ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Compile Errors when trying to run Directx sample tutorials
Hey folks, I've just downloaded VC++ Express edition. Proceeded to install the platform SDK, then installed Directx 9 SDK, October 2006. I've installed the first sample tutorial, CreateDevice, and no matter what I do, I get error LNK2019's. I've added the include and lib paths to the project options as well. Any help would be greatly appreciated. Here's the errors: 1>------ Build started: Project: CreateDevice, Configuration: Debug Win32 ------ 1>Linking... 1>CreateDevice.obj : error LNK2019: unresolved external symbol __imp__DefWindowProcA@16 referenced in function "long __stdcall MsgProc(struct HWND__ *,unsigned int,unsigned int,long)" ( MsgProc@@YGJPAUHWND__@@IIJ@Z) 1>CreateDevice.obj : error LNK2019: unresol ...Show All
SQL Server OleDBException Overflow
Im getting the following error : System.Data.OleDb.OleDbException was unhandled ErrorCode=-2147217833 Message="Overflow" Source="Microsoft JET Database Engine" StackTrace: at System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams, Object& executeResult) at System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult) at System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior, Object& executeResult) at System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method) at System.Data.OleDb.OleDbCommand.ExecuteNonQue ...Show All
SQL Server Sql query for Master Detail Record in One Row
I am having a table contains Nurse Detail like nurseid 1 address fname last name phone another table contains the exp detail in 28 different type of speciality nurseid specialiity year Exp. 1 icu 4 1 ccu 5 1 OPD 2 i need to display the record in datagrid as nurse Name ExamPassed Address MostExp SecondMostExp 1 toefl abc, india ccu icu if i use the select query to find the top two inside a datareader which collect the info. about each nurse this takes lot of time to complete this and many times gives Timeout error about(50%) is there any code to combine with the urse detail records as a column for speciality one and two. any stored procedure / se ...Show All
SQL Server Can't Divide a count function?
I am trying to divide 2 funcitons by each other and I am coming back with 0 as my result in one of them while I am getting the correct answer in another. The two columns I am trying to pull with functions are: SELECT sum(D.PrincipalBal)/sum(L.PrincipalBal)*100 as DelqRatioByBal , count(D.LoanID)/count(L.LoanID)*100 as DelqRatioByCnt FROM Loan L INNER JOIN DelqINFO D on D.LoanID = L.LoanID I get the correct result back for 'DelqRatioByBal' but I get 0 back for 'DelqRatioByCnt' Any suggestons that because you are doing an integer division take a look at this select 1/2 --int division select (1.00*1)/2 go -------------- SELECT sum(D.PrincipalBal)/sum(L.PrincipalB ...Show All
Visual J# Single instance J# browser control
I'm using a J# browser control applet that communicates with hardware. As such I want to allow only one instance at a time to be created by the user. In my applet class (a singleton) I check the state of a static variable that refers to the single instance of this class. If it has already been assigned to then I just display a MessageBox saying that another instance is already running and return from the constructor, and just return from init(), start(), stop() and destroy(). I launch one instance then another. The second displays the MessageBox then goes no futher - fine. I close the second then go back to the first window whereupon I get the following popping up in VS.NET 2005: DisconnectedContext was detected Message: Context 0 ...Show All
Software Development for Windows Vista Waiting for completion of more than one activity in a state machine workflow
Dear all, I have a state machine workflow which needs to trigger a number of activities in parallel, wait for them all to complete, then move to the next state. The most relevant post concerning this was on a thread entitled "How can a "fork" (parallel split) pattern be implemented in a WF state machine workflow " back in September this year. Steve Danielson of Microsoft said: Not the best code in the world but I whipped up a Data Exchange Service that you can use to "join" a number of InvokeWorkflowActivity instances from the parent workflow. This is especially good when you are not aware of how many instances you will spin up (say from a repeater activity). Here's the interface: [ Extern ...Show All
.NET Development How do I pass a variable for the sheetname parameter of the "Insert Into" command?
I have a spreadsheet with 5 worksheets each named after one of our plants. The Insert Into command works fine with the sheet name hard coded in but I need it to use a variable (sPlant) How do I re-write this line so it will use that variable for the sheet name Thanks Private Sub Add_Record( ByVal source As Object , ByVal e As System.IO.FileSystemEventArgs) Dim en As New CultureInfo("en-US") Thread.CurrentThread.CurrentCulture = en Dim uFile As String = e.Name Dim TheDate As String = DateTime.Now Dim sFolder As String Dim sPlant As String Dim sFile As String Dim iUpper As Integer Dim PathPiece() As String = uFile.Split("\ ...Show All
Smart Device Development OutOfMemory problem
Hi there, i am developing for PPC, and trying to load a background Image on a form. However, when the image is above 300K (more or less), i start getting problems. First, i get the image from a SQL Server 2005 database, and then convert it to a .net object: The code where i use the image is: 1) at this point i have already got the image from the database into byte[] myImage, and i will convert it to a Image file. This code is on my form class, named: MyForm this .memoryStream = new MemoryStream (); this .memoryStream.Write( myImage , 0, myImage.length ); try { this .backgroundImage = new Bitmap ( this .memoryStream); } catch ( OutOfMemoryException ex) {...} 2) la ...Show All
Windows Forms Bindingsource.Find problem
Hi all, I have a problem with the bindingsource.find methode. When i do this Me.GemeenteBindingSource.Find("Gemeente", txtGemeente.text) It wil return the index of the value of the txtgemeente.text box, but what must i do when i want to find a partcial nam An example : If txtGemeente = "Veurne" , i found the record and everything is fine, but when i search after txtGemeente = "Veur" then he doesn't find anything. How can i resolve this problem Thanx in advanced No, the way you're trying to what you want is not going to work. I'm pretty sure you want to use a ComboBox like the one I posted. There are websites that will convert C# to VB and vice-versa. Here's one I like ...Show All
