|
I will usually create all the "views" as Windows Forms.
In that I can change to SDI, MDI easily.
For your case, place a panel as your right container, when user click on item in the treeview, create the appropriate form and do these:
form.ControlBox = false;
form.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
form.Dock = DockStyle.Fill;
form.MaximizeBox = false;
form.MinimizeBox = false;
form.TopLevel = false;
pnlContainer.Controls.Add(form);
form.Show();
form.BringToFront();
The "form" will be shown within the panel.
I don't usually use UserControl for this kind of purpose, as I feel it's more restrictive for my liking.
|
|
|
|
|
Use usercontrols to design the different pages of your application, next find intel on "triggering a userform/form control from other form/userform".
Use delegates. Place a new post if you need this 
|
|
|
|
|
Hi,
Iam developing an application/service for printers.The scenario is as follows
1. When a user selects a document and then he says the print command(no through my application...he selects normal print in file menu)then i have to catch some details like printername,no.of pages,document name..and so on...This action should be done before it get out from spooler.
2. As all of you that after printing data from spooler will be deleted..but in general for example for HP printer 3 files like lpr1234.tmp,shockwaveobject file ,.shd are generated. In this I have take take required files and keep them in my own spooler.
On my extensive search I came to know that by using WMI and WindowsAPI functions I can get to this goal...
But Iam unable to get into the right way....
If I have to use APIs then kindly tell what are the method I have to implement(if possible give me documentation link)
If through WMI....kindly guide me for the same
ALL these should be act as a service.....
thanks in Advance
|
|
|
|
|
HI,
I have a grid control which has three columns viz.quantity, unit price, and total Amount column.
Quantity column can have only integer value.
I want to validate quantity column in a way so that as soon as user insert value other than integer, a message box should display showing error and return the focus to the cell.
OR
System should not allow any value other than integer into the cell.
Is there any keypress/keydown/keyup event for datagrid's cell also? If yes than please provide me code or any hint...
Please help.
Arun Singh
Noida.
|
|
|
|
|
You could try the following:
1 - Handle the DataGridView.EditingControlShowing event
private void DataGridView_EditingControlShowing(object sender, DataGridViewEditingControlShowingEventArgs e)
{
if (e.Control.GetType() == typeof(DataGridViewTextBoxEditingControl))
(e.Control).KeyPress += DataGridViewTextBoxEditingControlTextBoxControl_KeyPress;
}
2 - Inside the keypress event, check for the keys you need and process them
private void DataGridViewTextBoxEditingControlTextBoxControl_KeyPress(object sender, KeyPressEventArgs e)
{
if (e.KeyChar == (char)Keys.Back)
{
e.Handled = false;
return;
}
if (_dataGridView.CurrentCell.ValueType != typeof (int))
return;
e.Handled = char.IsNumber(e.KeyChar);
}
Hope this helps...
/F - .NET Developer
modified on Wednesday, July 30, 2008 11:55 AM
|
|
|
|
|
Thanx
Arun Singh
INDIA-Noida.
My limit is sky and sky is too high.
|
|
|
|
|
Hi there we have an in-house reporting system that I have been tasked to create a report scheduler for, I am thinking of mimicking the interface used in Windows for Scheduled Tasks so will build a GUI in c# where you choose from radio buttons
Daily
Weekly
Monthly
One time only
then configure the options depending on which first option you chose, configure your report parameters and save. This info will all be saved in the Database in my own schema (yet to define) and will be run via a scheduled sql job that processes all the data and emails out the reports. The report scheduler GUI will be a client side process users will do in our organisation and the sending of reports server side.
I already have all the code for creating the reports with the defined params and emailing out reports via a sql job.
My question is what schema to use for saving the schedule/period data? I have made a start but can be quite complicated and I'm sure someone has done this before or knows how Windows Scheduled Tasks does it. Also is there a code project example of the GUI for this already somewhere? I couldn't find anything.
Something that looks kind of like http://www.recrystallize.com/merchant/crystaldesk/reportscheduler.htm
Thanks, m.
|
|
|
|
|
|
viciouskinid wrote: Is it possible to add text to skinbutton
The articles like the one you are using have their own forum/blog at the bottom of the Article. That would be the place to ask questions about any code from the article you want to use.
led mike
|
|
|
|
|
I tried that and havent got a response. Thanks anyway.
|
|
|
|
|
viciouskinid wrote: I tried that and havent got a response.
I don't see a post from you, nor one with this question about text in the forum for that Article.
Also you seem be completely ignoring the advice you got from senior developers when you asked this same question 3 days ago[^]
You seem very confused about extremely simple things. I strongly suggest you take the advice you were given 3 days ago.
led mike
|
|
|
|
|
Hi,I am new comer of Sql Server 2005 and visual studio2005.I want to check when user put his mobile number that time it will check,mobile number should start with +91 and check also the date format. 
|
|
|
|
|
Sritanu _ Ghosh wrote: want to check when user put his mobile number that time it will check,mobile number should start with +91 and check also the date format.
Okay, what is your problem you are having? Show some code of what you have tried, and maybe someone will help.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Actually I want some idea about that.At present I don't start to write the code. 
|
|
|
|
|
Sritanu _ Ghosh wrote: mobile number should start with +91
String class has Startswith function. You can use that.
Sritanu _ Ghosh wrote: check also the date format
Use DateTime.ParseExact
|
|
|
|
|
Operating System: Windows Vista
Microsoft Visual C#2008 Express Edition
After successful build, getting error as
"A problem caused the program to stop working correctly. Windows will close the program and notify you if a solution is available".
Only two options are available in the error box as " Debug" & "Close".
Same application when compiled in windows XP OS machine, Application is working correctly.
Please help me if any one knows about it.
|
|
|
|
|
Hello, have you figured this one out?
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
|
HI, I need to design a form to INSERT multiple rows into database. I came up with putting textboxes forming a table. That may get the job done but it doesn’t seems to be the right thing to do. I wonder if there is a control that does the opposite of the datagridview. That instead of showing you the info of the database it lets you put information and then manipulate it to send it to a database.
|
|
|
|
|
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Hi I have just downloaded Visual C# 2008 and I am trying to get a handle on it. I have a bit of programming experience.
I want to implement this code http://www.codeproject.com/KB/cs/TransparentControls.aspx[^]but i have no idea how to implement it.
I can load the demo I just have no idea what is going on. how do you apply the source code to a new project to implement the SkinTooltip control. Can someone either let me know a good place to go and learn or even give me a bit of a walk through. Thanks
|
|
|
|
|
Hi I am fairly new to C# too. You can find help in the page in the C# section or just Google C# tutorial. "C# Station" was a big help at the beginning. Maybe you cannot implement the code because most examples and tutorials were written using C# 2005 I recommend you download and use that version at least while you learn the basics. 2008 is not much different but most of the code material was written in 2005 version.
|
|
|
|
|
Hi,
you seem to have two issues here. One is a new language, the other Windows programming.
IMO a language is best learned by studying an introductory book or tutorial on the language;
that way you get all the basic elements presented in a logical order, with examples and rationale.
You can get a good feeling for a language in a matter of say two weeks with a book and some experiments;
this of course depends on your background. Then start reading some articles on sites like this one.
Windows programming is a lot trickier; there sure are books that may help you with that too, but
I am afraid there is a much longer learning period. Tooltips are OK, not quite straightforward though.
Transparency is really tricky. I have been a Windows programmer for 20 years now, but I would
not volunteer explaining how transparency works (also due to the fact that I'm not that interested in it).
Hope this helps.
|
|
|
|
|
Cool you are new to C#, may I suggest you try simpler tasks first.
viciouskinid wrote: how do you apply the source code to a new project to implement the SkinTooltip control.
You can either compile it as a dll library and reference it, I did this earlier. Or, you can add a source file to your project and just add it in.
viciouskinid wrote: Can someone either let me know a good place to go and learn or even give me a bit of a walk through.
You came to the right place, this site is loaded with a lot of good help
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Hi all,
The application I developed takes some memory while doing its processing.
The memory only grows if the app is kept idle. But when I minimize it, the memory suddenly diminishes.
How can I free the memory without minimizing the window?
Please guide.
Thanking you!
|
|
|
|