Ori''s Q&A profile
Visual C# How to change Form control fields from another class?
Pretend you have the simplest web form, Form1. All it has is a single text box, textbox1. The project has another class in it that is called Remotable that will be used for Remoting to the application (the question is not about remoting, that part works fine). When I get into Remotable.ChangeText(string), I want to change textbox1.Text to be the passed in string. I cannot figure out how to access textbox1 from the Remotable class while Form1 is running as the active Form. The issue is that the object for Form1 was created by Main() and is an object of another class. I do not want to make that object static or public or anything. I would like there to be a way to change textbox1.Text from Remotable.ChangeText() directly. Any thoughts ...Show All
Windows Forms BackgroundWorker
I am not sure how I need to procede. I am using BackgroundWorkers to handle some long running tasks. I have a button that allows the user to stop the form. The stop button disposes of the timer. I use cancelasync with the BackgroundWorker, but the RunWorkerCompleted still fires. I tried using BackgroundWorker.CancellationPending to prevent the RunWorkerCompleted code from firing and it doesn't register that the BackgroundWorker has been cancelled. Is it possible to solve this problem The RunWorkerCompleted will still fire. Just use e.Cancelled to determine whether the run was cancelled. ...Show All
Visual C# How to hide the first form when the application starts
I have an application with a form, with two text boxes as an input of a username and a password. I would like to do that, if the user check a checkbox called "Remember me", at the start, the form isn't shown, but only the systray icon. I got the systray icon to work correctly, but i can't hide the form when the application starts. I tried to associate at the Form_Load event the code this.hide() or this.visible=false, but nothing, the form is still here. Can you help me SetVisibleCore is the method called when you use Visible property or the Show/Hide methods. From the MSDN docs: "Sets the control to the specified visible state. " "You would typically override this method to change the visibility behavior of the c ...Show All
SQL Server calling a function on a different server?
I was wondering if anyone knows the best way to call a function that is located in database on a different server then the database that is calling the function. Is it possible to do this with out linked servers I am running SQL Server 2000. Any help in this matter would be greatly appreciated. You can't use four part names to run function from a different server. However, You can use OpenQuery for Linkedserver to do the same Select * from OpenQuery(LinkedServer , 'Select MyRemoteDB.dbo.udfFunction ( ''Parameter'' )') ...Show All
Architecture Scheduling Job in a Web Farm
Hello, I have a farm of .NET servers. The application also needs scheduled jobs - like sending reports / notifications periodically. The question is - what is the best way to schedule this job I want the same set of software to run on all machines - so that if in case one machine goes down, the other is able to run the scheduled job. The options I am considering: 1) making them SQL Server jobs ( which are failed over in a cluster), but these jobs need resources available on the .NET servers, and I donot think that opening a backward connectivity from DB to App would be the best way. 2) To have some kind of a lock in the database, and schedule the job on all the machines in windows scheduler. The one which wakes up first, gets the l ...Show All
Visual Studio Express Editions Is their a value for a line wrap?
I am making a simple program that takes a textbox and splits it into 2 different text boxes with random characters in each. It fills in the missing characters with spaces. So if you print out both of the new text boxes and put one on top of the other you can see the whole message. The problem is with the line wrap in the original textbox. The new textboes don't see this and the message can get screwed up at the line feeds. I am just wondering if their is a char value for the line wrap so I can put it back into the other text boxes. Ex Dman... he said this was not what he wanted. I set my Textbox to multiline and filled it with three lines. with no crlf I examined textbox.lines and it equaled 1 ...Show All
Windows Forms generic contextmenustrip
I have a treeview that when i right click on it a contextmenustrip is shown. Actually there are different types of nodes in the treeview and each of them should have its own choices in contextmenustrip. The question is how to manage that, contextmenustrip gets the list of related choices from each node so that when the user click on that choice appropriate function will be called. Take it to consideration that i want each node to do its tasks instead of treeview. I'm not really sure what you're looking for. Try this. Start a new project and drop a Treeview and a PropertyGrid control on the form. Then cut and paste this code: Public Class Form1 Private Sub TreeView1_NodeMouseClick(ByVal sender As Object, ByVal ...Show All
Visual C# visual studio does not support environment varaibles in AssemblyFoldersEx regsitry key
Hello, I found the following registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v2.0.50727\AssemblyFoldersEx that allows me to display assemblies in the Add Reference dialog box of visual studio. But It seems that VS does expand the environment variables in the path. That means I can not write something like that in the regsitry %SEB%\bin An other problem is that this Add Reference Dialog does not support the implicit drive letter for example \Seb\Debug\bin. Currently I am developing using Clear Case and my drive letter depends on how I map my clear case view . How can I solve those problems Thanks in advance for any answer. ...Show All
.NET Development Exporting Dataset to Data Access Page and Snapshot(.snp) format
How can we export a dataset to Data Access Page and to snapshot (.snp) file ...Show All
Visual Basic How to avoid MS Outlook pop up message in vb code?
Hello, I have the following Sub... Sub SendCommentsbyEmail() Dim oNS As Outlook.NameSpace = oApp.GetNamespace("MAPI") Dim oComposeEmail As Outlook.MailItem = oApp.CreateItem(Outlook.OlItemType.olMailItem) Do Until Reader is false ... ... oComposeEmail.To = " name@domain.com " oComposeEmail.Subject = "Hello World" oComposeEmail.HTMLBody = oComposeEmail.HTMLBody & "<HTML><BODY> .... </BODY></HTML> End Sub Loop oComposeEmail.Display(True) oNS.Logoff() ... This line, oComposeEmail.HTMLBody = oComposeEmail.HTMLBody always gives me the message that a program is trying to access e-mail addresses stored in outlook. Do you want to allow ...Show All
Software Development for Windows Vista Integration with VS2005 IDE
I'm missing some obvious... I've got VS2005 Team System for Developer, installed WinFx Components 3.0 Beta 2, VS code "Orcas" Tech Preview - Dev tools for WinFx, Windows SDK. However when I try to install Visual Studio 2005 Extensions for Windows Workflow Foundation it simply brings up the SDK repair options with no mention of WWF. When I open VS2005 I can see the System.Workflow... namespaces but I I don't seem to have any designers or new items etc. Where have I gone wrong I installed the runtine (CTP June), Windows SDK (CTP June) and Orcas, but when I try to install WF Extension, the Windows SDK Repair is launched. In Visual Studio, I have templates for WinFX Win App, Web App, Service, but I don't have any t ...Show All
SQL Server How to create cumulative S-curve?
Hi I need to make two reports: one containing the Raleigh chart, the other containing a cumulative curve. In the raleigh report I do this: Per project I can see the amount of mandays on a timebase(weeks). For the s-curve (cumulative curve) this needs to happen (and I dont know how): I need to see the sum of the amount of mandays on a timebase(weeks). An example: In raleigh curve: week1 has 20md(mandays), week2 has 30md, week3 has 15md, week4 has 5md In s-curve the same values should give: week1 has 20md, week2 has 50md(30+20), week3 has 65md(50+15), week4 has 70md (65 + 5) I tried a sum of a sum but thats not allowed in RS Anyone who knows how to generate an s-curve (cumulative curve) ...Show All
Visual Studio 2008 (Pre-release) Security Identity
Hi All, I would like to understand from where to get the Certificate Encoded Value mentioned below .. < identity > < certificate encodedValue = " AwAAAAEAAAAUAAAARwEDOI5fk5i0+TbylJ9k8Kljle8gAAAAAQAAAMoBAAAwggHGMIIBdKADAgECAhCZcmDK722ujUz3waJ+O26gMAkGBSsOAwIdBQAwFjEUMBIGA1UEAxMLUm9vdCBBZ2VuY3kwHhcNMDYwNTE3MjE0NDI1WhcNMzkxMjMxMjM1OTU5WjApMRAwDgYDVQQKEwdDb250b3NvMRUwEwYDVQQDEwxpZGVudGl0eS5jb20wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAMGaK9xvyFhuHXWGpWgO4HvOYnbLbfR/9vh77g/rJe0oq6FR1hwipzyYB+isgzhZYkRUZ4lWr2wUTCqsvlHKJ3yMxNHA8u8D/H/C+PWC0PUZYn5pSHamqJ6IYvsxZN6kcBAEiJtTGA6sA7PSP1eGDSIMVhJx1hSN6ojfJkgMLtZvAgMBAAGjSzBJMEcGA1UdAQRAMD6AEBLkCS0GHR1PAI1hIdwWZGOhGDAWMRQwEgYDVQQDEwtSb290IEFnZW5jeYIQBjdsAKoAZIoRz7jUqlw19DAJBgUrDgMCH ...Show All
Windows Live Developer Forums Pushpin Detail not Displaying Correct
For some reason, when the Pushpin Detail is displayed for Pushpin's close to the bottom of the map, the the detail displays outside the map.... Does anyone know how to fix these In Firefox they display correctly, it is only in IE. Any help would be greatly appreciated. --Erick_the_Redd No I have not tryed IE7 yet. I know that I am going to have to, but I have been putting it off. Thank you for the response. We have been searching through our code and have not been able to find the specific issue. So it is nice to know that it is not our code specificly. Thanks for your help. -Erick_the_Redd ...Show All
Visual Studio Express Editions what day in week?
how do detrimen what day it is .. monday, tuehusday, etc.. or with an integer with 1 = monday 2 = tuehusday ... hehe just a way do deside the current day in the week . thanks :D DateTime has a DayOfWeek property so it's Dim weekday As DayOfWeek = DateTime.Now.DayOfWeek ...Show All
