|
Setting the PixelOffsetMode to "HighQuality" worked for me before, IIRC.
|
|
|
|
|
That did it alright. I swore I tried that yesterday - but I tried a million combinations before giving up and posting, that one must have slipped through, or maybe it didn't work with some other setting I had at the time.
Whatever, works now - Thanks!
-----
In the land of the blind, the one eyed man is king.
|
|
|
|
|
Actually i am facing one problem while customising custome data gride. Actually i want to Create custome table style and add it to Datagrids Table style so user can set custome Column style by clicking Datagrids Property window(Table Style window) so i want to put my own Custom table style over there....So Experts Please help me out...........
Keep Smiling
|
|
|
|
|
I have written a component in C# with the following structure:
Data is loaded from database into a DataSet
"Record" class wraps each DataRow in the DataTable I have loaded. i.e. the properties on the object read/write the columns in the DataRow.
"Records" class inherits from CollectionBase and is a colleciton of "Record" objects.
The problem I have is how to sort the Records collection. I am currently doing this by sorting the underlying DataView which is held in the "Records" object. However, I then had to write some messy code to sort the Records collection class based on the order of the view. It works, it's not really slow, but I just feel there must be a much better way of approaching this.
Does anyone have any suggestions?
|
|
|
|
|
You can use ORDER BY ColumnName keyword in query.
Know Yourself Then Grow Yourself.
|
|
|
|
|
I am aware of the ORDER BY command in SQL. However, I need to sort the data after it has been retrieved by the client application and hence this will not help.
I was wondering if I need to use the CompareTo or Equals methods which are on the base object interface to do this?
|
|
|
|
|
Hi,
i would like to create a simple control for smart phone (cf2.0) that changes its background color depending upon whether it is focused or not. i have the following code.
class mylabel:Control{
protected override void OnGotFocus(EventArgs e){
base.OnGotFocus(e);
this.BackColor = Color.Red;}
protected override void OnLostFocus(EventArgs e){
base.OnLostFocus(e);
this.BackColor = Color.White;}
}
The problem is it can get focus (and changes its bg color) but it seems it does not loose focus. if i inherit LinkLabel instead of Control then it works fine.
What could be wrong? i would really appreciate.
regards,
rnv
|
|
|
|
|
Well, I've never programmed for CF, but the recommended way to determine when a control gets focus AFAIK are the Enter and Leave events.
However, why are you deriving from Control ? Unless you are creating a new control from scratch, if you want to add this functionality to existing controls (text boxes, buttons, and so on) I would rather subscribe to the events for the controls. You could write a little class that given the control reference in the constructor, it would subscribe and handle the events. Then you could apply it to any control with just one line of code.
Luis Alonso Ramos
Intelectix
Chihuahua, Mexico Not much here: My CP Blog!
|
|
|
|
|
Hello!
In C++ we could do m_listView.SetRedraw(TRUE) in order to block repainting of the list view control. Add some items to it and call m_listView.SetRedraw(FALSE) to allow drawing again. This was pretty fast.
Now my question: is there an equivalent to this in .NET? I've looked at the member list of ListView, but didn't find one that does that. Have I overlooked something?
Note: I do NOT want to use a virtual list view.
Thanks in advance and best regards
Dominik
_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
(doesn't work on NT)
|
|
|
|
|
Yes, you have ListView.BeginUpdate() and ListView.EndUpdate() .
Luis Alonso Ramos
Intelectix
Chihuahua, Mexico Not much here: My CP Blog!
|
|
|
|
|
Works perfectly! Many thanks!
Dominik
_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
(doesn't work on NT)
|
|
|
|
|
You are welcome! I'm glad I could help!
Luis Alonso Ramos
Intelectix
Chihuahua, Mexico Not much here: My CP Blog!
|
|
|
|
|
I need to build TextBox control that will display baloon tooltip if entered value is invalid. The question is, how can I retrieve size of such tooltip to allocate it on right place? Thanks.
|
|
|
|
|
Hi,
I am working on Media File Steam Edition, and want to cut a file into many, and join two files. I am using DirecX9 SDK. I tried hard, but cant go on further with my own knowledge.
Can any knowledged person guide me for the same. I was working on .avi files, but now am thinking of .wmv files.
Any thing that can help me do the coding for joining and cutting media files will do.
Thanks,
Jc Shreyash Singh Parihar
|
|
|
|
|
I have metod
private void axWebBrowser1_NewWindow2(object sender, AxSHDocVw.DWebBrowserEvents2_NewWindow2Event e){
}
Help me please.
|
|
|
|
|
What is it that you want help with?
---
b { font-weight: normal; }
|
|
|
|
|
Hello,
I search a DataGridViewColumn which has the possibility to select a few Items (with Checkbox). It should be also possible to bind data to that control.
Knows anyone a control for Net2.0
Regards
Hansjörg
|
|
|
|
|
How can we access SSAS cube data in a datagrid? If it is using adomd, can anyone please give the code.
Is there any .NET client application which will provide the same view as cube browser in SSAS cube project?
|
|
|
|
|
hi
i want to draw a shape (for example : line) in my form but i can't get result and nothing occured in my form and my code is :
private void Form1_Load(object sender, System.EventArgs e)
{
Graphics g = pe.Graphics;
Pen mypen = new Pen(System.Drawing.Color.Violet,2);
g.DrawLine(mypen,35,35,150,100);
}
and when i override OnPaint event of my form it is done and line create in my form.
my problem is that i can draw a shape only in OnPaint event and not i other events (for example : Form1_Load )
how to do that and how to draw shapes in picturebox..
please explain fully because i am beginner and i don't anything in web that explain fully.
thanks
|
|
|
|
|
This is what i have written in the click event of a button
Graphics g = pictureBox1.CreateGraphics();
Pen pe = new Pen(Color.Red,3);
g.DrawRectangle(pe,10,10,20,30);
This draws a rectangle on the pictureBox with the specified size.
Hope that is helpful
Regards,
Pramod
|
|
|
|
|
thanks you solved my problem
many thanks
|
|
|
|
|
Be careful when following the advise above, that's not really a clean solution!
First of all, you'll have to dispose of every Graphics object you create, otherwise you'll get a resource leak that can be very hard to debug.
Then the answer depends on what you want to do.
Do you want to draw into a Bitmap that's displayed in a PictureBox or do you want to show an Image in a PictureBox and draw something on this PictureBox (something like an overlay)?
In the first case, you'll have to use Graphics.FromImage() to get the Graphics object to draw on the Bitmap (don't forget to call Dispose() afterwards, or use the using() statement).
In the second case, the Paint event of the PictureBox is the only correct place to perform your painting. Everything else will be lost when the PictureBox is hidden (partially or full) and repainted.
Regards,
mav
--
Black holes are the places where god divided by 0...
|
|
|
|
|
Hi there fellow programmers!
I have a datagridview with say 20 rows, and I know that only ONE of them has a certain value in one of its cells. What I want to do is displaying this one row in top of the others, so it shows itself first.
There is no way i can set it first via sorting, and the FirstDisplayedScrollingRowIndex property doesnt seem to work unless Im doing something wrong - I'm setting in there the index of the row.
Any ideas? Thanks in advance
|
|
|
|
|
Hi
i been awak for two nights i can't see anything infront of me
BUT i must complete this
int [,,] myArray = new int [,,] {{1,2,3}};
it gives me the error
Incorrectly structured array initializer
WHY
--------------------------
If you found my answer to your question useful; then vote for me.
------------------------
Ahmad Shaban
|
|
|
|
|