kashiro's Q&A profile
Windows Forms Working with controlls on different forms
Hello. I have 2 forms. On form1 I have a button and on form2 I have a checkbox. When I press the button on form1 I want to check the checkbox on form2. Of course, assume that the checkbox form has already been shown. I am really stuck on this. Any ideas ! Create a public method on Form2 something like public void SetCheckBoxChecked( bool value) { checkBox1.Checked = value; } In your Form1's button click call this method on Form2's instance by passing true as an argument. ...Show All
Smart Device Development Loopback interface question and emulator IP
Hi, This is probably slightly out of topic here but I'd really appreciate it if someone could help me with this. I'm using vs.net 2003 and the pocketPC 2002 emulator that comes with it. I'm trying a very basic server client app - emulator app logs in and sends a couple of messages. Server responds with some text. I installed a loopback interface on the desktop(server) and set its ip to 10.10.10.10. I've bound a socket to that address and it waits for the PDA to connect. So far, this works great - I can now send messages from the emulator app. Now when I try to send a message back to the emulator app, it doesnt seem to go through. Th ...Show All
Visual Studio Tools for Office Preventing Document loading customization
Hi, We have a set of documents that pick up and load a VSTO customization by specifying an assembly name and location in the customDocumentProperties. eg in WordML the following is specified: <o:CustomDocumentProperties> <o:_AssemblyName dt:dt="string">*</o:_AssemblyName> <o:_AssemblyLocation dt:dt="string">C:\Program Files\test product\test.application</o:_AssemblyLocation> </o:CustomDocumentProperties> However during part of our workflow, these documents need to be opened in Word on a server to have certain parts removed before creating pdfs etc. I need to be able to open t ...Show All
Windows Search Technologies WDSQuery: 'System.InvalidCastException' throwed when "ExecuteQuery" invoked remotely
I want to write a full-text search server based on WDSQuery. This server is .NET Remoting enabled. I wrote following code to do the task: SearchDesktopClass wds = new SearchDesktopClass(); wds.ExecuteSearch (...); // InvalidCastException When I tried to run this code by remote method call , An Exception 'System.InvalidCastException : QueryInterface failed for Microsoft.Windows.DesktopSearch.Query.ISearchDesktop' throwed. It was ok if I run this code by local method call. I tried to build W ...Show All
Visual Studio Team System tf30005 and tf30217
Hi, While creating a new team project, I got a tf30005 and a tf30217 error. How should this be solved The client and server run in a Virtual Machine, both Virtual Machines run on the same computer. Thanks, Bart I'm going to close this thread for now since we haven't heard back...please let us know if you are still having trouble. Thanks, jeff ...Show All
Visual C# Outlook add-in (auto-scheduler)
Hi, I'm writing an add-in for Outlook 2003 which takes the tasks from the task list and schedules them in to the calendar with respect to task priority. I have managed to sort the tasks by priority in the task list view via: _Items olTasks = olFolderTask.Items; // MSO items collection in folder olTasks.Sort( "[Priority]" , true ); // sort items by Priority before reading int nTasksCount = olTasks.Count; for ( int i = 0; i < nTasksCount; ++i) { _TaskItem olItemTask; try { if (i == 0) // Should be called first before iteration start olItemTask = (_TaskItem)olTasks.GetFirst(); // First ...Show All
Architecture Server side for VBA - DCOM? .Net?
Hi, I'm going to develop a server side component for a VBA front-end (Excel). I use VS.Net 2003. Is DCOM the way to go What are other options PS I've been developing COM components for VBA in .Net for quite a long period, and managed to make all I wanted. The main thing I wonder is if using DCOM instead of local COM seamless, or there're special issues Ruslan You've got Excel running on the client, a component running on the server... I'm wondering why the component isn't on the same machine as Excel Is it because the component is accesses something specific to the server Because the component ...Show All
Visual Basic combobox text error
Hi all, I am absolutely stumped. I have a MS .NET 1.1 program that is running fine on numerous machines at different sites. However, a couple of machines get a Critical Error on the VB code line below: MyCombobox.Text = "Value" The combobox list has already been created and the text is being assigned for the first time. I know for sure that "Value" is in the combobox list. The machines are XP SP2, have the latest Window updates (as far as I know) and don't have McAfee VirusScan. Any Ideas Thank you! What other properties are set on the combobox - is it set to dropd ...Show All
Visual Basic How to save data from a form to a xml file?
i'm trying to find a way to store data entered in a form into a xml file i have found some codes~ it worked~ but when i want to store another set of data~ it replaces the one i enter before~ it's like it's creating a new xml file each time i store data in the xml file the code i used is this Dim xmlTW As New XmlTextWriter("..\CYFmembers.xml", Nothing) With xmlTW .Formatting = Formatting.Indented .Indentation = 2 .WriteStartDocument() .WriteStartElement("CYFMembers") .WriteStartElement("Members") .WriteElementString("FirstName", txt_fname.Text) .WriteElementString(&q ...Show All
Visual C# question about arrays
I have 2 questions regarding array manipulation: 1) which is the best way to reset an array if i initially declare as: private byte[] array1 = new byte[0]; 2) how to insert elements into array at a specified index e.g: initial array = [1,2,3,4,5] new array = [1,2,7,8,3,4,5] Ragards, Donkaiser But doesnt that throw away the last element ...Show All
Visual Studio Tools for Office Issue with Validation.Add
I'm creating an excel sheet using VSTO and i have a situation wherein the user needs to enter only decimal values and that particular cell has a format set to percentage. Here is my code Excel. Range oRange = Globals .Sheet3.Range[ "TaxRate" , missing]; oRange.Validation.Add( XlDVType .xlValidateDecimal, XlDVAlertStyle .xlValidAlertStop, XlFormatConditionOperator .xlBetween, 0.0 , 99.9 ); oRange.Validation.IgnoreBlank = false ; oRange.Validation.ErrorTitle = "Not a valid tax rate" ; oRange.Validation.ErrorMessage = "Please enter a valid tax rate" ; Now, when i execute this i get a ...Show All
Windows Forms Error: Setup has detected that the file has changed since it was initially published.
I'm hoping someone can help me here, I've got a ClickOnce install problem that I can't make head nor tail of - and Google doesn't seem to want to help. Essentially I have a WinForms app that have the framework and SQL Express as pre-requisites, but everytime I try to install the app it complains about a file having been changed since it was initially published. Everything is based off Beta 2, so framework 2.0 beta 2, SQL Express beta 2 and devstudio 2005 beta 2. If anyone has any ideas then it's be much appreciated. The log file it produces is below... Setup: Initializing Initialize UI Looking for font: MS Shell Dlg Found font: MS Shell Dlg ...Show All
Windows Forms passing variables between forms again :)
I have read about five different threads about passing variables between forms and none of them have made much sense to me or helped me. I know i am very new and green but can't seem to figure it out. So one more time could some one help me in simple terms. Show me how to be able to access data from one form to the next. I am wanting to for example access a string that i have assigned in form1 and use it in form 2. Don't know how to do it. I am using VS 2005 C# Thanks for any help with me being so dense. Generally the easiest way is to make a property (accessor method) on the form that has the variable and a ...Show All
Visual Basic Changing the "Working Area" of a screen.
I am trying to develop an application that will act a bit like a second taskbar, in that it will resize the working area of a screen so that maximised applications do not cover over it, or simply get hidden behind it. Examples of applications that use this would be things such as Desktop Sidebar or JetToolbar. I am trying to develop the application in Visual Basic 2005 Express Edition (using the .NET Framework 2.0). I have found how to get the current working area, but despite extensive searching I have not found a way to change it. Is this possible in Visual Basic Well done, Brendan. I haven't tested it yet ...Show All
Visual Studio Express Editions Memory usage
I wrote a very little test application with only one form, two textbox, one combobox and a button without a sigle line of programming, after publishing I run it and I found a memory usage, reading task manager panel, of more than 30.000 KB. Is it possible than a so little application uses more memory than Word (15000KB) on my system (Windows 2000 professional). How can I reduce memory usage I replicated this and have three little debug sessions going at the same time. The all take up about 11 megs on a one gigabyte system according to taskmanager and t ...Show All
