|
Hi,
have your calculations handled by a background thread running at a lower priority
(Priority.BelowNormal).
Luc Pattyn
|
|
|
|
|
Hi,
I created a small Windows app that displays variables values with Console.Writeline. It compiles correctly, but it displays a screen in less than half a second then I can't see the output. Why is this?
Regards,
ma se
|
|
|
|
|
You should prevent your app from terminating (and closing its console); typically this
is achieved by adding these two lines at the end of your main method:
Console.WriteLine("Hit enter key to terminate...");
Console.ReadLine();
Luc Pattyn
|
|
|
|
|
|
hello
I want to find this assembly file
how can I find it?
have anybody this file?
it is in microsoft embeded windowa
microsoft.pointofservice.dll
please help me to find
if u know, please tell me
my email is hamed_r81@yahoo.com
Masterhame
|
|
|
|
|
|
Hello,
I have a question regarding the crystal report. I have a program that will print custom bills and I use for that crystal report, the user can not view the report its only called to be printed.
The database connection used has a local path on my computer. How can I make it dynamic so I can use it on other computers as well?
Thanks.
Regards,
Butterfly
|
|
|
|
|
I simply created a Windows Control Library project in VS. I add 2 user control form. On one form there is only a button and the sencond user control form i add a text box. So let say i want to import only one of them in my another project how do i do this. I don't want to import or add reference for both user control.
Secondly when i looked at my usercontrol project debug directory it created a project dll. I want dll for specific one.
thanks
|
|
|
|
|
If the controls are in the same project you have no choice, you will get both as you are referencing the assembly, not the controls.
only two letters away from being an asset
|
|
|
|
|
Hello. I'm using VS 2005 and I have taken over a project that has images included in the resources of the project that are visible by going to the project's properties sheet and clicking on the 'Resources' tab. Is there a way I can update this while building? For instance, there's about 50 images in there now associated with 'Company 1'. I'd like to have it where I can use different images when I do a build, depending on whether COMPANY1 or COMPANY2 is defined for that build configuration. Even doing it dynamically at runtime depending on a registry setting or something if I could put the images in a .resx file and have the program use that instead of the ones in the 'Resources' tab.
Thanks in advance
|
|
|
|
|
Maybe what you need is 3 projects (1 dll and 2 exe):
1 dll with all or most of the code
1 exe for each company, including all the appropriate images and referencing the code dll.
Alternative:
You could create extra projects with an image-only dll for each company,
and keep all code in the single exe, which then dynamically loads the right image dll.
(search for "late binding" on CP).
Luc Pattyn
|
|
|
|
|
I think the alternative solution would be what I would like to go with. however, I still don't have a clue as to how to tell the .exe to use the image dll as opposed to using the images that are in 'Resources' on the properties page for the project.
|
|
|
|
|
Well, I have not done this myself, but this is how I understand it:
- you make a new project targetting a dll instead of an exe,
and you add your images to that project just as you did so far for your exe project
- in your existing exe project, you remove the images you currently have as resources;
and you add code to decide which image dll is required (assuming you did build more than
one image dll), you then load it dynamically, and then get the images from there.
For dynamic dll load, and how to get at its content, please search "late binding" on CP.
Come to think of it, there must be yet another alternative, based on internationalization;
this is an official mechanism to support alternate sets of resources, normally intended
to easily port your app to other languages/countries without changing the main code.
I guess you could use it to just substitute alternate sets of images (and maybe some strings,
such as company name).
This too I have never done, and it also involves extra dlls, so it is very similar (if not
identical) to what I described earlier. One possible difference is internationalization
also supports a "default" country/language, which can be built-in (i.e. when no country-specific
dlls are available or selected). More on this surely in the MS documentation.
-- modified at 14:22 Monday 29th January, 2007
Luc Pattyn
|
|
|
|
|
I used to do this to retrieve the data of the table cell through WebBrowser object in VB.
txtresult = WebBrowser0.Document.all.tags("Table")(TableNo).Rows(RowNo).Cells(ColNo).innertext
TableNo: the ordinal number of the table in HTML page.
How can i do the same thing in C#? I tried many ways but all i got is error
Can i get some help pls?
|
|
|
|
|
teeboss wrote: How can i do the same thing in C#? I tried many ways but all i got is error
Use [] brackets for indexer properties in C#
|
|
|
|
|
just change [] -> ()? And the code is:
txtResult.Text = WebBrowser0.Document.all.tags("Table")[TableNo].Rows[RowNo].Cells[ColNo].innertext
would it work? I recieved the error "no property..."
Can u explain in detail pls?
|
|
|
|
|
He told you all you need to know, in C# it's square brackets, any error you get now, is because the code is wrong.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
I have a datatable that contains 10 columns (Say they are called column1, column2, column3, etc).
I have a schema that contains column3 (meaning I only want to create an XML file containing this column).
How would I export only column3 from my datatable into an XML file based off a supplied schema file ?
Thanks
|
|
|
|
|
Dear all,
I've searched high and low to find an example of a way to preview and print a single panel. I found a few ( very expensive ) commercial libraries , but I don't want to go down that path. Is there anyone who could help me out , or at least point me in the right direction on how it's done.
Kind regards,
Rick
|
|
|
|
|
Hi,
isn't any of this hits[^] what you need?
Robert
|
|
|
|
|
This is how you build the printpreview functionality. whatever is in the printDocument1 object gets printed or previewed on the screen.
PrintPreviewDiag ppd = new PrintPreviewDialog();
ppd.Document =printDocument1;
ppd.ShowDialog();
|
|
|
|
|
How do you customize a label control so that I can change the border color? I have searched high and low for examples/samples for a "label" control but found absolutely nothing.
Should I create my own label control from scratch?
-- Thanks!
|
|
|
|
|
Override the OnPaint event, like so:
using System;
using System.Drawing;
using System.Windows.Forms;
namespace WindowsApplication1
{
public partial class MyLabel : Label
{
private Color borderColor;
public MyLabel()
{
InitializeComponent();
borderColor = Color.Black;
}
public Color BorderColor
{
get { return borderColor; }
set { borderColor = value; }
}
protected override void OnPaint(PaintEventArgs e)
{
base.OnPaint(e);
e.Graphics.DrawRectangle(new Pen(borderColor),
new Rectangle(0, 0, Width - 1, Height - 1));
}
}
}
|
|
|
|
|
Thank you very much for getting back to me on this so quickly.
|
|
|
|
|
I tried this out and it works great. Thanks again.
|
|
|
|