|
I have a dataset in C# that generates 5-6 reports which I want to save in a single Workbook. But the reports should come in seperate worksheets. How to do that? If anybody has code for that, please provide. Advance thanks for any help.
Raja Raman S
Reuters India Pvt.Ltd.
Bangalore
|
|
|
|
|
Hi
how can I set a specific printer tray without any Dialog?
I have a printer with two trays and a special report needs always to be printed to a red paper, but how can I set this?
Thanks a lot for helping me
Greets
Michael
|
|
|
|
|
Hello,
I have a form with dataGrid.
I want to asign a dblClick evnt to the dataGrid lines.
but on the form it's not possible to click on any compenent inside the data grid.
thanx.
|
|
|
|
|
Hi There
For example purposes let us assume the datagrid name is dataGrid1.
Go to you Windows Form Designer region and look for:
//
// dataGrid1
//
Type the following anywhere underneath this:
this.dataGrid1.DoubleClick += new System.EventHandler(this.dataGrid1_DoubleClick);
And then on your form create the Handler for the event, like so:
private void dataGrid1_DoubleClick(object sender, System.EventArgs e)
{
// Type code that must execute when you double click the datagrid here
}
Tada! It's that simple
|
|
|
|
|
|
who can tell me about how to hide windows TitleBar in c#,like windows Media Player 10.0 .
thanx
d
|
|
|
|
|
Set the dialog box style to not have a title bar.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
thanks,for ur reply, i want to know how to hide the window titlebar,and its sizeable property still useing
d
-- modified at 12:47 Tuesday 29th November, 2005
|
|
|
|
|
Yes, there's a different property to set the dialog frame type, you can make it not sizable there.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
tankx,but i need the Form resizeable without title bar,My applications UI like MSN 7.5, can u answer me before look over MSN or MS MediaPlayer UI? thank u
d
-- modified at 23:18 Tuesday 29th November, 2005
|
|
|
|
|
If you hide the title bar, can't you still resize the form by the edges ? If not, then you can easily code this behaviour, just capture the mouse on the edges, and if it's down, use the amount the mouse moves to resize your form.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
yes, i can't resize the form after hide tile bar in runtime, i know ur means,and code it easily in VC++,but u can give me the code in C# , i dont know well C#.
thankx very much!
d
|
|
|
|
|
It seems there is one property - formborderstyle, and sizable is one option, none is another. The only option I can think of is the one I gave - make it none, and then code the sizing part yourself.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
...Is deprecated, and I discovered what I need use delegates instead.
Ok, I have not NONE idea (nor examples)like I do this...
Some may help?
Jesus is love, tell to someone!
|
|
|
|
|
click.ok wrote: Is deprecated, and I discovered what I need use delegates instead.
Im not sure how you would use delegates, but deprecated means it still works, but will probably be removed in the next version or 2.
xacc.ide-0.1 released! Download and screenshots
|
|
|
|
|
Hi everyone..
I'm currently doing a web application using C# which i'm unfamiliar with the prgram. I need urgent help~ My problem is that if i retrieve the database, how can i select, edit or delete the particulars from the database which i select? Anyone who know how to code it?? I have tried several times and it seem like is not right.. Your help is greatly appreciated.. Thankz.. =)
Cheers!
|
|
|
|
|
Hello_mouse wrote: My problem is that if i retrieve the database, how can i select, edit or delete the particulars from the database which i select?
Using SQL. You don't retrieve a database, you retrieve a set of data which is a snapshot of the moment when you asked for it. You retrieve data, but you execute SQL to update or delete data seperately, although you may use the data you got back to build your query ( although it's better to use stored procs than to send SQL to the database ).
Google is bursting with help on this.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I am working on an app that has an Outlook-like interface where the right pane switches to different forms based on the users choices on the left navigation area.
It's started small with perhaps 5 forms available and so I started with variables for each form type in the main form. When a user makes a choice a switch statement is executed, if the form is null then it's instantiated and switched into view. At closeup all non-null forms are properly closed and cleaned up.
This was OK and worked well, the form is never instantiated if the user never chooses it and instantiated forms are very quick to switch to as the user works in the app, but it's starting to grow out of control with now 32 forms and about 15 more to go.
By out of control I mean there are 32 form variables declared, 32 cases in the switch statement, 32 cases in another switch statement to close instantiated forms etc. Classic collection territory, but ...well they are forms so it's not something I'm too familiar with "collectivising".
I've considered ways to deal with this, probably a custom collection or something or simply an ArrayList, but I don't want to re-invent the wheel or inadvertantly cause a negative impact on what is actually working fine at the moment, just unwieldy from a development perspective. I've perused the good old 'net and my search terminology must be off because I haven't come across any useful info on this.
Any suggestions or pointers would be appreciated even if it's just to say there is no more efficient way to do this.
Cheers!
-- modified at 19:58 Monday 28th November, 2005
|
|
|
|
|
I always write my WinForm apps using an Outlook-style interface. Now I use the DevExpress libraries which has the very useful TabbedMdiManager which allows you to just create an MDI app and the control lays out the forms like Outlook or Visual Studio's tabbed form interface.
Prior to this, I used a Hashtable to hold my form collection. This is easy if you only allow a single instance of each form, as you can use the form's class name as the key. Otherwise, you need to establish a naming standard to ensure that you are manipulating the correct instance.
|
|
|
|
|
It says that 'The list that this enumerator is bound to has been modified. An enumerator can only be used if the list doesnt change.'
Of course the list will always be changing, so how do i ditch this enumerator thing?
|
|
|
|
|
You're using for each. For each will die when the list changes. You need to build an array of items to remove, then use a for loop to access it from the end to the start, removing the items one at a time.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I wonder what is the "best" way to provide a default implementaiton for an interface (without requiring to much typing).
Supose I have a "Document" interface, like
public interface IDocumentInfo
{
String Name { get; set; }
bool IsDirty { get; set; }
...
}
Now the default implementation is pretty straightforward, but I
(a) want to allow customization
(b) not have to clutter up the implementing class with all the method implementations
(c) not make it a base class
The only way I see to achieve both :
public class DocumentInfoImpl : IDocumentInfo
{
String name;
bool isDirty;
String Name { get { return name; } ... }
...
}
public interface IDocumentInfoAccess
{
IDocumentInfo DocumentInfo { get; }
}
public class MyDocument : IDocumentInfoAccess
{
private DocumentInfoDefaultImpl docinfdfltimpl = new DocumentInfoDefaultImpl();
public IDocumentInfo DocumentInfo { get { return docinfdfltimpl; } }
...
}
It feels overkill to have 3 entities, but it's the only thing I see.
what do you think? does it make sense?
We say "get a life" to each other, disappointed or jokingly. What we forget, though, is that this is possibly the most destructive advice you can give to a geek.
boost your code || Fold With Us! || sighist
|
|
|
|
|
If you just dislike the typing overhead, Visual Studio 2005 implements an interface for you in one single mouse click (right click on the interface name in the class definition -> "implement interface")
modified 12-Sep-18 21:01pm.
|
|
|
|
|
I still have to provide the implementation (even if it's a call-forward to a default member). The source code gets cluttered with "meaningless" code, e.g. in my example the "document state" can be isolated easily (from a design view).
We say "get a life" to each other, disappointed or jokingly. What we forget, though, is that this is possibly the most destructive advice you can give to a geek.
boost your code || Fold With Us! || sighist
|
|
|
|
|
You said you don't want to make a base class out of it. How about making an extra base class so that implementations are easier while still allowing implementing the interface directly?
public class DocumentInfoBase
{
private string _name;
private bool _isDirty;
public virtual String Name {
get { return _name; }
set { _name = value; }
}
public virtual bool IsDirty {
get { return _isDirty; }
set { _isDirty = value; }
}
...
}
-- modified at 18:46 Monday 28th November, 2005
|
|
|
|