JRCJames's Q&A profile
Smart Device Development Listbox.FindString
I am developing an app using Windows Mobile 5.0 When trying to search a listbox I don't have the method .FindString Here is my code: private void FindMyString( string searchString) { // Ensure we have a proper string to search for. if (searchString != string .Empty) { // Find the item in the list and store the index to the item. int index = listBoxPartInfo.FindString(searchString); // Determine if a valid index is returned. Select the item if it is valid. if (index != -1) listBoxPartInfo.SetSelected(index, true ); else MessageBox .Show( "The search string did not match any items in the ListBox" ); } } } And the error I get: 'System.Windows.Forms.ListBox' does no ...Show All
Visual Studio Express Editions Adding to a Textbox
Well I've tried this all day and given up.... I have the following code to open a txt file in a richtextbox. My question: I have a TextBox on the application, and a button. I want the user to be able to type some information in the textbox, click the button, and the text from that textbox to be added to the txt file in the richtextbox. Private Sub openMenuItem_Click( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles openMenuItem.Click RichTextBox1.LoadFile( "C:\program files\novalogic\delta force 2\df2tools\dfm-DefEncryptDecrypt\items.def.txt" , _ RichTextBoxStreamType.PlainText) End Sub I tried to use RichTextBox1.Text = TextBox1.Text, but that clears out the richtext ...Show All
SQL Server How to form a list ?
Hi, I have a table like this: CatalogID CatalogName RootID -------------------------------------------------- 1 Microsoft 0 2 Macromedia 0 3 Office 1 4 ...Show All
Visual Basic vb.net 2003 simple access mdb example? Anywhere?
I bought vb.net back in 2003 and tried working with it for a few days - then uninstalled in disgust and went back to VB6. I've just decided its time to try out .net again for some database work with an existing access database. I've just spent the entire night searching for an example of just simply opening an access database from a local disk and stuffing some data into a combobox - with absolutely no success. The samples that (didn't ) come with vb.net don't seem to be accessable on the MS site any more. It keeps throwing me VB2005 upgrade "opportunities", SQL server stuff, and other unrelated things. WHen I did finally find the 2003 "quickstart" examples, the link goes crazy and locks up IE, showing a path with ...Show All
Visual Studio Tools for Office Why the letter does not send and kept in a folder Proceeding? (MS Outlook)
Good afternoon. Why the letter does not send and kept in a folder Proceeding Code: Outlook.ApplicationClass oApp = new Outlook.ApplicationClass(); Outlook.MailItemClass mi = Outlook.MailItemClass)oApp.CreateItem(Outlook.OlItemType.olMailItem); mItem.To = test@test.test; mi.Subject = "2"; mi.BodyFormat = Outlook.OlBodyFormat.olFormatPlain; mi.Body = "2"; mi.Save(); mi.Send(); this.Close(); and how will get rid from Outlook warning window Hi Sergeyr The best place to get help on automating Outlook are the newsgroups that specialize in Office automation and Outlook programming. Try asking in a cross-post to these two groups http://msdn.microsoft.com/newsgroups/default.aspx dg=microsoft.public.office. ...Show All
Visual C# Trouble with WinNT provider on remote OS with other language.
I'm using this code: DirectoryEntry O = new DirectoryEntry("WinNT://" + ServerName + "/" + UserName); O.Rename(NewName); it works fine only on OS where language equals my OS language. E.g. it works when remote system is Windows XP SP2 RUS. But when remote OS is Windows 2000 SP4 RUS or Windows XP SP2 ENG it throws an exception. Why this so I don't cleary know how it sounds in english. But in my translation from russian it sounds like: {"The Active Directory object, at path WinNT://DOMAIN/WORKSTATION, is not in container."} I am a domain Administrator and can do this operation by hand (rename remote user) through MMC. I've put some vars in debug. It look ...Show All
Visual C++ Memory leak
I have a method that continuously reads 1MB of data from a hardware in a short period of time. I used a memoryStream data structure for this. In every call of this method, a memoryStream is created and used to read the data, and then it is closed and goes out of scope. These are my assumptions in this implementation: - The garbage collector will free the memory used for the memoryStream when its instance goes out of scope - The allocation for the memoryStream is done from the Large Heap objects, because of their 1MB size Therefore, I expected to see an increase in the memory for a short time until a gc collection of the 2nd generation occurs finally and the memory decreases. However, the result is different: ...Show All
.NET Development how to access the sql server running in the remote server thru the windows service
hi , i have a windows service which has the account property set to network service. i have to connect my windows serive to the Sql server . Please help me how to connect ...Show All
Software Development for Windows Vista Limit Values of Dependency Properties
I have created a custom activity which has as a dependency property an integer. I would like the designer to only allow users to type in numbers between 1 and 10. Is there a way to do this Do I have to write an activity validator for the activity to do so Amanda Amanda, You would check this in an activity validator, yes. Use the base ActivityValidator class and the ActivityValidatorAttribute to hook this all up. Matt ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Game freezes every few seconds
Hi, Every few seconds my game freezes and then resumes. The time of the freezes varies depending on debug/release or if i am debugging in visual studio. Also, when i run in debug mode with debugging sometimes* the program freezes permanently. But if i put a breakpoint in, it breaks, then when i continue it works fine. Its wierd. I am using threads for parts of my program but im certain my code is fine. Are there any bugs with regard to threads and freezing in xna help please. Although I agree with the previous posters that this sounds most like a thread contention issue, it is also possible that these pauses could be caused by unusually large amounts of garbage having to be collected. ...Show All
Visual C# Need help with .Split()
I've actually got two situations with this method. The first is with the .Split command. It works with the majority of the names it's passed but a few are not being processed correctly. For instance, the majority of the name fields entering this routine look like this: Holt, James; however, a few look like this: Harden, Jr.,James, which the .Split doesn't process. I've tried several configurations, {' ', ',', '.'} for example and still nothing. The configuration shown below is the last attempt. The second problem I'm encountering is an indexing error. When I click on a name in the Tree, then click on a letter above the name I get this error: "Index was outside the bounds of the array." The tree looks like this when th ...Show All
Visual C# DataSet does not return a table in NPlot
I just posted a question pertaining the same C# file but this is a different problem. That first question has been resolved. Background: I downloaded a graphics C# package NPlot from a website. It is freeware. I included the whole set of files (4 demos and a library + dll) into my project where I intend to use NPlot as a part of my application. After a few snags it easily compiled. A part of it is running lready, however, here is the situation I cannot resolve: <This code is part of PlotWave function in PlotSurface2DDemo.cs > // obtain stock information from xml file DataSet ds = new DataSet(); System.IO.Stream file = Assembly.GetExecutingAssembly().GetManifestResourceStream( "NPlot.resources.asx_jbh.xml" ); ...Show All
SQL Server Missing table in Datasource View dropdownlist of ProcessAdd config form of AS Process Task of SSIS
I made 12 facttables and set them to the 12 partitions. the 12 facttables are the same, and I only build measures on facttable11. My first question is , will this be ok You know, when you build a measure group, it ask you to chose a facttable. I could not chose all the 12 facttables, right I only need to chose ANY one of the 12 tables,right If the answer is YES, could I chose diffrent tables for diffrent measure group and get the same result Nothing mentioned in MSDN. My second quesiton is, when I drop an AS Process TASK in SSIS, and chose to do a ProcessAdd on a partition, on the config form it ask me to chose a table or view that point to the partition i need to Process. On the Datasource View dropdownlist, If I chose the Datasou ...Show All
Visual Basic Windows API calls from VB
I'm looking for examples of Visual Basic code to create and use named pipes for inter-process communication. (Working examples, that is; I can create ones that fail..) More generally, I'm looking for examples of VB calls to Windows APIs where no .NET method exists; most of the examples I've found use either C++ or VB 6. I'm also interested in a description of when ByRef should be used in a Declare statement and when ByVal is appropriate; the rules seem to have changed from VB 6 so I can't just translate the examples by rote. I'm presently running VB 2005 on Windows XP with SP 2; have written an app that uses anonymous pipes and would like to convert it to using named pipes. I use the IpcChannel class - wor ...Show All
Windows Search Technologies WDS and Indexing service
hi all, I would like to use WDS 3.0 through programmatically for searching word document contents. So, I am querying sytemindex with System.Search.Contents as the Where clause. My questions are: Does WDS using the "Indexing Service" (which is already available in the system) What is the difference if I manually configure my target folder with available "Indexing service" and query directly without using WDS SDK For me its easy to query the WDS component (thru OleDb) than querying the indexed file directly. So, can I use this technique in production also Once the Indexing is done for a folder if I add or remove a file inside the folder will it re-index from the first or it will just update the index (I guess it shouldn't ...Show All
