|
Textbox1.MultiLine =true;<br />
Textbox1.AcceptsReturn=true;
|
|
|
|
|
Hi,
I'm trying to do a search (on Google for example) from a forms app using HttpWebRequest.
If I do:
WebProxy proxy = new WebProxy("http://myproxy",true);
HttpWebRequest req=(HttpWebRequest) WebRequest.Create("http://www.google.com");
req.Proxy=proxy;
HttpWebResponse resp = (HttpWebResponse)req.GetResponse();
it works.
But if I try a search string, it doesn't:
WebRequest.Create("http://www.google.com/search?hl=en&ie=UTF-8&oe=UTF-8&q=Shakespeare&btnG=Google+Search");
I get a WebException error when calling GetResponse.
What am I doing wrong?
Thanks
|
|
|
|
|
You should be using the Google WebService...
http://www.google.com/apis/[^]
I don't know whether it's just the light but I swear the database server gives me dirty looks everytime I wander past.
-Chris Maunder
Microsoft has reinvented the wheel, this time they made it round.
-Peterchen on VS.NET
|
|
|
|
|
Just stared playing with WinForms - previously build all apps in MFC. I never liked the Windows Print Preview function so I decided to write my own.
All works as desired, pages scroll as desired whether there is one or 30. My question... PrintPreview seems to use printer resolution - is there any way to use screen resolution to conserve memory? Any help appreciated.
Thanks for any suggestions.
|
|
|
|
|
In the old IDE, when working on a control inside a form, you could pull up the control and view all events associated with that control. Selecting one would put that event handler into your code.
In VSS 7 I can only point at the form with only existing events and methods showing on the right-side dropdown box.
So how do I get to initiate uncoded events such as LostFocus without doing everything by hand and without the risk of misspelling the event name???
Thanks,
Michael
_____________________________________________
The world is a dangerous place. Not because of those that do evil, but because of those who look on and do nothing.
|
|
|
|
|
At the top of the property pane is are two buttons that switch you between viewing properties or events for the selected control. Once you've switched to the event list, you should see what you're looking for.
You can also use the class browser, to go up the inheritance chain to the function you want, and override it -- if that's the sort of functionality you need.
John :D
|
|
|
|
|
|
Well it looks easy but I'm having problems with the following: I have a combobox with a number of items, but if I select an item in the dropdown, I first want to show a confirmation dialog with yes and no buttons. If 'yes' is selected, the item is selected in the combobox, if no is selected, the item is not selected and the original selected item remains selected.
For this to work, I was looking for a SelectedIndexChanging event or something like that, but that doesn't exist.
Any ideas?
|
|
|
|
|
Maybe you have a good reason, but that sounds like a UI I would hate to use. Can you move the confirmation to some other point (like clicking OK)?
At worst, you could record the current setting when the drop-down list first gets displayed. Then, after they've made a selection, compare the two and take the appropriate actions.
John :D
|
|
|
|
|
Is there a C# form control that can handle HTML views?
i.e. something like a RichTextBox that takes & parses html, so for example if I set the control text to be something like :
{b}hello world{/b}
It would render as follows at runtime (For the sake of clarity, I have replaced < with {) :
Hello World
|
|
|
|
|
|
Hi.
In my project I have a web reference to a wsdl-file on a remote server, and I call a method returning an object (UserObj)-or rather a struct actually; it has a number of fields but no methods. What I would want to do is to transform the data returned to HTML using the Xml.Xsl.XslTransform Transform() method and a XSL file I have defined my self.
Now my problem is this: how can I transform my UserObj back to XML? It can't be necessary to 'manually' pick out every field and insert it into an XML structure, can it? I mean the communication with the remote server is done with soap and the data returned to my process is in XML when it gets there, right? Or is there a way I can stop the initial translation from XML to the UserObj form from happening?
I'm tearing my hair away over this so any help will be gratefully appreciated!
Regards
/EnkelIk
|
|
|
|
|
Move the UserObj to a dataset, then with the dataset do a xmlwrite
|
|
|
|
|
Thanks, that works, but is it possible to do it without knowing anything about the field names in the UserObj? I.e. can I isolate my code from any changes in the wsdl-file regarding the field names of UserObj?
I have tried to extract the fields as an enumerator, but since the object does not inherit from Systems.Collections it hasn't worked out for me.
Thanks
/EnkelIk
|
|
|
|
|
When I run a debug/release C# program the output window shows loaded ... gac/drawing, and then the programs form doesn't show.
Several iterations of stop /start clicks get it going.
Anyone know why ???????
Thanks
viva AMIGA
|
|
|
|
|
I'm guessing it is a bug in the IDE as I had the same thing last night. I haven't checked the Microsoft Knowledge base yet, but I will be doing later to see if it is a known problem.
Michael
Fat bottomed girls
You make the rockin' world go round -- Queen
|
|
|
|
|
I've got this problem too but when debuging MC++.
I think it's some kind of bug.
43 68 65 65 72 73 2c
4d 69 63 68 61 65 6c
|
|
|
|
|
I've seen it before as well, no idea what causes it though. For now you'll just have to stop/start until it works
James
- out of order -
|
|
|
|
|
Toss me some idearz.
I am intrested in how to actually store the data.
|
|
|
|
|
I found out it's possible to put a Form inside a Form if you do:
Form p=new Form();
Form c=new Form();
c.TopLevel=false;
c.Parent=p;
That works fine, except that the child form can't be activated. You know what I mean- the gripbar at the top is always gray the way a window looks when it's in the background. Strangely enough you can move the child form around in the parent form, even though it's drawn as though it's backgrounded!
If I make the child forms Mdi Children instead of doing the toplevel=false thing, I get similar results- this time, one of the child forms is drawn active while the rest are drawn as though they're backgrounded. The active-looking one stays that way even when you click on other forms.
Am I doing something wrong or is this a bug in .net?
"Outside of a dog, a book is Man’s best friend. And inside of a dog, it’s too dark to read."
-Groucho Marx
|
|
|
|
|
I'm trying to put the child windows into a panel on the parent window. That probably matters. I hope this is possible.
"Outside of a dog, a book is Man’s best friend. And inside of a dog, it’s too dark to read."
-Groucho Marx
|
|
|
|
|
After looking at my planned workload for Christmas and the New Year, it looks like it is time to make the jump to C# for writing the front end for my apps.
I'll be working on MIS systems with database back-end. Whilst I'm happy enough with how ADO.NET works, I'm finding my reference shelf is a little light on books for Windows Forms and Controls.
I currently only have Inside C# (Second Edition) and the Petzold Programming Windows with C#. What books are good for learning about the ins and outs of Windows Forms and Creating user controls? An Amazon search reveals a lot of books, but usually when a new tech is released a lot of the authors are just jumping on the bandwagon. I'd like to seperate the wheat from the chaff.
What books have helped you?
Michael
Fat bottomed girls
You make the rockin' world go round -- Queen
|
|
|
|
|
I have those two books. The ADO.NET book fills the gaps because Petzold does not cover the DataGrid. What else do you need ?
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
|
CP and Genghis[^] do I good job of filling in some of the holes in the .NET framework GUI classes. I was just wondering if there are more places for me to look for decent C# GUI classes for standard Windows apps.
I'm interested in classes that give me a nice doc/view framework (i.e the kind of things I've taken for granted in MFC/WTL). A nice wizard to generate code for a standard windows app (menu, toolbar, view) would be great.
Any links welcomed.
Michael
Fat bottomed girls
You make the rockin' world go round -- Queen
|
|
|
|