473,626 Members | 3,459 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Creating Form without Application.Run

I would like to create form that simply hold textboxes that I log info to during the execution of a single-thread application. In Java, I found JFrame ideal for the task, but I can't recreate the same design with Forms. I can create the Form without Application.Run ( ), but when debugging, I can't seem to see any text that gets AppendText'ed to the form. I've done some searching, but cannot find any samples or documentation that use Forms without passing control to the Form. Any help?
Nov 15 '05 #1
3 2532
JavaConvert wrote:

I would like to create form that simply hold textboxes that I log info to during the execution of a single-thread application. In Java, I found JFrame ideal for the task, but I can't recreate the same design with Forms. I can create the Form without Application.Run ( ), but when debugging, I can't seem to see any text that gets AppendText'ed to the form. I've done some searching, but cannot find any samples or documentation that use Forms without passing control to the Form. Any help?


When you change a interface object, typically it updates internal state and
then marks itself for repainting. Repainting then occurs whenever there is a
break in processing. If there is no break, then you won't see the UI update.

You can force UI controls to repaint now by calling Update(). Try this and see
if it fixes your problem.
Nov 15 '05 #2
Thanks for the help, but Update( ) had no effect

But I did discover a new clue. The textbox in the form IS getting updated with the AppendText, BUT it seems to clear itself when I click on the window during debug. By default, the form is getting created behind the VS.Net window during debugging. So when I reduced the size of the Visual Studio window so the form was visible at the time of creation - the text updates can be seen. But if I click on the form window - any text in the textbox disappears and any new text is not shown as I step through the code

So maybe it is a debugging option or window property that is to blame. Any help with that

----- Julie wrote: ----

JavaConvert wrote
I would like to create form that simply hold textboxes that I log info to during the execution of a single-thread application. In Java, I found JFrame ideal for the task, but I can't recreate the same design with Forms. I can create the Form without Application.Run ( ), but when debugging, I can't seem to see any text that gets AppendText'ed to the form. I've done some searching, but cannot find any samples or documentation that use Forms without passing control to the Form. Any help


When you change a interface object, typically it updates internal state an
then marks itself for repainting. Repainting then occurs whenever there is
break in processing. If there is no break, then you won't see the UI update

You can force UI controls to repaint now by calling Update(). Try this and se
if it fixes your problem

Nov 15 '05 #3
JavaConvert wrote:

Thanks for the help, but Update( ) had no effect.

But I did discover a new clue. The textbox in the form IS getting updated with the AppendText, BUT it seems to clear itself when I click on the window during debug. By default, the form is getting created behind the VS.Net window during debugging. So when I reduced the size of the Visual Studio window so the form was visible at the time of creation - the text updates can be seen. But if I click on the form window - any text in the textbox disappears and any new text is not shown as I step through the code.

So maybe it is a debugging option or window property that is to blame. Any help with that?


While you are stepping through code w/ the debugger, the UI will essentially be
disabled. This is because when in break mode, the application is completely
stopped, and therefore cannot repaint itself.

If you are looking for diagnostic output during debugging, look into Trace and
related -- this outputs text to your debugger output window.
Nov 15 '05 #4

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

Similar topics

1
9894
by: Matthew Clubb | last post by:
Hi, I need help developing an expanding form I've decided that a use of PHP, Mysql and Javascript is the best platform for creating a selection of database interfaces which I'm trying to build for my company. I had been using Microsoft Access, but obviously this requires licenses for every machine. BUT..... I'm look for an easy way of recreating subforms. I'm trying to create a Purchase Order system and in Access I did this by using a...
1
461
by: JosR | last post by:
Using: VB.Net, Framework 1.1, Windows XP SP2 Hardware: Pentium IV 3,1 GHz, 1 Gb RAM memory The VB.Net application opens a child form as follows: Private Sub OpenChildForm() dim frm as new frmWhatever frm.showdialog()
6
3242
by: DraguVaso | last post by:
Hi, In my application, on some given actions while debugging in Visual Studio, I suddenly get a "System.ComponentModel.Win32Exception was unhandled" Message="Error creating window handle." exception. The problem is that this exception isn't raised somewhere in a method, so it just shows up, and it causes the application to shut down. Is there anyway how to catch this kinds of exceptions? Can I put somewhere a
2
5964
by: Iain Miller | last post by:
Now this shouldn't be hard but I've been struggling on the best way as to how to do this one for a day or 3 so I thought I'd ask the assembled company..... I'm writing an application that tracks a group of Sales people, the customers they deal with and the business they transact with them. I've got my head around all the tables & some of the basic Query structures OK and am beginning to delve into creating the forms I need to be able...
8
5961
by: Nanda | last post by:
hi, I am trying to generate parameters for the updatecommand at runtime. this.oleDbDeleteCommand1.CommandText=cmdtext; this.oleDbDeleteCommand1.Connection =this.oleDbConnection1; this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_ApplicantName", dataset.Tables.Columns.DataType, 50,
7
3881
by: Zeke | last post by:
I'm using the following code to create word document but the problem is if you go to task manager you'll see a WINWORD.EXE process is running but not the application, here is the code: Word.Document aDoc= WordApp.Documents.Add(ref fileName, ref newTemplate, ref docType, ref isVisible); WordApp.Visible = true; aDoc.Activate(); WordApp.Selection.TypeText("Hello");
12
4160
by: enak | last post by:
I have found some code that shows how to convert an html form to Word. The message said to simply put the following in the Page_load: Response.ContentType = "application/ms-word" Response.AddHeader("content-disposition", "inline; filename=BP_CaseStatus.doc") Now all I should have to do is create the page just like I would if I were going to display it in the browser.
12
3153
by: Mats Lycken | last post by:
Hi, I'm creating a CMS that I would like to be plug-in based with different plugins handling different kinds of content. What I really want is to be able to load/unload plugins on the fly without restarting the application. What I did was to create an AppDomain that loaded the plugins and everything was great, until I tried to pass something else that strings between the domains...
0
2071
Plater
by: Plater | last post by:
I have been trying to access a messageloop without opening a form. That is, I want to be able to receive messages from other applications through the message loop without having a form. I've read that you can use Application.Run() without an argument to create a loop without a form, but I have no way of sending messages to that loop (that i have figured out) I've tried using: Application.AddMessageFilter(ft);...
0
8268
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
8202
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,...
0
8510
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
7199
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
6125
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
5575
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
4202
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1812
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1512
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.