|
You might find that one of the various FlatStyle options on Button does the job. Otherwise just draw the button yourself in an overridden OnPaint.
|
|
|
|
|
If you're using Visual Studio open up Program.cs and remove the line Application.EnableVisualStyles(); inside the Main function. This is what tells the app to use the Windows XP theme; doing this will remove the visual styles from every control in the app.
|
|
|
|
|
I have a web page with 3 date fields. One is required, the other 2 are optional.
These will be written to a database once the user clicks save.
Should I use the in-built customvalidator method? What about spaces?
Should I write a separate validator for dates using the dreaded REGEX?
Can I validate them all using FindControl in a ForEach loop (the id's all begin 'dt****')?
Any advice welcome.
Cheers
|
|
|
|
|
Use the custom validator - there's a method on the DateTime class called TryParse. This is a great way to check to see if the date is valid. Also, use a required validator on the date that is required.
|
|
|
|
|
Hey thanks for your willingness to help but ahm!! sorry that i'd have to disappiont you,but i really do not know how to implement the redo or undo actions
|
|
|
|
|
Well that's a shame, but who precisely was this aimed at? There are some excellent articles here on CP about implementing Undo/Redo - perhaps they might be of some assistance.
|
|
|
|
|
Hi
I have a application which creates a message queue and then recieves the message in it.when i create a test application it was working fine,now when i change this to a webservice its showing me an error which i logged in log file ,the error is as following queue doesnt exists or you do not have permission to perform the operation.Is it anything related with rights.
Actually the queue need to be created programmatically but it also not working.so i created it manually but also above error comes..why is it coming
Thanks in advance
Regards
DilipRam
|
|
|
|
|
The web service will be running under the heavily curtailed permissions of the ASPNET worker process. You need to grant access to this user for the queue.
|
|
|
|
|
Thanks for the reply.the user which i am using is the administrator of that machine.Is there i need to specifically do for the rights..if so can you pls give me the steps for that
Thanks in advance
Regards
DilipRam
|
|
|
|
|
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
|
|
|
|