|
Look forward to a Tip/Trick on how you parsed the HTML ... with the understanding that the format of your non-public html source may be so unique that what you had to do to parse it just doesn't generalize out to a wider range of scraping/parsing scenarios
best, Bill
"For no man lives in the external truth among salts and acids, but in the warm, phantasmagoric chamber of his brain, with the painted windows and the storied wall." Robert Louis Stevenson
|
|
|
|
|
Sorry, but there was nothing special about what I did, just used the DOM tree to get to the elements I needed and pulled the information from it. It's not the HTML that is the issue but how the content is presented within each element, and I'm sure that the problems I faced (now I understand it a bit better) were the same as any screen scraper. There is nothing special or secret about my code and I'd happily share it but I think there are already a number of articles that describe the process perfectly well; go to Luc's home page for a good start, also JSOP.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
Iam a begineer in windows form.So, please someone help me by giving idea how to design windows form that will run always in fullscreen mode.
I tries to design form ,when i run in fullscreen by clicking fullscreen button then all button and lables etc doesn't expand relatively with windows.
|
|
|
|
|
Have a look at the control's anchor and dock proprties. You may also want to look at one of the layout panels such as FlowLayoutPanel or TableLayoutPanel.
|
|
|
|
|
Try setting the forms FormBorderStyle to None and the WindowState to Maximised
"You get that on the big jobs."
|
|
|
|
|
smokindinesh wrote: when i run in fullscreen by clicking fullscreen button then all button and lables etc doesn't expand relatively with windows.
That is the correct behavior. Getting a bigger screen/higher resolution means that there's more that fits on the screen, not that the computer stretches the old screen to fill it. Yes, the form will look differently on different screens, and you'll have to design with that in mind.
A checkbox should always have the default height. It'll become smaller if the resolution goes up, but you shouldn't "rescale"; otherwise your app will look very funny with it's huge checkboxes
You can lock controls in a position, and have them "grow" to fill the remaining space. That wouldn't work (or look) well with a checkbox, but would do the trick on a multiline textbox. Research "Docking" and "Acnhoring" to have them grow with the form.
Bastard Programmer from Hell
|
|
|
|
|
If you really want a 'zoom' to any size functionality, you might look at WPF rather than WinForms.
Note that it is technically possible to ... when a screen size change occurs ... to calculate a ratio of change, and to recursively visit every control in every container, and alter the sizes and positions of each one ... and even scale-up the fonts, but, believe me, you do not want to go there !
Whether you could actually achieve some "magnification" or "miniaturization" effect by using API calls to change the screen resolution on the fly ... who knows, but I think that, too, would be an uglification (some DirectX games for example, go full-screen).
Get a good grip on 'Anchor and 'Dock, and the roles of 'Padding and 'Margin, as others have suggested here, and I think you can achieve a solution that will satisfy you.
best, Bill
"Last year I went fishing with Salvador Dali. He was using a dotted
line. He caught every other fish." Steven Wright
|
|
|
|
|
Hi All!
The standard OpenFileDialog throws exceptions when I call its ShowDialog method. I have all Exceptions activated (Menu Debug->Exceptions) and also the "Enable unmanaged code debuging" in the project properties -> Debug settings. When I turn off this last option the dialog doesn't throw any exception.
As my project deals with homemade libraries both mnaged and unmanaged I do have to debug the unamanaged code too. So disabling unmanaged debugging isn't a solution.
public AForm()
{
OpenFileDialog ofd = new OpenFileDialog();
ofd.ShowDialog();
}
Here is what I have for exceptions:
exception: GCError at memory location 0x0019d9d8..
exception: [rethrow] at memory location 0x00000000..
exception: CNLBaseException at memory location 0x065ebcb8..
RPC Server unavailable
Does anyone had this problem before or knows how to get red of those exceptions?
Thanks in advance!
|
|
|
|
|
I think you may have to check some of the initialisation values are set correctly; see here[^] for more details.
[edit]
I have reproduced the code exactly as above and it works fine, so I must assume the actual eception is caused somewhere else, and it just appears to be at that point. Can you explain how you are so sure it is caused by the ShowDialog() method?
[/edit]
modified 5-Oct-11 12:28pm.
|
|
|
|
|
It worked fine some time ago... You're right the exception could be caused somewhere else. I tested to disable only the ShowDialog() method call and it worked fine. No exceptions.
When you ran the code, did you activate the "Unmanaged code debuging"?
|
|
|
|
|
Looks more like your memory has become corrupted. You're not running the method from a different thread, are you?
Bastard Programmer from Hell
|
|
|
|
|
No I'm not, I call it from the main thread.
The Control.InvokeRequired method returns always false .
|
|
|
|
|
There shouldn't be any problems provided your main method is managed, has the [STAThread] attribute, and you create your AForm instance(s) from the main thread. If you deviate from this path, you are set for trouble with COM objects such as OpenFileDialog.
|
|
|
|
|
That's exactly what I did
|
|
|
|
|
<pre>
public MainForm()
{
InitializeComponent();
OpenFileDialog ofd = new OpenFileDialog();
ofd.ShowDialog(); //The exceptions are thrown from here
}
</pre>
I have copied the code into my program and it works perfectly.
Perhaps you forget to Initialize some Components that are used by AFORM() and exceptions are thrown because of that, or you forget to initialize the OpenFileDialog itself if it is necesary,
InitialDirectory,Filter...
Try to use your code in different place,
for example in subprogram, and call it from wanted place:
<pre>
public AForm()
{
// calling subprogram
Openfiledialog();
}
void Openfiledialog()
{
OpenFileDialog ofd = new OpenFileDialog();
ofd.ShowDialog(); //The exceptions are thrown from here
}
</pre>
If you dont get error messages again it is clear that something diferent is wrong with your program.
For this exception I have found explenation,
RPC Server unavailable:
You are trying to connect to a remote server that is unavailable or does not exist. This error may be caused by your network connection being lost.
For other exeptions I didnt.
All the Best,
Peric Zeljko
(periczeljkosmederevo@yahoo.com)
-- modified 16-Dec-11 13:59pm.
|
|
|
|
|
Kudos for answering, but please place code inside a pre block either by using the code widget or manually using <pre> ... </pre> around the code. You can still do this by editing your response.
I would not post your email address publicly in an online forum unless you really like spam!
|
|
|
|
|
That was a good clue! I disabled my network adapter to check if the network could cause the problem and the OpenFileDialog worked fine!
As my "My Documents" folder is stored on a remonte server, my computer uses the network connection to get the folder and files informations. Any idea why this could throw the exceptions I have?
I'm not sure yet why I have those exceptions, but my code isn't faulty!
|
|
|
|
|
I am doing a project which requires me to have a link from one page that will direct/take me to another page. How can i do this..?
|
|
|
|
|
Pages generally refer to web development not form development but if you are talking about forms in a Windows Application, it is easy. Create Form1 and place a button on the form using the form designer. Double click on the button and it will create the default event code stub for that control. The stub will be displayed in the code view. In the code stub enter something like:
Form2 form = new Form2();
form.Show();
"You get that on the big jobs."
|
|
|
|
|
There are two conditions in Windows form application to open Secod Form from First form.
Openning the form in Normal mode:
---------------------------------
Form2 objForm2=new Form2();
objForm2.Show();
it will open the second form as normal mode.
Openning the form in Model mode:
---------------------------------
Form2 objForm2=new Form2();
objForm2.ShowDialog();
It will open the second form as model form.
|
|
|
|
|
how to dock a windows form into ppt application window
|
|
|
|
|
If you're talking about a normal Windows Form application, you can't. PowerPoint will not repaint your window since it will know nothing about it. There is also no interface in PowerPoint to tell it about your window either.
|
|
|
|
|
I have an old Windows Forms project that has an annoying habit of claiming (some of) the forms have changed when they haven't. For example, I open the project. I open frmMain.cs, it appears in design mode and is immediately marked as changed (with the * next to the file name) even though I haven't do anything yet. This would be only marginally annoying except several times in the past it's managed to mess up some of the controls on the form (e.g. disappearing toolbars) when I've let it save while closing the project (without thinking about the fact that I didn't actually change anything).
Has anybody else seen something like this? Has anybody else managed to fix this problem?
|
|
|
|
|
Someone's been writing code in the InitializeComponent method.
#region Windows Form Designer generated code
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Text = "Form1";
}
"You get that on the big jobs."
|
|
|
|
|
I don't *think* I changed anything in there, but I'll make sure to double check.
|
|
|
|