|
Hi all,
I'm writing an intranet application using ASP.NET 2.0 and C#, and I have long gridviews (lots of rows, and the users don't want paging), but many users asked me to have a feature like "Freeze panes" in Excel : do you know a method to have the first row (table header) keep on top of the page (and top of the window) while scrolling in the page ?
Thanks !
Stéphane
|
|
|
|
|
Have a look at this article Scrolling Grid[^]
Tarakeshwar Reddy
MCP, CCIE Q(R&S)
There are two kinds of people, those who do the work and those who take the credit. Try to be in the first group; there is less competition there. - Indira Gandhi
|
|
|
|
|
Hi
I don't knot know if it is possible .
I want to get the output of a program from a command window into a textbox\Rich textbox.
For example:
When compiling in Visual Studio 6 using a command line option (no GUI) i get redirect the output into a text file .
1) Is it possible to get that input into a textbox?
2) If not how to display the ongoing progresses from the file?
Thanks
Have a nice Day
|
|
|
|
|
|
I am missing something here...
I red the page but couldn't get an answer...
please explain
Have a nice Day
|
|
|
|
|
liqnit wrote: am missing something here...
yes :P
liqnit wrote: I red the page but couldn't get an answer...
Seriously? Did you check out the members on the class? That link was to the main page for the class, the links at the bottom provide more information such as details on the Members of the class.
If you had "StandardOutput", "Start" and "GetProcesses" are pretty obvious.
GetProcesses will retrieve a list of all running processes from which you can get the one you want. Or you can use Start to run it if it's not already running.
Then StandardOutput gives you access to the output stream.
|
|
|
|
|
Thanks a lot
i guess i am not as good as i thought...
will definitely try this
thank you very much
Have a nice Day
|
|
|
|
|
No probs.
I'd highly recommend getting used to the MSDN as its very handy for checking out classes. If your using Visual Studio the intellisense can be invaluable as it can be used to see everything accessable on an object and provides comments.
|
|
|
|
|
Can i change the font of a string variable?
I am working on C#.net window application, In this header part appear on each page which we print.
Now its hard for an end reader(user) to distinguish between header part and content of page as font is same.
So, can i change the Font of header to Italic or anything?
I am storing the content of header part in string variable.
|
|
|
|
|
You need to provide a bit more information than this. How are you controlling the print page? Is this a report that you render out using GDI+?
In any case, the answer is yes - you can change the font. Assuming that you are drawing the text using GDI+, you need to supply a different font object to the text output.
public override void Paint(Graphics g)
{
Font myFont = new Font(base.Font, FontStyle.Bold);
StringFormat sf = new StringFormat();
sf.Trimming = StringTrimming.EllipsisCharacter;
Brush textBrush = new SolidBrush(Color.Black);
g.DrawString("Heading", myFont, textBrush, MyHeaderRectangle, sf)
}
|
|
|
|
|
hi all
i did this a while ago but lost everything on my comp and now cant remember how I did it. I remember it was fairly simple but I cant for the life of me remember what or how I did it.
Basically I want to get the colour of the pixel under my mouse pointer. I've loaded the image into the picturebox (picLayout) and have the mouseevent being handled I just can't remember how to get the colour of the pixel.
any pointers well appreciated
TIA
tim
|
|
|
|
|
Hello,
I think it is a good way to use the Bitmap.GetPixel function.
using(Bitmap bm = new Bitmap(pictureBox2.BackgroundImage))
{
actColor = bm.GetPixel(e.X,e.Y);
}
Hope it helps!
All the best,
Martin
|
|
|
|
|
hi martin
thanks for that but I'm getting an error (im probably being a bit thick here but.....)
i have this when the image loads:
this.picLayout.MouseDown += new MouseEventHandler(this.HandleMouseDown);
and then:
<br />
public void HandleMouseDown(object sender, MouseEventArgs e)<br />
{<br />
using(Bitmap bm = new Bitmap(picLayout.BackgroundImage))<br />
{<br />
label2.Text = bm.GetPixel(e.X,e.Y).ToString();<br />
}<br />
} <br />
and it just crashes it, any thoughts (apologies ofr my dimwittedness - brain just isn't functioning atm)
also i was thinking about having this as a mouseover event, if its creating bitmaps on every mousemove event wont it just explode ? I wish I could remember what I did before, it was fairly simple and something along the line imgName.R.ToString();
ta
|
|
|
|
|
going_mental wrote: but I'm getting an error
Standard Question No.?: What does the error say?
going_mental wrote: and it just crashes it
runtime or designtime?
All the best,
Martin
|
|
|
|
|
hmmm, told you my brain wasn't working....
i should have used picLayout.Image rather than picLayout.BackgroundImage.
it was throwing an unhandled exception (which confused me as tried to catch it but it was happening before it got to my try/catch) over the lack of background image in the picturebox.
thanks, all working now, but it would be nice to be able to do this as a mouseover event rather than just mousedown. I just tried it as mouseover event and the cpu load kinda went a bit mad. Any thoughts ?
when i did it before it was fairly simple and something along the line imgName.R.ToString();
tim
|
|
|
|
|
Glad I could help!
All the best,
Martin
|
|
|
|
|
hi martin
just to pick your brains a little further.....it would be nice to be able to do this as a mouseover event rather than just mousedown. I just tried it as mouseover event and the cpu load kinda went a bit mad.
when i did it before it was fairly simple and something along the lines of imgName.R.ToString(); or something like that. is that something you've heard of ? I can access the RGB values for the background but obviously thats not much use (as its just grey) but it wont let do the same for the Image.
Any thoughts ?
|
|
|
|
|
Hi,
why would you need a new Bitmap in your MouseDown handler ?
This is what I would try:
public void HandleMouseDown(object sender, MouseEventArgs e) {
Bitmap bm = picLayout.Image as Bitmap;
string s= bm==null ? "Not a bitmap" : bm.GetPixel(e.X,e.Y).ToString();
label2.Text = s;
}
And since this is a cheap operation now, you could try it in MouseHover handler also.
|
|
|
|
|
All the best,
Martin
|
|
|
|
|
excellent, that does the trick nicely.
thanks to you both
|
|
|
|
|
hello everyone,
i m new in this discussion board,
I develop an application which handles the Word files, i use the class Microsoft.Office.Interop.Word, this class has an object named application which contains the documents, the problem is when I turn my application in a specific machine, with closing the application, word.exe remains always in éxécution
, but in my machine all goes well,
to open a word document :
<br />
<br />
Microsoft.Office.Interop.Word.Document document;<br />
Microsoft.Office.Interop.Word.Document.ApplicationClass wd = null;<br />
wd = new Microsoft.Office.Interop.Word.ApplicationClass();<br />
document = wd.Documents.Add(ref missing, ref missing, ref missing, ref missing);<br />
<br />
to close the document and my application:
object dummy=null;<br />
object dummy2=(object)false;<br />
document.Close(ref dummy, ref dummy, ref dummy);<br />
wd.Quit(ref dummy2, ref dummy, ref dummy);<br />
Marshal.ReleaseComObject(wd);<br />
how can we be sure that the application(winword.exe) is closed?
Thanx
Morad SAJID
|
|
|
|
|
I think this could all be done easely over the System.Diagnostics.Process class
All the best,
Martin
|
|
|
|
|
I don't want to close the others ducuments open out of my application ,
Martin# wrote: System.Diagnostics.Process class
I want to close only that which opened the WORD documents in my application
Thanks
Morad
|
|
|
|
|
Remember that as soon as you open one of the programs of MS Office,
it starts a background process called WinWord.EXE. This is to help
decrease the load time for the Office framework. You can kill it without
harm. Unless you are actual doing something with Office.
God Bless,
Jason
Paul Conrad wrote:
Chuck Norris keeps the hamsters going whenever Chris is gone on vacation. Just stares them down and they keep the servers going
|
|
|
|
|
the difficulty is to kill the only process that i used for my application,
how to identify the WinWord.exe process that i uses ?
Thanks
Morad
|
|
|
|