|
Hi,
Can any one plz help me how to remove the icon shown at the top-left corner of my windows form....
thanks in advance
Regards,
Sreenivas
|
|
|
|
|
Have you tried it this.Icon=null ?
|
|
|
|
|
Does the code "this.Icon = null;" works with Microsoft Visual Studio .NET 2002
|
|
|
|
|
Or have you tried setting the ShowIcon property to false :->
Please vote my message! Click on one of the numbers beside ' Rate this message'.
.: I love it when a plan comes together :.
http://www.zonderpunt.nl
|
|
|
|
|
Hi,
I am working on Windows application using language C#. Actually I want to write the code to convert from MS word into PDF document.
In this process I need to add docuPrinter Library(COM Component) as reference. But it is not there in COM Component. How should I add DocuPrinter Library in my project or is there any another way to handle this?
Thanks in advance.
adil kazmi
|
|
|
|
|
I was wondering if anyone could recommend a library that has photo realistic controls for .NET Forms.
Here are the libraries I've found so far:
perpetuum's Instrumentation Widgets™[^]
Software Toolbox .NET Components[^]
Dundas Gauge[^]
These are impressive libraries, however they contain many controls I don't need. Basically, I just need a good knob and maybe a slider (thinking about writing them myself).
Also, I was wondering if anyone could suggest a good program for creating background textures, something that will add an extra bit of realism, such as a metal or plastic texture behind the controls.
|
|
|
|
|
In case you need two controls, I'd recommend creating them yourself... It takes about 2 hours max. each for an experienced developer to fully create and quickly test the control and you're done. Saves you a lot of money. However we use Infragistics[^] controls which are very impressive!
Please vote my message! Click on one of the numbers beside ' Rate this message'.
.: I love it when a plan comes together :.
http://www.zonderpunt.nl
|
|
|
|
|
I am developing a Service to run on a server machine but have a few questions. I have two services within my solution in VS 2005. I have created a project installer and this has two Service Installers and these are tied up to two Service Process Installers.
First question is this. Do I need one to one with these or can I have them both pointing to one Process Installer.
Currently I can install the services and start them on my machine. One works fine. The other doesn;t seem to run. I have tried debuging it by attaching to the process, but it never seems to start, although I can see it is started in the Service configuration screen.
Any ideas why this one isn't starting??
That's it for now.
Thanks
|
|
|
|
|
Hy there. I have a big problem with a listbox, wich I want to fill with some strings(they represent file paths). And I want to validate not the listbox, but those strings in the listbox, so how can I tell the user he can't change focus from one string to another without doing some particular thing?
If I add to the listbox something other than a string, the listbox doesn't know how to draw them, and I don't want to add controls to the listbox.
The big problem is that the event selectedindexchanged is fired after the index actually changed..so i don't know the last selectedindex
If anyone can help..PLEASE
Toma Catalin,programmer
|
|
|
|
|
Hi,
1.
you can store all kinds of objects in a ListBox; by default it paints its ToString()
result. You can draw the items yourself by setting another DrawMode, then handle
the DrawItem (and optionally MeasureItem) event.
2.
You can add one class member to remember the previous selection; it suffices
to end your SelectedIndexChanged handler on
"myListBoxPreviousSelectedIndex=myListBox.SelectedIndex;"
so it is available the next time that event fires.
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
I already choosen the second solution..it works, but me ego is hurt:P
If it really paints its tostring() method, then why if I add an textbox, it doesn't paint anything?
|
|
|
|
|
I am not sure what myTextBox.ToString() should return.
Most .NET classes return their type string.
A simple experiment showed it returned the first line of text.
If you forgot to add any text, or you added text starting with \n
then I guess nothing would show.
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
Damn, i can't understand, in my app it doesn't show nothing.
My code looks like this:
<br />
public class MyTextBox : TextBox<br />
{<br />
public override string ToString()<br />
{<br />
return Text;<br />
}<br />
}<br />
public partial class Form1 : Form<br />
{<br />
public Form1()<br />
{<br />
InitializeComponent();<br />
MyTextBox x = new MyTextBox();<br />
x.Text = "aaa";<br />
listBox1.Items.Add(x);<br />
}<br />
}<br />
My listbox is blank after this.. If it would show "aaa", now all i would have to do is add an validating event and my job is finished. I'm doing something wrong?
|
|
|
|
|
How many textboxes are there ? if more than one,
which one is shown on the form (i.e. added to Form.Controls)?
and which one is given some text?
[EDIT]
Sorry, that would be wrong I think.
Did you try a listbox1.Invalidate() ?
I am afraid changing a control inside a ListBox might not cause a repaint,
I don't expect it to react as a Container...
[/EDIT]
-- modified at 7:53 Friday 24th August, 2007
-- modified at 7:54 Friday 24th August, 2007
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
Well i find out how many there are at runtime.
Let me tell you exactly what I want. I have an directory servers wich contains a lot of dirs (I find out how many at runtime). All I want from them to add to the listbox is their names. I don't necessarly want a listbox, but I tought of a listbox because it looks good. The client needs to change between this dirs but I don't want to let him do that if some settings are changed(I wan't to ask him if he wants to change them). So I just want to validate what is in that listbox. If I add them to the listbox as objects, thei don't have a validating and focus. If I add them as controls, they have what I need but they loose their aspect, because it doesn't draw them like it would do for strings (for strings it looks exactly like I want)
|
|
|
|
|
Hi,
AFAIK the items in a listbox don't fire any events, so putting a textbox in there
does not result in TextChanged or whatever event since the textbox is not part of
your Form.Controls or ListBox.Controls
As I said before, you can choose what kind of objects you add to a ListBox.
If you are not happy by the text that gets shows, simply override the object's ToString()
method.
Two questions:
What is it the user must do when he has selected an item ?
Did you try the Invalidate() I suggested?
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
The user sees settings for each individual server, when he chooses one. But if he changes this settings, i don't want to loose the last servers settings, so i want to ask him if he wants to save them.
I did override the tostring() method and i still don;t see nothing on screen, but the items are there, since the listbox lets me choose from them.
I repeat, i don't know if i choosen the right control(listbox), I just wan't the client to see a lot of names( server names) and if he chooses one of them, he can change server settings. If I add the controls to the form directly, i loose a lot of support(scroll suport if there are many servers, and when i choose one of them it doesn't look as good as it would in a listbox)
|
|
|
|
|
I would add a few buttons (Save, DontSave,Revert), all disabled initially.
When a server gets selected, show its settings.
As soon as a setting is changed:
- enable those buttons
- diasble the chooser control (ListBox, ComboBox, whatever)
Now:
- Save would save the settings
- DontSave would not save the settings
- Revert would restore the original settings
and each of them would then go back to the original state: chooser enabled, buttons
disabled.
And yes I would prefer a ComboBox over a ListBox in this approach.
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
When I click on a cell in the datagridview, i want to get the data in that ROW and pass it as a parameter list to a secondary form.
and fill it with that row's data. Can anyone help I have no idea how to do this.
the steps will be:
1. click on a cell in a row
2. get the data in the row
3. click an update buotton on the current form
4. second form will open with card.ShowDialog() in the update-click event
5. the row's data must now appear on the card form(second form).
Thanks alot!!!
|
|
|
|
|
You need to catch CellClick event and extract index of row which contains the clicked cell from the parameter the event gets. Then you will be able to get all the data from that row
|
|
|
|
|
I am doing a project which need to differentiate word file from two other office documents,but I don't know the special character's distribution in word file ,Does word file have its special characters of tag ?
Who have a good idea,please tell me ,thack you.
|
|
|
|
|
Hello!I`m trying to connect data from a specific data field in my database to a TextBox, by using the SELECT statement, which should allow the user to enter the IDNumber of the concrete set of data in one TextBox and then, by clicking on a button, to get the concrete data in another TextBox.
E.G.
TextBoxID - there you are entering the IDNumber of the concrete set of data
TextBoxCompany - returns the name of the company under that IDNumber, after clicking the button
I would be most grateful to anybody who would be kind enough to help me.Thanks in advance!
Virtual
|
|
|
|
|
You basically want to write SQL, or a stored proc, that takes the number and returns the company name. Then you can set the text of the textbox to what you want. There is no automated way to do this. Ideally, you'd write the SQL code in a data layer, which you then call to get back the string you want, but if it's a quick and nasty app, you can probably get away with putting it all in one place. Just remember that many quick and nasty apps, turn into major undertakings, I always prefer to architect everything well from the start.
I assume you know how to write SQL and call the database, and were just hoping for an automagic way to do this ?
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
can anyone help me with this please.
thank you.
it is in visual studio 2005
public void OKbutton_Click(object sender, EventArgs e)
{
SqlConnection mySqlConnection = new SqlConnection("server=ISS\\SQLEXPRESS;database=Staff;uid=sa;pwd=xbcprfly");
mySqlConnection.Open();
SqlDataAdapter mySqlDataAdapter = new SqlDataAdapter("SELECT Lastname, Firstname, TelephoneExtension FROM Staff ORDER BY Lastname",mySqlConnection);
DataSet myDataSet = new DataSet();
string insertQuery = "insert into Staff values (LastnameTextBox.Text,FirstnameTextBox.Text,TelExtTextBox.Text)";
//mySqlDataAdapter.SelectCommand = new SqlCommand(insertQuery, mySqlConnection);
mySqlDataAdapter.InsertCommand = new SqlCommand(insertQuery, mySqlConnection);
SqlParameter workParam = null;
workParam = mySqlDataAdapter.InsertCommand.Parameters.Add(LastnameTextBox.Text, SqlDbType.NVarChar, 80, "Lastname");
workParam = mySqlDataAdapter.InsertCommand.Parameters.Add(FirstnameTextBox.Text, SqlDbType.NVarChar, 80, "Firstname");
workParam = mySqlDataAdapter.InsertCommand.Parameters.Add(TelExtTextBox.Text, SqlDbType.NVarChar, 50, "TelephoneExtension");
//SqlCommandBuilder mySqlCommandBuilder = new SqlCommandBuilder(mySqlDataAdapter);
//mySqlDataAdapter.Fill(myDataSet, "Staff");
//mySqlDataAdapter.UpdateCommand = "Staff";
mySqlDataAdapter.TableMappings.Add("Staff", "Staff");
try
{
mySqlDataAdapter.Update(myDataSet, "Staff");
//int noOfRowsDs = mySqlDataAdapter.Fill(myDataSet, "Staff");
Application.DoEvents();
MessageBox.Show("data set updated");
}
catch (Exception f)
{
MessageBox.Show(f.ToString());
}
//SqlCommand cmd = new SqlCommand(cmdStr, con);
//cmd.ExecuteNonQuery();
this.Close();
}
|
|
|
|
|
This code is totally messed up!! There are quite a lot of errors, seems to me like your missing the basics here? find some articles on CP or MSDN that explains them plz then start working. Thanks
for a startup use this URL in your MSDN
ms-help://MS.MSDNQTR.v80.en/MS.MSDN.v80/MS.VisualStudio.v80.en/dv_raddata/html/15a88fb8-3bee-4962-914d-7a1f8bd40ec4.htm
Rocky
You can't climb up a ladder with your hands in your pockets.
|
|
|
|
|