Visual Basic .NET Forums  

Go Back   Visual Basic .NET Forums > VB.NET > Windows Services

Windows Services Windows service development discussion

VB.NET Forums Newsletter Signup:
Email address:


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-19-2008, 4:25 PM
VB.NET Forum Enthusiast
.NET Framework: .NET 2.0
 
Join Date: Jun 2007
Location: Norway - Drammen
Age: 21
Posts: 51
Reputation: 29
Levu is on a distinguished programming path ahead
Default Can't declare webbrowser windows service

Just started trying to make a windows service.
And i want it to check something on the internett, but i cant find the webbrowser thing..

This works regularly.. But not now.. Cant find the webbrowser..
Code:
Friend WithEvent browser1 as new webbrowser
Anyone know why?
__________________
Vb.net njub
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 11-19-2008, 5:31 PM
JohnH's Avatar
VB.NET Forum Moderator
.NET Framework: .NET 3.5 (VS 2008)
 
Join Date: Dec 2005
Location: Norway
Age: 36
Posts: 9,163
Reputation: 1079
JohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond repute
Default

WebBrowser is a Windows.Forms control, controls and forms is not used in windows services, which don't have UI and interact with active desktop, and don't have a windows message loop. You should be able to use a WebRequest/WebClient.
__________________
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 11-19-2008, 5:33 PM
VB.NET Forum Enthusiast
.NET Framework: .NET 2.0
 
Join Date: Jun 2007
Location: Norway - Drammen
Age: 21
Posts: 51
Reputation: 29
Levu is on a distinguished programming path ahead
Default

Meaning it wont work at all?
I can add it from the design view at the Service.vb (the start class of service)
__________________
Vb.net njub
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 11-19-2008, 11:47 PM
jmcilhinney's Avatar
VB.NET Forum Moderator
.NET Framework: .NET 3.5 (VS 2008)
 
Join Date: Aug 2004
Location: Sydney, Australia
Age: 40
Posts: 5,309
Reputation: 415
jmcilhinney master of VB.NETjmcilhinney master of VB.NETjmcilhinney master of VB.NETjmcilhinney master of VB.NETjmcilhinney master of VB.NETjmcilhinney master of VB.NETjmcilhinney master of VB.NETjmcilhinney master of VB.NETjmcilhinney master of VB.NET
Default

Use a WebClient, which is a non-visual object that will get and send data over the Internet.
__________________
Essential: Multiple Forms
101 Samples: 2002 | 2003 | 2005Free Components: WFC | XPCC | ElementsEx | VBPP | ADO.NET/MySQL | VisualStyles | NPlot | SDFTutorials: Home & Learn | Start VB.NET | Learn VB.NETFavourites: MSDN | WinForms.NET | ASP.NET | WinForms FAQ | WebForms FAQ | GotDotNet | Code Project | DevBuzz
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





All times are GMT -4. The time now is 6:37 PM.

Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0


For advertising opportunities click here.