.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Bringing form upfront after Show()

Posted By:      Posted Date: May 22, 2011    Points: 0   Category :Windows Application

Hello, I have a tray application with the form that i hide using the Hide() method

if (FormWindowState.Minimized == this.WindowState)
  notifyIcon.Visible = true;

The problem is, when i Show() the form back it appears under all active applications and i need to click on it in the toolbar to make it active.

I've read the msdn and i know that Activate() method wouldn't help me here.

Is there a way ?

View Complete Post

More Related Resource Links

How to show previouse user comments on the task form of a user in sharepoint Designer

I am using sharepoint designer for designing workflow. I have 4 steps. on each step a user write some comments for the next user. now I want to show all those comments on task form for the current user to whom the task has been assigned.

Unable to Show Edit item Links in Data Form Web Part

I have a DFWP connected to custom list and the boxes to Show Edit Item Links, Show Delete item links and Show Insert Item links are grayed out so that they can not be checked. This works fine when I use a DFWP connected to a standard list (i.e., Contacts). Is there something special that needs to be done to activate this functionality?ThanksDean

how do I create/show modal form using the following code?

The text contained in a .txt file loaded with the following code doesn't show up in the RichTextBox control on a separate form which has been instantiated and launches sucessfully.  Why don't the contents of the .txt file show up in the RichTextBoxControl on the instantiated form?  Thank you for ideas! private void ToolStripMenuItemOpenAlarmHistory_Click(object sender, EventArgs e) { OpenFileDialog openFile1 = new OpenFileDialog(); FormAlarmHistory_Loaded_Into_RichTextBox formAlarmHistory; openFile1.Filter = "txt files (*.txt)|*.txt|All files (*.*)|*.*"; if(openFile1.ShowDialog() == System.Windows.Forms.DialogResult.OK && openFile1.FileName.Length > 0) { using (formAlarmHistory = new FormAlarmHistoryLoadedIntoRichtTextBox()) { dialogResult = formAlarmHistory.ShowDialog(); if (dialogResult == DialogResult.OK) { formAlarmHistory.richTextBoxPrintCtrlForLoadedAlarmHistory.LoadFile(openFile1.FileName); } } } }

Mdi Form Locks Up When Trying To Show Form from Added Project

I added a second project to my solution, and now I am trying to load a form from the added project as a child to the Mdi which is in my first project.  Everything looks okay, but the Mdi locks up when I click on my toolStripMenuItem.  There are no error messages and it builds okay.  I am using VS2010. using PDFToImage; private void pDFToImageToolStripMenuItem_Click(object sender, EventArgs e) { PDFToImage.FormMain FormMain = new PDFToImage.FormMain(); FormMain.MdiParent = this; FormMain.Show(); } Rob Evans

Show form in browser?

Hi all. I am working on MOSS 2007 Enterprise platform. I am using InfoPath, and have checked on "Design a form template that can be opened in a browser or InfoPath", and also edited the settings of my Document Library to display browser enabled documents as "Display as a Web page".  The template is saved as a content type. When I go to my library, I can chose to create a new document with my InfoPath template, and it will open in a web site. I don't want it to behave like this. I want my form to be shown on a page, within the masterpage, where the users can register information and submit by clicking on a button. Can this be done? Are there any web parts to accomplish this? Regards

What happens (threadwise) when I call Form.Show()?



I'm doing a dll an object of which will be created by a COM host.

I've done all the interop stuff but now I want to display a Form and when someone presses a button of that form, I'll call host methods.

So the setup is this:

Com-Host executes VBScript

VBScript says set X = createobject("MyStuff")

And then X.check(HostObject) . X is implemented in C#. HostObject is the COM Host, a CAD tool.

So far so good.

In check(ViewDraw.IvdApplication App) I do a

MyForm G=new MyForm(App); G.Show();

What happens is that Show() returns immediately, I'm quickly back in VBScript but the form stays on the screen and is plainly usable.

On the other hand, if I display the thread id's while executing in

  • check()
  • MyForm->Menu-Exit

I always get the same thread id.

So, how does that work?

If I store App as a property of the form and, upon some buttonpress event, call methods like App.GetAllSchematicPages(), they'll still hit App out of the blue. Is that safe? The CAD program itself is definitely not thread safe.

Would I have to do some kind of producer-consumer queue for processing messages in the check(App) method?

I'm picturin something like:

How can I show version history on a custom edit form?



I have a simple list that contains aa title and a number field.  On the edit form, I want to show all prior updates to the number field, like so:

Title:  ABC
01/01/2010     10  Updated by: user1
02/01/2010     20  Updated by: user2
Count:            <Textbox for input>

I can create a custom edit form in Designer, but by default I get a DataFormWebPart with an XSLT.  I don't know how to configure the data source to pull all versions so that they could be shown in the XSLT.  If I can't use the DFWP and have to do everything custom, please provide details and/or links.

This is for WSS 3.0.  Any help would be greatly appreciated.  Thanks!
 - Ed.

Show workflow status in form?



I am trying to show the workflow stat in my form by using a recieve data connection. The only thing I get shown in my field is 0, no matter what.

Is it possible to show Approval staten, i.e. "Pending", "Draft", "Rejected", "Approved" in a read only in a read only field in my form?

show only infopath form created by me after approval

hi, i have a form that can be filled by a user and approve by a approver. but what i notice is when the approver approve or reject the form and submit it to the user his library it shows that it is created by the approver and not the user that has filled the form. i want that the user can view only his form that has been send back. how can i do this. i can not use "created by [ME]" because the created by me has the name of the approver. does someone knows how to do this?

Null values doesnot show up in custom edit form in a drop down choice menu


Hello guys,

I have a problem. I don't know why custom edit form is behaving like that.

I have a choice drop down with values  " ","Yes","No". For custom  new form, I can insert null values and everything is working fine.

But coming to this custom edit form which I created.  While editing, if we set a value to null and submit the form. It is getting the "Yes" as the value. It is skipping the null value and placing the "Yes" value. I have kept the default value for choice drop down as " ".(null too).

I don't know why it is not showing null value. Do guys have any idea or if came across anything like this. Please help

How to show popup model form thru code behind?


How to show popup model form thru code behind?

Actuly i have a button in my master page and my multiple

forms are inharit from that, so OnClick of master page button

my inharit form event get executed, so how can i open the form

as model form thru code behind as well if user click ok button of

model form then i wanted to refresh the page.

i am not using ajax toolkit, so i can't use <ajaxToolkit:ModalPopupExtender>.

Workflow Initialize Form Can Show In Manual Mode Only?


Hi friends,

I have a Sharepoint Workflow Initialize Form, I'd like it to show when an item is created on the list, and I'm sure I've selected this option in workflow association, but that Initialize Form doesn't show up when item is created. But it can show when I manually start a workflow instance.

So workflow initialize form can show in manual workflow start only?


EaTing Shan

Workflow Initialize Form Can Show In Manual Mode Only?


Hi friends,

I have a Sharepoint Workflow Initialize Form, I'd like it to show when an item is created on the list, and I'm sure I've selected this option in workflow association, but that Initialize Form doesn't show up when item is created. But it can show when I manually start a workflow instance.

So workflow initialize form can show in manual workflow start only?


EaTing Shan

Show wait form while loading another heavy form


Dear All,

I have a situation in my project that is a small and nice popup with loading animated gif should show while loading heavy forms in the application. For that to implement I have used threading concept. I am opening loading splash form in a separate thread and ending it when the main thread notifies that its task is completed. Every thing is working fine but my problem is when the user clicks on the application's forms while splash screen is doing its business the application is hanging.

Please help me on this.The code is as follows

class PleaseWait : IDisposable
        private FrmSplashWait mSplash;
        private Point mLocation;
        private string ttlTxt;

        public PleaseWait(Point location,string ttl)
            mLocation = location;
            ttlTxt = ttl;
            Thread popupthread= new Thread(new ThreadStart(workerThread));

Model form open but page content is not show how to solve


i am  loading a page when we click a button .i am require a loadimage.show when i div laoding time and disapper when i div loaded but model form content is not show

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
    <link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.1/themes/base/jquery-ui.css" type="text/css" />
    <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.1/jquery-ui.min.js"></script>

    <a class="ajax" href="http://www.google.com">
      Open as dialog

    <script type="text/javascript">
    $(function (){
        $('a.ajax').click(function() {
            var url = this.href;
            var dialog = $('<div style="display:hidden"></div>').appendTo('body');
            // load remote content
                function (responseText, textStatus, XMLHttpRequest) {
            //prevent the browser to follow the link
            return false;

Creating Menu Dynamically and Show form dynamically in Windows Forms


Dear All,

I am using a splitter control in windows forms. Left panel is having menus which I have populated from Database. And Right panel should display forms according to the selection from left pan.

For Eg. I  have a Main menu called Forms and got 5 Sub menus names  form1,form2,form3,form4 and form5 .When I click Form1 in Menustrip it should display Form1 on the right panel . And the same goes for all the menus.

Can you somebody guide me how can I achieve that

Best Regards


How can I show data from a Workflow variable in a Collect Data from User form?



I have collected some data from a user in a SharePoint Designer workflow step and I now want to display that data in a second "Collect Data from User" form at a subsequent step in my workflow.  How can I add the content of my Workflow data variable in the Collect Data from user form?

This guy says he has done something similar but does not explain the detail: http://www.mstechblogs.com/paul/spd-workflow-collect-data-from-a-user-modify-the-generated-task-form

I'm keen to hack at the aspx form in SPD but I really need the particular line of code that will do it as I'm not a developer.

Your help is greatly appreciated!

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend