|
In any public methods of your user interface add code that looks a bit like this:
<br />
public void setText(string someText)<br />
{<br />
if (InvokeRequired)<br />
{<br />
Invoke((MethodInvoker)delegate() { setText(someText); });<br />
return;<br />
}<br />
MyLabel.Text = someText;<br />
}<br />
Basically the method invokes itself if needed otherwise it just gets on with it. If the method has been invoked then the invoke will not be required and the method just continues
Russ
|
|
|
|
|
I found the following strange problem for tabcontrol:
when I set the tab button location to left or right, then the text on the button does not display, however, if set tab button location to top or bottom, it does display. Also, I found this problem only happens on different computers.
does anyone meet this problem?
thanks.
|
|
|
|
|
I have a feeling that this is happening probably because of the way all the objects are ordered. Can you show a screen shot of your application?
|
|
|
|
|
This is probably a really easy question, but i need to select a value from an SQL table and put it in a string.
The table - PRODUCTS, has a column called QTY and a column called ID
I need to select the QTY value where ID = x.
How do i select the single value and put it into a string?
|
|
|
|
|
I am not sure if what you have asked is this simple but:
How about building an SqlCommand (System.Data.SqlClient.SqlCommand or SqlCommandBuilder)
SELECT QTY FROM PRODUCTS WHERE ID = 'x'
You may need to search through MSDN to learn how to use these classes.
Always keep the Murphy Rules in mind!
|
|
|
|
|
Ok. How do i get the result into a string?
|
|
|
|
|
|
How to publish the project in a way that the user can select the directory to be installed in and other options.
this is all the software does. but I do not know how to do it such as in VC#.
if I just publish one project,during install, it does not let you select where you will install and so on.
thanks.
|
|
|
|
|
Did you try adding a Deployment project to your solution?
Right Click Solution -> Add New Project -> Other Project Types -> Setup and Deployment > Setup Project
Always keep the Murphy Rules in mind!
|
|
|
|
|
Don't use clickonce to deploy over the web, that doesn't let you choose where to put the files. Use a third party product like Advanced Installer to build an msi instead.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
What is the most appropriate method to convert utf16 to utf8?
Thanks,
Charith Jayasundara
|
|
|
|
|
Decode it into a string and encode it into UTF-8.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Can you please give an example or any link?
Thanks!!!
Charith Jayasundara
|
|
|
|
|
|
Check out the Encoding.UTF8.GetString and Encoding.Unicode.GetBytes methods.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Actually there is no UTF16 in the Encoding class. (No Encoding.UTF16)
Then what is the best way to convert it to a string?
Thanks!
Charith Jayasundara
|
|
|
|
|
oh, Encoding.Unicode = Encoding.UTF16
I got it, Thanks!
Charith Jayasundara
|
|
|
|
|
hi all, I need to build a project for school in C#
I need to build a generic application that is tracking the user when he enters a website.
meaning I want to know on which buttons he clicked(and how many times), the position of the mouse at any giving time etc.
I thought of 2 ways to implement it
1. to install the application on the website and by using JS to get all the information
2. to bulid an add-in to the browser, and from that to get all the information
what do you think I should do?
can you give me advantages and disadvantages ?
thanks
|
|
|
|
|
Hmmm... by add-in do you mean something specific to browser (like an ActiveX control or something). If that is so, I guess it can be used if you are cent percent sure your users would use the same browser.
JS way looks good to me as you can capture all these events and probably make AJAX calls to retrive the information and send them to server.
-------------------------------------------
It's code that drives you - Shyam
|
|
|
|
|
Browser addin can do anything, so you will be able to do whatever you want to do. But, you will have to create separate addins for separate browsers. There is no way to create a generic addin that can be installed with all browsers. So you have that challage there...
I also think JS will be the most feasible solution...
Charith Jayasundara
|
|
|
|
|
thanks for your answers
if i'm building an add-in using WPF can't it work with firefox?
|
|
|
|
|
I'm not an expert in browser-specific programming, so I can't answer you specific questions. The general problem to face is not what you are using inside your add-in but the problem is that different browsers have different plug-in interfaces and underlying programming models.
Regards
Thomas
www.thomas-weller.de
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. Programmer - an organism that turns coffee into software.
|
|
|
|
|
Hi.
I am developing a windows application in C#.
I want the source code of Image Editor in C# windows application whose work like MS Paint. on which we can
write text on image dynamically through mouse drag and drop. also we can drag other controls like arrow or box.
thanks in advance
dhemittal@gmail.com
|
|
|
|
|
We answer specific programming questions, I think what you are after is here[^]
|
|
|
|
|
dheeraj.mittal wrote: I want the source code of Image Editor
and I'd like a new car for Xmas. Who is going to be luckiest? I'm sure you can get the source code if you have seep enough pockets.
Bob
Ashfield Consultants Ltd
|
|
|
|