Click here to Skip to main content
15,899,126 members
Home / Discussions / C#
   

C#

 
QuestionHow to generate Graphs using xml with crystal reports. Pin
K V Sekhar12-Sep-08 21:43
K V Sekhar12-Sep-08 21:43 
AnswerRe: How to generate Graphs using xml with crystal reports. Pin
Mbah Dhaim13-Sep-08 2:47
Mbah Dhaim13-Sep-08 2:47 
Questionwoking with marshal Pin
iman_kh12-Sep-08 21:24
iman_kh12-Sep-08 21:24 
AnswerRe: woking with marshal Pin
User 665812-Sep-08 22:47
User 665812-Sep-08 22:47 
QuestionCpu temperature Pin
methhoo12-Sep-08 14:49
methhoo12-Sep-08 14:49 
AnswerRe: Cpu temperature Pin
Mark Salsbery12-Sep-08 15:25
Mark Salsbery12-Sep-08 15:25 
QuestionConvering treeView.Nodes to contextMenuStrip.Items? Pin
Mohammad Dayyan12-Sep-08 13:13
Mohammad Dayyan12-Sep-08 13:13 
QuestionGetting HTML source of a frame using the WebBrowser windows form object Pin
Jay Gatsby12-Sep-08 12:19
Jay Gatsby12-Sep-08 12:19 
Hello. I've got a little problem I've been having a hard time solving.

I'm trying to use the web browser control on a windows form to get the html of a frame that the given page contains. I can't just simply use the url of that inner frame, because with each login to this site it has an appended session ID on the url and other such a=b&c=d&e=f nonsense that changes from session to session. Digging through google I found mention of webBrowser1.Document.Window.Frames[0 /*or any other index for that matter, but in my case there is only 1 element*/ ].Document.Body but this threw a System.UnauthorizedAccessException when I tried it.

Ultimately, what I'm going for is a rather simplistic project but it's giving me fits on this point. I'd like to be able to login on this form on ogame.org and have it refresh every five minutes, searching the contents of "mainframe" for the word "hostile" - and if this is found, sound an alarm (system speaker et all), as this would mean one of my planets has an incoming attack, and I know how to do all of this except getting the damn mainframe's source. I know it shouldn't be too hard to do - in my opera browser I can just right click, go to the frame menu, and open it up just fine, and that's the source I want! but I can't get this out of my web browser control. all I can get is--

[code]

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict //EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html>
<head>
<meta name="author" content="Gameforge Productions GmbH" />
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
<meta name="keywords" content="META_KEYWORDS" />
<meta name="description" content="META_DESCRIPTION" />
<meta name="robots" content="index, follow" />
<meta name="language" content="en" />
<meta name="distribution" content="global" />
<meta name="audience" content="all" />
<meta name="author-mail" content="info@ogame.de" />
<meta name="publisher" content="Gameforge Productions GmbH" />
<meta name="copyright" content="(c) 2007 by Gameforge Productions GmbH" />
<meta http-equiv="expires" content="0" />
<meta http-equiv="pragma" content="no-cache" />
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
<title>OGame.org</title>


</head>

<frameset rows="*,0,0" frameborder="no" border="0" framespacing="0">
<frame name="mainframe" src="home.php" frameborder="0" scrolling="auto" noresize>
</frameset>
</html>

<script>
frame = document.getElementsByName['mainframe'][0];
if ( typeof( window.innerWidth ) == 'number' ){
if (window.innerWidth <= 800){
frame.scrollbars.visible=true;
}
}else {
if (document.body.clientWidth <= 800){
frame.scrollbars.visible=true;
}
}
</script>
[/code]

--from the top level page.

If anyone knows a thing or two about this windows control and is able to help me I'd be really grateful. I've been working on this all day and can't get it to work because of this one, single problem.

Thanks!

-Gatsby
QuestionI need Help passing data back and forth between Windows forms Pin
chobo212-Sep-08 12:08
chobo212-Sep-08 12:08 
AnswerRe: I need Help passing data back and forth between Windows forms Pin
Jay Gatsby12-Sep-08 12:40
Jay Gatsby12-Sep-08 12:40 
GeneralRe: I need Help passing data back and forth between Windows forms Pin
nelsonpaixao12-Sep-08 15:02
nelsonpaixao12-Sep-08 15:02 
AnswerRe: I need Help passing data back and forth between Windows forms Pin
DaveyM6913-Sep-08 2:30
professionalDaveyM6913-Sep-08 2:30 
QuestionDataGridViewComboBoxColumn is not showing DisplayMember on moving to other column Pin
nishantkainth12-Sep-08 10:51
nishantkainth12-Sep-08 10:51 
QuestionHow can we find WindowState changes ? Pin
Mohammad Dayyan12-Sep-08 10:16
Mohammad Dayyan12-Sep-08 10:16 
AnswerRe: How can we find WindowState changes ? Pin
User 665812-Sep-08 10:30
User 665812-Sep-08 10:30 
GeneralRe: How can we find WindowState changes ? Pin
Mohammad Dayyan12-Sep-08 10:53
Mohammad Dayyan12-Sep-08 10:53 
GeneralRe: How can we find WindowState changes ? Pin
User 665812-Sep-08 11:17
User 665812-Sep-08 11:17 
GeneralRe: How can we find WindowState changes ? Pin
Mohammad Dayyan12-Sep-08 11:20
Mohammad Dayyan12-Sep-08 11:20 
QuestionCancel event Pin
netJP12L12-Sep-08 9:38
netJP12L12-Sep-08 9:38 
AnswerRe: Cancel event Pin
User 665812-Sep-08 10:26
User 665812-Sep-08 10:26 
QuestionBlackjack help needed Pin
Member 395831212-Sep-08 8:51
Member 395831212-Sep-08 8:51 
AnswerRe: Blackjack help needed Pin
Guffa12-Sep-08 9:08
Guffa12-Sep-08 9:08 
GeneralRe: Blackjack help needed Pin
Member 395831212-Sep-08 9:15
Member 395831212-Sep-08 9:15 
AnswerRe: Blackjack help needed Pin
Robert.C.Cartaino12-Sep-08 9:31
Robert.C.Cartaino12-Sep-08 9:31 
GeneralRe: Blackjack help needed Pin
Member 395831212-Sep-08 9:51
Member 395831212-Sep-08 9:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.