See when you create another object of form1 from form2, it doesn't mean you will get running instance. You need to get instance of same form previously loaded. So from the startup method, create two objects of form1 and form2 and use it in both form instead of creating new object and this will work.
Atul Kharecha
Posts
-
Windows media player problem -
Creatin Combo lists using an App Config fileHi, From the design point of view, get a list of all combo box from your applicatoin and save all values in database with combo name and values in one table. Later you can allow to change values by providing configuration screen to the user, that will update the this table.
-
WebDAV ErrorCheck Directory Browsing permission. You must set directory browsing permission to true. This will allow to get it a list of files/folders.
-
lock block with parameterOK, so can you tell me that when we are sending parameter to the lock block is it treated as an input parameter similar to method? Like we send parameter to the method and method will use it.
-
lock block with parameterThanks. But you know it is not expected that the parameter should be used inside code, the protected variable can be something else then parameter. So there is no sense in passing parameter like we normally use in methods.
-
lock block with parameterHi, what is the use of parameter passed in lock block and why it must be always reference type? Thanks.
-
child form minimizing Toplevel FormSame TopMost like below. Dim f As New Form2 f.TopMost = True f.Show() Me.TopMost = True
-
child form minimizing Toplevel FormTry to set this property after displayed by Show() method. That usually fixes it.
-
ClickOnce and Sandbox?Hi, My requirement is my Windows application should check periodically for latest updates on some network or web location and users can download only changed files. I found ClickOnce is helpful for this but also I am not sure that it is designed for only sandbox execution/only for current user context or once downloaded, the application can be used by any user on that machine. My application is going to be installed once on multiple machines on shared way so any user logs on should be able to run it. How can I achieve this task? Your ideas please. Thanks.
-
X - Key as a shortcut creates problem when typing.Thanks Tom, I looked for X key combination with Alt key but it is returning me only Alt key and not with combination of other key with Alt so i am unable to trap event for Alt+X key combination. Also I looked on ActiveControl but the deal is I have layers of controls like this: Bottom to top Form User Control Split control User control Textbox and other controls. When I tried to get active control, it returns me "System.Windows.Forms.SplitContainer" and not individual controls. Any help please? Thanks.
-
X - Key as a shortcut creates problem when typing.Thanks Liqz, The situation is there is one main form and depending on menu items selection, it is loading user controls on main form, which comes from multiple solutions. So there are many solutions and lots of user controls are taking part here. I do not want to change all the user controls but I want to change only main form. Thanks.
-
X - Key as a shortcut creates problem when typing.I have to add one functionality in my Windows application. When user presses X key, it should do some function by calling routine. However when user is typing something on a form(ex. in textbox), this event should not be fired. Currently due to this event handler code, user is unable to type X key becoz it is calling X key routine. Any solution of this problem? Thanks.
-
Saving file using WebBrowser controlI am using WebBrowser control and I want to save the loaded page from my application. I am using following code. webBrowser1.ShowSaveAsDialog(); This shows save dialog box but after that I want to add code whether user has clicked on Save or Cancel button. This method returns void so I am not able to decide what happend after showing dialog box. Can any help ? Thanks.
-
Problem with hit counter increment.I have label on homepage showing number of hits. I have used Session to keep track of it using database. When new session starts, its increment and on home page its getting reset. The problem is it works fine when I open site in new window, but when opened in multiple tabs of IE7, it shows same users and not incrementing. Here is the code. //Assigned 1 from global.asax on starting of each new session. lock (this) { HomeDataInterface oHits = new HomeDataInterface(); if (Session["Hits"].ToString() == "1") { oHits.QACoEHits(); Session["Hits"] = "0"; } lblHits.Text = lblHits.Text + oHits.GetQACoEHits(); } I added lock(this) but that is also not working. Can anyone help please?
-
Hit counterThanks Christian, Do I need to use Application/session variable for this? I do not want to keep it increasing for a single user, when he refresh page each time.
-
Hit counterHi, I want to add Hit counter to my site. I found few ways to do it: 1. Free hit counters - Problem is it adds site's links/signature. 2. Hit counter using file based storage - File can be crashed when lots of concurrent hits. 3. Database hit counter - Slowdowns the page load. What is best way to implement it. It's my intranet company site where I need to do it. Any suggestion from the architecture point view? Thanks.
-
Multiple database supportHi, Can anyone suggest how to design application, which support multiple databases (like SQL Server, Oracle) and with minimum change, we can shift database from one to another. Thanks.
-
Strange JavaScriptThanks Phil.
-
Strange JavaScriptGuys, I am working on a project which is developed by someone and i found strange javascript code there $(document).ready(function(){ $(document).pngFix(); }); Is something wrong ? or it is correct code? Browser gives error - "Object expected"
-
Need to keep track of SENT emailsI am sending bulk emails using asp.net with vb.net. Is it possible to keep track of sent mails? My problem is: - I want to get all mails in my sent items folder (of my mail account) - If mail is not delievered, I want to get a list of mails which are sent successfully and which mails undelievered due to any problem like unknown email id ? - Any suggestion to use xp_sendmail stored proc using SQL Server 2000 to handle this situation? Thanks.