|
You need to add an event handler for the DoubleClick event.
textBox1.DoubleClick += new EventHandler(double_Click);
private void double_Click(object sender, EventArgs e)
{
}
- Nick Parker My Blog | My Articles
|
|
|
|
|
catching the double click doesnt help because I want prevent the prompt from
apearing inside the textbox when i single click it, do you know of a way to do that?
|
|
|
|
|
One way to achieve what it looks like you're going for is to default the text box's ReadOnly property to true, and set its TabStop property to false (just a style issue - not really necessary).
Then, as the previous poster suggested, create a handler for the DoubleClick event, wherein the ReadOnly property is set to false, enabling input to be entered in the text box.
Finally, create a handler for the Leave event (or Validated or...) that sets the control's ReadOnly property back to true.
Hope this helps.
The most exciting phrase to hear in science, the one that heralds the most discoveries, is not 'Eureka!' ('I found it!') but 'That's funny...’
|
|
|
|
|
Has anyone installed it alongside VS .NET 2003? Did it cause any problems?
Thanks!
|
|
|
|
|
I have them both on my laptop and I am not having any problems as of yet.
- Nick Parker My Blog | My Articles
|
|
|
|
|
I also have them both on my laptop. They seem to work fine. Although I also tried them both on my desktop which they proceeded to screw up my system. Moral of this story - use Virtual PC and install beta versions inside that...
HTH
John Young
Yippee Kai Ya...
Signed Polomint.......
|
|
|
|
|
I have created and consumed web services using C# and the VS2004 wizards. I would like to create an object that will consume a web service without using VS2004 Web Service Reference wizard. I have tried manipulating the files created by the wizard and have run into problems recompiling the code. The code seems to be heavily tied to the development environment.
Is there any articles available on this topic? I have searched MSDN & Google. I have only found VS2004 way of doing things.
|
|
|
|
|
Michael Potter wrote:
I would like to create an object that will consume a web service without using VS2004 Web Service Reference wizard.
If you are refering to the proxy class that is generated in Visual Studio when you "Add Web Reference", you can simply run the wdsl command line tool and pass it the web address to your web service, this will automatically generate the proxy class for you. There are a slew of options that you can specify such as the language used to generate the proxy, protocol to use (SOAP, HttpGet, HttpPost), a proxy domain and so on. I would recommend you take a look at Web Services Description Language Tool[^] for more information.
- Nick Parker My Blog | My Articles
|
|
|
|
|
Thanks, that gets me a step further along.
What I am having trouble with is setting up multiple servers with the same Web Service (debug, testing, production). All that really needs to change is the URL. I would like to do this without developing 3 seperate references in my code.
#if DEBUG
private const string WS_URL = "DebugServer\TTCall.asmx"
#else
private const string WS_URL = "ProductionServer\TTCall.asmx"
#endif
I have experimented with changing the URL on the fly. It worked for awhile. After a reload of VS it began to bitch that things were not in order. Any one have a better way of dealing with this issue?
|
|
|
|
|
I am working with a treeview control but have encountered a few design issues that I cant find a way around. I would really appreciate any help or guidance on these:
1) I only want to display a checkbox on last item in the tree, for example :
- Top Node
-- Mid Node 1
--- [X] Last Item 1
--- [X] Last Item 2
-- Mid Node 2
--- [X] Last Item 3
The control does have .CheckBoxes property but this places a checkbox on all the nodes.
2) Is it possible to highlight/select one of the end nodes programmatically? the .IsSelect property is read only. (The tree is built programmatically)
3) is it possible to set up the check boxes so that only one node can be selected, a similar functionality to grouped radio boxes.
Thanks in advance.
post.mode = postmodes.signature;
SELECT everything FROM everywhere WHERE something = something_else;
> 1 Row Returned
> 42
|
|
|
|
|
There have been many questions about this topic recently, however without a lot of custom work, you will need to go with a 3rd party utility. There are many out there, Infragistics[^] has a nice one here[^].
- Nick Parker My Blog | My Articles
|
|
|
|
|
$495
me thinks I will be re-considering my decision to use a tree view
post.mode = postmodes.signature;
SELECT everything FROM everywhere WHERE something = something_else;
> 1 Row Returned
> 42
|
|
|
|
|
I have a file transfer app which is supposed to be able to receive multiple files at the same time and send one file at a time. The problem is that sometimes the file is being sent but not received
It seems to vaporize in hyperspace
What do you think could be the problem?
Thanks a lot
----------------------
Be proud. Be yourself.
|
|
|
|
|
Gimpy1983 wrote:
What do you think could be the problem?
Your statements above are rather nebulous. If you have a programming question where you can be more specific there are many on here willing to help you out.
- Nick Parker My Blog | My Articles
|
|
|
|
|
Hi!
The problem is as follow:
I have sockets and I use the async methods (the ones starting with .Begin...() ). This means i need ManualResetEvent (or AutoResetEvent for that matter but I choose Manual one so I have more control).
I can connect to the server with BeginConnect() and the ManualResetEvent works alright but when I try to send with BeginSend the ManualResetEvent is also alright.
The problem begins on the server side. I have a ReceiveCallback method which gets called when data gets send to the listening socket. Sometimes all the data get sent correctly (well the ManualResetEvent.Set() seems to work) BUT no data is received on the server side... where do you think the problem could be between the time the data is sent and received because I really don,t see and it's been like 2 weeks I'm trying to figure it out.
Thanks a lot
----------------------
Be proud. Be yourself.
|
|
|
|
|
What is the best way to capture data received with WM_COPY_DATA in a C# application?
|
|
|
|
|
See this article and accompanying code, Examples written in both C# and VB.net
http://www.vbaccelerator.com/home/NET/Code/Libraries/Windows_Messages/Simple_Interprocess_Communication/article.asp
ERobishaw
|
|
|
|
|
Hi all
Please can someone help me. I'm trying to increase the text size of a third party window.
I currently have the hwnd of the window using the FindWindow function.
Any help in pointing me the right direction will be greatly appreciated.
Dave
|
|
|
|
|
You'd have to enumerate all the windows (controls) in the window and, first, get their current font, change it, then set it again. You'll need to P/Invoke EnumWindows and SendMessage , as well as define WM_GETFONT (0x31) and WM_SETFONT (0x30). You may also need to define various GDI methods for creating an modifying fonts in this way.
Because of all that's required to P/Invoke, you might consider developing a Managed C++ assembly that uses native APIs and exposes this functionality as managed code. This allows you to use native APIs while providing an assembly that other managed languages can use and could potentially save you a lot of time having to P/Invoke lots of methods and defining lots of structs and consts.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Hey all, I'm trying to programmatically fill RichTextBox's Rtf property, I have an Xml file thats built like
CP breaks the XML, so here's a tree representation:
Paragraphs
Paragraph
Header
Content
I then iterate through all paragraphs and if the header isn't empty, i add it like so:
string rtbContent += "\b" + headerNode.InnerText + "\b0";
but when I set the RichTextBox's Rtf Property to rtbContent, it throws an ArgumentException stating the string is in the wrong format...
Why, the Rtf property is a string, and so is my variable...
|
|
|
|
|
You probably do not have the entire text wrapped with RTF formatting strings. For example, below is just a string of text typed into wordpad then viewed in Notepad.
{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fswiss\fcharset0 Arial;}}
{\*\generator Msftedit 5.41.15.1503;}\viewkind4\uc1\pard\f0\fs20 This is RTF text\par
}
|
|
|
|
|
When assigning the Rtf property, you must include all necessary RTF information, including the RTF headers. See the RTF 1.6 Specification[^] on MSDN for more information.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Hi everyone,
I'm having some serious issues with the Windows ComboBox control. I'm using it inside a 3rd party wizard control (which I found here on CP) and when the page of the wizard where this ComboBox is is loaded, it gets populated with items - using the following code:
<br />
if(md.Topics.Count>0)<br />
{<br />
this.comboBoxTopicsDel.ValueMember="TopicID";<br />
this.comboBoxTopicsDel.DisplayMember="TopicTitle";<br />
this.comboBoxTopicsDel.DataSource=md.Topics;<br />
}<br />
else<br />
{<br />
this.comboBoxTopicsDel.DataSource=null;<br />
}<br />
This works fine everytime the page containing the ComboBox loads, until the moment when an item is deleted from the Topics ArrayList. After that, the ComboBox will only show TopicData for each item, even if its DisplayMember and ValueMember are set correctly.
Am I doing something stupid? What am I supposed to do before re-binding the ComboBox to ist data source when this happens?
Thanks in advance (insert a lot of clueless smileys here)
Rado
Radoslav Bielik
http://www.neomyz.com/poll [^] - Get your own web poll
|
|
|
|
|
One of my friends suggested to do BindingContext[...].SuspendBinding(); before and BindingContext[...].ResumeBinding after the item is removed from the md.Topics ArrayList and it seems to work fine now!
Rado
Radoslav Bielik
http://www.neomyz.com/poll [^] - Get your own web poll
|
|
|
|
|
Hy everyone!
What I want to do is trying to check the language of Outlook (I don't mean the language Outlook had been written in; I do mean the language of the menues, promts etc.).
Meaning I do want to send a kind of request to Outlook telling it's language, so I am able to do some internationalisation. Because I do not want my code depend on "a special language", meaning my application should check the language and if it is English, it should use the "English style", if it is German it should use the "German style", if French the "French style" etc. (style means the keywords for example or menu items etc.)
So if anyone of you knew how to check this in C# it would help me a lot!
Thanks!
Stephan.
|
|
|
|