473,657 Members | 2,490 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

windows form not displaying

Briefly this is my problem .

I created a windows form on a "parent thread" .. then I called a child
thread 1 to make it visible then hide it on that same thread .. then kill
child thread 1 ... then try to make the form visible on child thread 2 ..
However, the form will not display either on child thread 2 or "parent
thread" ... Any idea why this is? Please help

DT
Nov 21 '05 #1
2 1012
Dayne,

Maybe can this sample I made a while ago help you in this.

It is showing an extra form (two times the same) with a thread and withouth
a thread
http://groups.google.com/groups?selm...TNGP10.phx.gbl

I hope this helps?

Cor
"Dayne" <d_**********@h otmail.com>
Briefly this is my problem .

I created a windows form on a "parent thread" .. then I called a child
thread 1 to make it visible then hide it on that same thread .. then kill
child thread 1 ... then try to make the form visible on child thread 2 ..
However, the form will not display either on child thread 2 or "parent
thread" ... Any idea why this is? Please help

DT

Nov 21 '05 #2
"Dayne" <d_**********@h otmail.com> schrieb:
I created a windows form on a "parent thread" .. then I called a child
thread 1 to make it visible then hide it on that same thread .. then kill
child thread 1 ... then try to make the form visible on child thread 2 ..
However, the form will not display either on child thread 2 or "parent
thread"


Always show your forms in the app's main UI thread. You can use
'Control.Invoke '/'Control.BeginI nvoke' to communicate in the thread -> UI
direction.

More information:

Multithreading:

<URL:http://msdn.microsoft. com/library/en-us/dnforms/html/winforms0611200 2.asp>
<URL:http://msdn.microsoft. com/library/en-us/dnforms/html/winforms0816200 2.asp>
<URL:http://msdn.microsoft. com/library/en-us/dnforms/html/winforms0123200 3.asp>

<URL:http://www.devx.com/dotnet/Article/11358/>

<URL:http://msdn.microsoft. com/library/en-us/cpref/html/frlrfSystemWind owsFormsControl ClassInvokeTopi c.asp>

Multithreading in Visual Basic .NET (Visual Basic Language Concepts)
<URL:http://msdn.microsoft. com/library/en-us/vbcn7/html/vaconthreadingi nvisualbasic.as p>

Sample:

<URL:http://dotnet.mvps.org/dotnet/samples/filesystem/downloads/FileSystemEnume rator.zip>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2308
by: Tim Haughton | last post by:
I've just released an article on using Test Driven Development with C# and Windows Forms. GUI's are often difficult to test, so I thought it might be of interest. The article along with the example source code can be downloaded here: http://www.blogitek.com/timhaughton/archives/files/User%20Interrogator%20And%20TDD.zip The article text is below. Not sure what it will do to the formatting when
2
1273
by: eXtreme | last post by:
I do the following: 1 - create a parent form called Options & put a listbox on the form lstURLs. 2 - create a child form called OptionsAdd 3 - in the parent form I create a line "Form dlgOptionsAdd = new OptionsAdd(ref this.lstURLs);" 4 - in the the child form I modify "public OptionsAdd() {}" to be "public OptionsAdd(ref ListBox lstURLs){}" When I do this I'm only able to access the ListBox in the OptionsAdd method
6
2628
by: billr | last post by:
I have developed a small API for taking care of a lot of boiler plate stuff in a multi formed windows application, for example setting up a messaging thread framework. New Forms, in the appllication using the API, are subclassed to a Form contained within the API, and they are controlled (controlled in this instance means, kept alive, displayed and hidden) at runtime by a thread whose responsibility is this sole task. In order to run...
9
1947
by: Justin Engelman | last post by:
Hi, I have a website that uses an ISAPI filter that will redirect anyone going to any page on the site to an SSL login page (on a different website with the same root domain) if they do not have the appropriate session cookie already. After logging in on that page successfully they are given the cookie and redirected back to the page they initially tried to go to. I would like to create a Windows application that gets data from that...
3
7481
by: Chris Paul | last post by:
I'm having trouble with PHP & PostgreSQL/OpenLDAP/Apache on Windows. I've set this up countless times on BSD (piece of cake) but I'm trying to do this on Windows now so that my developer can work on her local machine. Everything looks pretty good. OpenLDAP/cygwin works great. PostgreSQL works great. Apache runs. PHP runs. But when I try to connect to my PostgreSQL server using PHPPgAdmin, I
0
1244
by: Phil G. | last post by:
Hi, my 'project' requires that I create a form with text info. at set time periods. These time periods are not evenly spaced so I pass a param for the delay(seconds). In order to debug this I have created a form with a button, textbox and NumericUpDown. Textbox holds the message to be displayed on the newly created form and the NumericUpDown allows for set of delay. I have this working to a fashion but my new form (frm) is not fully...
3
8616
by: garyusenet | last post by:
Dear Professionals, I have recently been using the wonderful krypton toolkit and am trying to use them in my small hobby application. I include this bit of info as an aside really because i'm sure my question can be extrapolated to the more general case, so here goes! I have a box standard windows forms project. (File, New Project, Windows Application, OK)
9
3755
by: oz | last post by:
Hi All, I want to make a dictionary with windows application. My data is html format. therefore, i use webBrowser control on my windows form. If the user click any word in webBrowser control, word mean must browse to user (like babylon). I have a windows form. My form has webBrowser control. I fill a html content with javascript (Dictionary.js) to webBrowser.
6
5072
by: =?Utf-8?B?VGlhZ28gTWFycXVlcw==?= | last post by:
Hi, I'm creating a kind of a gadget using C# and windows forms. For this to work I need it to that it won't ever get minimized, even if the user presses Windows+D or Windows+M. Does anyone knows how can I do that? Or am I thinking about this in the wrong way? Thank you very much for your support!
0
1143
by: sanjay02 | last post by:
hi friends, i am new to .net programming.any one help me to write a chat application with custom events in C#.net windows programming. i got this through delegates.but, i need to do this in custom events. i wrote some code as follows. first i taken a form, placed abutton. under that button i write the code to generate a form(form with containing two text boxes, 2 labels and a button.); i.e., //button_click Form2 f2=new Form2( ); i...
0
8385
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8303
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8502
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8602
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7316
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6162
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4300
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1601
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.