|
I am currently working with the Windows Form DataGrid and i am finding the lack of information on it very frustrating. The link below provides a good series of articles on its use.
www.codeproject.com/csharp/PracticalGuideDataGrids1.asp
What I don't understand is why Microsoft relies on the developers to document THEIR controls.
Mark
|
|
|
|
|
There's a new DataGridView control in Windows Forms 2.0 that addresses many of the problems with the existing DataGrid. Fortunately the documentation for the new one is now like all other WinForms controls.
Judah Himango
|
|
|
|
|
Hi every body...
I need to know the method off finding the physical IP address for a user who is
Connecting internet through a DSL line...
I prepared a client server application and when any one of the clients who
Are connected to internet through a DSL or any leased line tried to connect
To my server he cannot connect to it...
The server is having a physical IP address and I am establishing the
Connection with a dial up connection...
Any user who are connected through a dialup can access otherwise they cannot
...
Pls help in finding the way for getting the physical IP or assigning an IP
For a machine with DSL connection to establish the connection with it
|
|
|
|
|
do i have to mess with the alpha to get some of those nice bluish colors with a white tint that outlook 2003 has for buttons? i can only create solid looking colors with FromArb, right?
|
|
|
|
|
Hi vista27,
I don't think that those buttons and other "gradient color" components use transparency/alpha. Probably what the Outlook programmers did was make their own "custom" button class by inheriting a new class from System.Windows.Forms.Button and overriding its painting methods (OnPaint comes to mind).
In the override you would use GDI+ to paint a gradient-colored rectangle or oval (or whatever) instead of a solid color rectangle. There's a LinearGradientBrush class in GDI+ that would do what you're looking for--you would make that brush and use it to fill the rectangle/oval/etc. You would have to print out the button's text and stuff, or you could call base.OnPaint() first and then draw over it.
|
|
|
|
|
awesome. thanks for the info. i had one more question, though. what do you suggest i do with an icon image? i have buttons with icon images. i've redrawn the text, but now i need to replace the icon, but it doesn't seem to show up.
if i do as u suggestion by calling base.onPaint first, the gradient still seems to wipe out everything.
thanks!
|
|
|
|
|
My bad on the calling base.onPaint first, it's just not going to work. As far as drawing an icon image, if you're using the button's Image property there's a method in Graphics called DrawImage that's probably what you're looking for.
I believe there's articles about this stuff out on the main site, too, with all sorts of fancy features.
vir·tu·al re·al·i·ty
n. Abbr. VR
A computer simulation of a real or imaginary universe in which Microsoft APIs are thoroughly documented and behave in an entirely logical manner.
|
|
|
|
|
Hi,
How to configure visual studio for debugging in https(ssl) mode a WebApplication in c#?
Thank a lot four help.
-=zoltx=-
|
|
|
|
|
I am working with the .NET DataGrid in C#. I thought I saw an article on the Code Project site which explained how to get rid of the last row in a DataGrid, the one with the asterisk next to it. Does anyone know the article? Or know how to do it?
Thanks!
Mark
|
|
|
|
|
|
Thanks Roy for the quick response! That is a great article!
Mark
|
|
|
|
|
Hmmm. I can't seem to get this to work.
At the statement:
CurrencyManager cm = (CurrencyManager)(this.BindingContext[dataGrid1.DataSource, dataGrid1.dataMember];
I get an error:
"Cannot create a child list for field myTable". myTable is the name of the single table in the dataset.
Any ideas?
|
|
|
|
|
I've used this in the past
DataView dv = new DataView(myDataTable)<br />
dv.AllowNew = false<br />
dataGrid1.DataSource = dv
|
|
|
|
|
I tried the code you just gave me, instantiating the DataView then setting AllowNew to false. But it doesn't seem to change a thing.
Mark
|
|
|
|
|
Hi Guys,
In one project I have to write code to send email using MAPI. .Net does not support MAPI, and i dont have much information how to use MAPI in C#.
If anybody have worked on MAPI in .net,then please provide some informaion and sample code.
Please give some Links on MAPI programming.
Regards
AShu
ashu
|
|
|
|
|
hi,
Why don't you use .Net Framework managed component for send mails. You can't use that ?
Sreejith Nair
|
|
|
|
|
Hi ,
I have already done this using SMTP (.net framework component). But our client machine does not support SMTP.They want this to be done using MAPI.
ashu
|
|
|
|
|
I have an application (C#/ADO.NET) that collects alarms from equipment at around 100 sites, through concurrent TCP/IP listeners. Per day I receive about 1 million messages (~10/sec). I used to insert the directly into the destination table, but that would lock up the table so user access (read/reporting) was hardly possible. Now I insert the data in a intermediate table and upload it every 5 min. to the final table with SQl agent.
First of all, this doesn't look like an elegant solution. Furthermore, performance is still quite bad. Even though I have just this one DB/table, SQL-server uses up all available memory (1.5Gb out of 2Gb) and all available CPU, 24x7; I'm just wainting for a melt-down...
Anybody have any experience with this amount of transactions, and/or any suggestions?
Thanks.
|
|
|
|
|
CPU should not be high on the SQL box for data inserts. Check that your inserts are as efficient as possible:
* avoid INSERT ... WHERE ... statements
* avoid clustered index (good for selecting, often bad for inserting)
* minimize the number of indexes on the tables you insert to
Regarding memory usage, SQL tends to do that (grab as much memory as it can), it does not necessarily mean anything. However, it is worthwhile checking that you have appropriate indexes for the user-reporting and other reads are optimized.
my blog
|
|
|
|
|
Hi
I am looking for a convertor. It must be able to convert a numeric range to a regular expression string.
I searched the internet but I could not find a one. I do not have time to write from scratch.
Do you know such a code?
Thanks
|
|
|
|
|
hi,
You mean you want the minimum to the selected numer into a string or ?. Will you explain little more ?
Sreejith Nair
|
|
|
|
|
Hi
I want to enter a minimum value and a maximum value as the input.
Ex:3-55
Then I want an output as regular expresion like ([3-9]|[1-4][0-9]|5[0-5])
Thanks
|
|
|
|
|
When using the richtextbox control there is an intense amount of flickering. It is especially noticeable after an image is pasted into it.
I have tried using the ControlStyles to take advantage of double buffering, but I am not able to successfully paint the text and images properly.
Any help would be greatly appreciated.
Thank you in advacne.
JB
|
|
|
|
|
hi,
If you are calling the Invalidate() function of base form then it will invalidate the entire region of the form. Better try to Invalidate the your RichTextBox
<blink>S r e e j i t h N a i r
|
|
|
|
|
The problem is not about calling Invalidate() on the base form or for that matter on the Richtextbox itself.
To see what I am talking about, create a WinForm application and add a RichTextBox to the form. Compile the application and run it.
Start typing into the richtextbox. Then paste an image into it. Then continue typing on the line below or above the pasted image. The flicker is unbearable.
If someone can give me some direction on overriding the OnPaint(PaintEventArgs pe) event to be able to successfully paint complex data, it would be helpful and very much appreciated.
Thank you.
|
|
|
|