|
Hi,
I have a AxWebBrowser hosted inside a form. How can I notify the form whenever the user changes the selections in the comboBoxes hosted inside the browser?
thanx
|
|
|
|
|
Does anybody know how I can give my application a custom color that is not available in visual studio (Sort of like how you do it in html).
Prateek
|
|
|
|
|
If you know RGB code of the color you can use Color.FromARGB() method to get the color you want. If you want to allow user choose color they need, you can use ColorDialog.
|
|
|
|
|
It took me a while to get the rgb value, but that worked.
Thanks again
Prateek
|
|
|
|
|
Glad to help you
|
|
|
|
|
I'm trying to generate an Excel 2003 compatible XML file using the XMLSerializer. I've seen a couple articles on this but I've not seen one yet that shows how to create the <"mso-application progid="Excel.Sheet"?> line just after the line. The XMLSerializer will create the version line and pretty much everything else I need but I can't seem to find anything in it that will let me generate the line that tells the OS to open the file with Excel.
I would really like to use the XMLSerializer as my only other choice seems to be just building the XML totally from scratch.
Any help is greatly appreciated.
Thanks,
TxPomeroy
|
|
|
|
|
Just modify the output manually after using the XMLSerializer.
xacc.ide - now with TabsToSpaces support IronScheme - 1.0 beta 1 - out now! ((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x))
|
|
|
|
|
I have a series of combo boxes (17 in all) each with a list of names for selection. Each name has its own colour. The names reflect who is/could be on duty during a particular time period.
So when I select Barbara from the list in combo 1 I want that combo's text background colour to be set to light blue. If Gretchen is selected in combo 2 I want to use light green in combo 2. I have a click event which manages this part. using a case statement to detemine name/colour.
When I load the combo box at program start up, everything is fine,each person has their own colour.
If I now change the name in combo 2 from gretchen (green) to Sabrina (light salmon) The text changes but the colour does not. If I click on another combo box or again in the same combo box then the colour for Sabrina changes.
Am I missing something.
|
|
|
|
|
Here is the code in the Event Handler
private void cboCMs_EventHandler(object sender, EventArgs e)
{
ComboBox box = sender as ComboBox;
box.SuspendLayout();
switch (box.Text)
{
case "Barbara":
box.BackColor = System.Drawing.Color.LightBlue;
break;
case "Gretchen":
box.BackColor = System.Drawing.Color.LightGreen;
break;
case "Sabrina":
box.BackColor = System.Drawing.Color.LightYellow;
break;
case "Joanne":
box.BackColor = System.Drawing.Color.LightPink;
break;
case "Not Played":
box.BackColor = System.Drawing.Color.LightSalmon;
break;
case "No CM":
box.BackColor = System.Drawing.Color.Magenta;
break;
case "No BR":
box.BackColor = System.Drawing.Color.MediumOrchid;
break;
default:
break;
}
box.Update();
box.ResumeLayout();
}
|
|
|
|
|
I know what I'm doing is a big no-no on the forums, but I feel my original thread got pushed back a couple of pages to due recent spam (html template crap). I did get one answer, but I feel a little short sighted to be able to make proper use of it, so this thread can actually be seen as a clarification of it...
Problem:
my GUI thread calls a worker thread which has an infinite loop monitoring for changes / commands which may trigger another GUI Form. Obviously I want to keep all my GUI stuff on the same thread, so how would be the proper / best way to get that form activated on the original GUI thread?
Suggested answer: look into .Invoke which left me shortsighted, as stated above looking for any clarification.
|
|
|
|
|
|
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
|
|
|
|
|