|
How would I capture a screenshot of the computer without the form in it (and whatever's behind it shows up). The form should should be visible (not minimized) on the screen.
So if i start with my desktop and open the form that takes the picture, the form should be visible to the user but the screenshot taken should only show the desktop, without a white hole in it where the form was.
If i opened another application like internet explorer and then opened the form, the form should take a screenshot of the desktop with the internet explorer above it.
|
|
|
|
|
|
Yeah, I've done the same before. When the user clicks the button to take the screen shot, I fire a timer that sets the forms.visible property to false, then take the screen shot, and then form.visible becomes true when finished executing.
wrap it around a try catch finally to make sure the form always comes back into view, i suppose; for saftey's sake.
|
|
|
|
|
i have a log file represented in xml format ( as a table). How do i set the backgorund color of each row ?
Thanks
|
|
|
|
|
XML file does not have background color, it's just an editor that shows background color.
|
|
|
|
|
You have to clarify what you are using to display the log file. XML is only used to represent the data, it doesn't have any formatting at all, so there is no such thing as an "xml table".
To display the XML data you have to use some other technology, like for example XSLT. What do you use to display the data?
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
xml is simply a text file in a special format. So, you cannot set the color of each row.
But if you are binding a XML file to some grid control in .net, you can give a color to that grid.
|
|
|
|
|
Hi,
I have one WSDL:
<xs:complexType name="webFarmStatusVO">
<xs:sequence>
<xs:element minOccurs="0" name="orderNumber" type="xs:string" />
<xs:element minOccurs="0" maxOccurs="unbounded" name="statusList" nillable="true" type="tns:statusVO" />
<xs:element name="totalLSPQty" type="xs:int" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="statusVO">
<xs:sequence>
<xs:element minOccurs="0" name="currentLocation" type="xs:string" />
<xs:element minOccurs="0" name="statusCode" type="xs:string" />
<xs:element minOccurs="0" name="statusDate" type="xs:dateTime" />
<xs:element minOccurs="0" name="statusDescription" type="xs:string" />
<xs:element minOccurs="0" name="statusInfo" type="xs:string" />
<xs:element minOccurs="0" name="statusReasonDesc" type="xs:string" />
</xs:sequence>
</xs:complexType>
I want to call the statusVO in my C# application.
My Code:
com.dragonfxclsit.statusVO[] StatusInfo = WSOrderNum.orderNumber;
I want to return statusVO list of record and I want to match statusVO and webFarmStatusVO.
How to resolve this problem?
|
|
|
|
|
feed that schema to xsd /c yourschema.xsd, will generate a usable class for you.
xacc.ide - now with TabsToSpaces support IronScheme - 1.0 beta 1 - out now! ((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x))
|
|
|
|
|
Hi,
I cannot catc what you mean here.
Can you provide me some example.
Thank you very much.
|
|
|
|
|
Hello everyone,
I have the following XML file, I want to generate related XSD file with the following requirements, does anyone have ideas?
1. I want the addition result of each percentage items under each rules entry to be 100 (it represent research budget percentage for each Lab, so must be 100% when added together);
2. I want the version of department to be 1.0, no other values;
3. I want the option to be either "default" or "needApproval".
Any ideas about how to make the xsd generated by xsd tool to be able to handle the 3 additonal requirements?
<?xml version="1.0" encoding="utf-8" ?>
<Department name="Computer Science" version="1.0">
<rules name="Lab1">
<rule percentage="100" name="Staff" option="default"/>
</rules>
<rules name="Lab2">
<rule percentage="75" name="Hardware" option="default"/>
<rule percentage="25" name="Software" option="needApproval"/>
</rules>
</Department>
thanks in advance,
George
|
|
|
|
|
Hi George
IIRC, you need to place constraints on them, I cant recall the details now, but they give a few examples in the XML Schema spec.
xacc.ide - now with TabsToSpaces support IronScheme - 1.0 beta 1 - out now! ((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x))
|
|
|
|
|
Thanks leppie,
Where can I find the samples?
regards,
George
|
|
|
|
|
I don't want to skin the form or show the orb / qat on a separate form. The qat and orb are just examples, the control on the non-client area of a window can be any control.
|
|
|
|
|
The Queue<t> class, which is part of the .NET framework, does not have a remove element method.
I needed a generic queue, which is efficient enough (not by managing and internal List<t> object), is able to enqueue and dequeue objects like the original Queue<t> but also able to remove elements at random indices.
The scenario for this usage is that, you have a legitimate, the same rules apply, first-in-first-out, no items after the current should be sent out first. Say a user enqueues a number of items into different indices, and the person wants to remove it from the queue because of the mistake, I couldn't actually do it with the Queue<t> class in .NET.
I would like some suggestions on how I can implement such a queue without compromising performance by just using a List<t> object as a queue. I read somewhere that it's inefficient to just add and remove items from List<t> object over a period of time as the buffer will keep growing as I add, the will not shrink when I remove. Problem with growing and shrinking may impact performance and fragmentation of the heap memory space.
Regards.
|
|
|
|
|
Classes like Queue(T) , List(T) etc are using an array internally. When additional space is required, it creates a new array with more space and copy all the existing elements to the new array.
Having said that, you can create your own Queue(T) class which wraps an array and exposes a method to remove item from specified index. When item is removed, you should create a new array with only required storage space and copy the existing elements to there.
|
|
|
|
|
Alrighty then, I'll try that.
Thanks.
|
|
|
|
|
|
James Cheng Zhang wrote: add a control to the non client area of a form
What would be the point? I don't understand what you're trying to accomplish.
only two letters away from being an asset
|
|
|
|
|
The typical way to do this, is to remove the non client area, such as the title bar, and write your own replacement, adding your controls to it.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
I think i'll have to do that . Thanks
|
|
|
|
|
Hello everybody, I'm fairly new to the subject of c # ...
I think it is simple, I have two forms (Form1 and Form2) in Form1 is a RichTextBox, pressing a button on the Form1 open the form2, i add a button on form2 and when click they add string to richtextbox on form1. The question is do you all right it gives no error, but when I run the program does not add.
Form1---Click Button (in form1) | open form2 ------> Click Button(in form2) | Add string (Text) to richtextbox on form1.
I leave the code to see if any could pull a little help from and a thousand thanks!,
And I apologize for my bad English
Form1
namespace testrich
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
richTextBox1.AppendText("Original text");
}
public void button1_Click(object sender, EventArgs e)
{
Form Form2 = new Form2();
Form2.Show();
}
private void button2_Click(object sender, EventArgs e)
{
this.Refresh();
}
}
}
Form 2
namespace testrich
{
public partial class Form2 : Form
{
public Form2()
{
InitializeComponent();
}
public void button1_Click(object sender, EventArgs e)
{
Form1 Form1 = new Form1();
Form1.richTextBox1.AppendText("-Attachment-");
}
}
}
|
|
|
|
|
Hi Lucas,
welcome to CodeProject.
seems to me you have more than one instance of Form1.
inside Form2.button1_Click, you create a new Form1, which is not the same
Form1 that caused Form2 to be created and shown; so changing the second Form1 will not
show any change on the first Form1, and since the second Form1 is not shown at all
(there is no Form1.Show) whatever you do to it will not show on the screen.
You need to pass the original Form1 (this) to Form2 when you create Form2, so it can
interact with its creator; or you could use delegates.
|
|
|
|
|
Hi Luc! Thank you very much for your answer so fast! , I see what the problem is, what happens now is that my knowledge in c # is not much, So I can not find how to make the call form 2 to Form 1 and not create another Form 1. I will read something about delegates :P , thank you very much again.
PD: Please if you know how to pass the original Form1 (this) when you create Form2 to Form2, tell! jejej =)
|
|
|
|
|
Seems you're in way over your depth here. Yes, delegates are the best way to get Form2 to talk to Form1. Plenty of info on the web. To pass the string from Form1, to Form2, just pass the text as a parameter, either on the constructor, or expose a property on Form2.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|