|
hi
to hide the form just copy the following code.it should work...
<br />
this.Visible = false;<br />
then the active form wiil be hidden.
if u want to show another form then use
<br />
Form2.show();<br />
|
|
|
|
|
Javango wrote: I am writing a background application witch you can drop in the autostart of Windows
This is called a service application and does not have a UI. You are using the wrong tool for the job, look into windows services.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hi, thanks for your answer.
I use the Form for user settings and options witch is displayed when the user doubleclicks on an Icon in the system tray.
|
|
|
|
|
Hi,
this is all wrong.
If you don't want a Form, then don't define a form class, and don't instantiate one.
If you do need a message pump, you can do Application.Run() without a parameter. And if you don't, you can do all in the static Main() method.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
How can i draw an ellipse on an image in C#?? Currently I m drawing it on the picture box, but the problem was that I m not able to remove the ellipse for another images..
|
|
|
|
|
If you're drawing an ellipse, presumably you have access to the graphics object - which has a handy "Clear" method...
There are three kinds of people in the world - those who can count and those who can't...
|
|
|
|
|
Well, it sounds like you're doing it wrong. How are you drawing it, and why can't you make the code conditional ?
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
Hello
I want to get no of users and user names connected to ms-access databse from C# program. Also whether I can open MS-Access databse exclusively.
Thanks
Suleh Kiran, Calicut (Kerala) India.
|
|
|
|
|
hello .....all
can anybody hlp me to tell the fact tht how can i add condition (which is sumthing related to find MAc id) before installtion of the setup ...
thanx in advance
soni pandey
|
|
|
|
|
You may have a look at the Custom Actions[^]
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Hi ,
I am validating an xml that express an an invoice document.
this documnt always have header and lines.but somtimes (not always) have serial numbers.
When I am validating the xml against the shcema I want the validator to ignore if the serial number element does not exist.
I can't change and I don't want to change the schema Since i am getting it from a third party software.
What can I do to ignore it?
see, my code and a part of the schema below:
I am using this code to validate xml file to xsd file:
private void ValidateSchema(string filePath)
{
XmlReaderSettings settings;
XmlDocument doc;
XmlReader reader = null;
try
{ settings = new XmlReaderSettings();
settings.Schemas.Add(null, m_sSchemaPath);
settings.ValidationEventHandler += new ValidationEventHandler(settings_ValidationEventHandler);
settings.ValidationType = ValidationType.Schema;
doc = new XmlDocument();
reader = XmlReader.Create(filePath, settings);
doc.Load(reader);
doc.Validate(settings_ValidationEventHandler); }
finally
{
reader.Close();
}
}
this is part of the the XSD(a few complex type elements):
<element name="Documents">
<element name="Documents_LINES">
<element name="SERIAL">
thanks in advanced,
A Y
|
|
|
|
|
Hi to all,
I am writting a C# Windows Application in which it uses XML to store & retrieve Student Data (like Name, Addres, DOB, Educational Details, Economical Conditions, etc).
To store & retrieve data from XML, I am using XmlSerializer class.
But some student data are in form of paragraph (like Educational Details, Economical Conditions, ..). How to store & retrieve that data using same XmlSerializer class?
Thanks & Regards,
Aniket A. Salunkhe
|
|
|
|
|
It's just XML. You can put carriage returns inside the data.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
Thanks for reply.
Where & How to put carriage return?
If I am getting a value for an attribute as "Test Line1\nTest Line 2\nTest Line3" from XML; then
do u mean to convert it to "Test Line1\r\nTest Line 2\r\nTest Line3".
Thanks & Regards,
Aniket A. Salunkhe
|
|
|
|
|
Following is working properly, without taking care of carriage return.
Here I am using XmlTextReader & XmlTextWriter instead of FileStream.
//XML to .NET Object (Reading XML)
using (XmlTextReader xtr = new XmlTextReader(new StreamReader(sXmlPath)))
{
XmlSerializer xserObject = new XmlSerializer(typeof(Child));
objChild = (Child)xserObject.Deserialize(xtr);
//objChild = xserObject.Deserialize(xtr) as Child;
xtr.Close();
}
//.NET Object to XML (Writting XML)
using (XmlTextWriter xtw = new XmlTextWriter(new StreamWriter(sXmlPath)))
{
XmlSerializer xserObject = new XmlSerializer(typeof(Child));
xserObject.Serialize(xtw, objChild);
xtw.Flush();
xtw.Close();
}
Once again thanks for your support.
|
|
|
|
|
Hi everybody!
I have a problem in the search for datagridview. I can not do that. You can help me understand the process, the sample code or help me with. Thank you!
modified on Sunday, July 5, 2009 12:20 AM
|
|
|
|
|
ducanhthanhhoa wrote: I have a problem in the search for datagridview
Datagridview does not provide any fuctionality to search on its own.
ducanhthanhhoa wrote: You can help me understand the process, the sample code or help me with. Thank you!
What have you tried so far?
Infact, its better to search the DataSource which is bound to the datagridview.
Do you know how to filter results from a datatable? You can use dataview [^]for that purpose.
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Thank you I can filter data from the database but can not search on the datagridview. Help me!
modified on Friday, August 7, 2009 2:06 AM
|
|
|
|
|
OK - I have a listview (details) that contains multiple rows with each row having multiple columns of data.
For each selected row, I want to create a text file record that contains the data from the multiple columns from the selected listview row.
Thanks!
|
|
|
|
|
Robert Bone wrote: For each selected row, I want to create a text file record that contains the data from the multiple columns from the selected listview row.
What did you try till now?
Are you facing problem somewhere?
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Well, I haven't tried anything, as I have no clue. I looked at a bunch of examples of writing to text files, but none of them did what I am trying to do. I have certainly created text files from data before, but it has always just been single-column data written to a text file record.
So, if my listview rows look like:
Frankfurters REG_SZ C:\Windows\Blah\Blah
Hamburgers REG_SZ D:\SomewhereOverTheRainbow
then I want to take the data from the multiple columns on each row and create a text file record that looks like what is displayed above (for wach row) - I later want to be able to properly retrieve and separate the text file records into multiple columns for downstream manipulation.
|
|
|
|
|
Rather than just a plain text file, I would suggest either XML or CSV for this.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|
I'm afraid a bit of punctuation marks will not cure a writer's block.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|
Thanks for the quick reply. I am a transplanted mainframer. Can you give me an example to write such a file? Either one is fine by me, as long as it is a commonly accessible format on remote machines.
|
|
|
|