Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / April 2005

Tip: Looking for answers? Try searching our database.

Thread problems with own ApplicationContext,

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
eskeeske - 17 Apr 2005 18:42 GMT
If i have a Sys Tray Application, with a ApplicationContext but with no
main form - How can i then call methods that e.g shows forms ???

The problem is that because there is no main form, there is no methods
like invoke ??

I found this q about it, but it does not solve my problem because in
this case there is a main Form :
http://groups-beta.google.com/group/microsoft.public.dotnet.framework.windowsfor
ms/browse_thread/thread/f4c86b98cbd56b1c/e3d2afd4eb047aa6?q=ApplicationContext+I
SynchronizeInvoke&rnum=1#e3d2afd4eb047aa6


?? ? ?
Durstin Selfridge - 18 Apr 2005 20:00 GMT
You can create forms the normal way. Build a form in design time, and new it
up at run time. For example, suppose you have a form, Form1, and suppose you
have a context menu, mnuOptions, for your system tray app. You can setup the
menu with handlers to display your form, e.g.:
mnuOptions.MenuItems.Add(New MenuItem("Form1", _
New EventHandler(AddressOf ShowForm1)))
mnuOptions.MenuItems.Add(New MenuItem("MessageBox", _
New EventHandler(AddressOf ShowMessageBox)))
Private Sub ShowForm1(ByVal sender As Object, ByVal e As EventArgs)
Try
Dim frm As New Form1
frm.Show()
Catch Ex As Exception
'Handle exception
Throw Ex
End Try
End Sub
Private Sub ShowMessageBox(ByVal sender As Object, ByVal e As EventArgs)
Try
MessageBox.Show("Hello world.")
Catch Ex As Exception
'Handle exception
Throw Ex
End Try
End Sub
--durstin
> If i have a Sys Tray Application, with a ApplicationContext but with no
> main form - How can i then call methods that e.g shows forms ???
[quoted text clipped - 4 lines]
> I found this q about it, but it does not solve my problem because in
> this case there is a main Form :

http://groups-beta.google.com/group/microsoft.public.dotnet.framework.windowsfor
ms/browse_thread/thread/f4c86b98cbd56b1c/e3d2afd4eb047aa6?q=ApplicationContext+I
SynchronizeInvoke&rnum=1#e3d2afd4eb047aa6


> ?? ? ?

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.