|
one way to do this would be like this:
float iValue=4f;
label1.Font = new Font(label1.Font.FontFamily, iValue, label1.Font.Style);
hope this helps.
|
|
|
|
|
ya..this work.
thank u.
|
|
|
|
|
what is mean of application blocks......and
where we r using and also how.....
|
|
|
|
|
Hi All,
I want to write a program in .net C#, for sending a text messages from server to client computer on LAN in certainty time duration (like after 1 hours).
give me the concept how does it work and how can i use the sokect programming in my application
Please help me ...!
Pavan Pareta
|
|
|
|
|
Check this article on codeproject:
Send Messages Using The Net Send Command - Syed M Hussain
Mikail Çetinkaya . The C# DEveloper
|
|
|
|
|
Hi,
I m trying to extract all the images tags from the HTML page,
i tried the below regex pattern,
<img\s.*src=.*>{1}
this works fine when the HTML pagesource has tags in the single line..
This patterns fails when the image tag is splitted to two or more lines..
eg..
plz help me.
regards,
nas
|
|
|
|
|
Hi,
I have a dgv that is created programmatically and bind it to a datatable. The Columns/Cells are all text.
I insert an int (as a string) into a cell when I need to and use that int to lookup another datatable when I need to. Works well
What I would like to do is dislay an image if the cell contains an int rather than the int itself.
I know I can make the columns concerned image cells and I presume I would then need to record the image name in the datatable rather than the int which is what I want. I thought of using the cell.tag to hold the int but I need that field for another purpose. I'm not even certain that is what I want because I need to store the int, not the image name.
Is there someway of using the cellformating event to convert that cell into an image cell and show an image? I think it should be possible but can't find the right code.
TIA,
Glen Harvy
|
|
|
|
|
May use on item data bound event and create a new image cell and by downcasting paste it to the cell u want
Mikail Çetinkaya . The C# DEveloper
|
|
|
|
|
Any chance of you speaking in C#?
I would really appreciate a code snippet.
Thanks.
Glen Harvy
|
|
|
|
|
There is a string like code#project now i want the string code into one variable and project into another variable how is it possible.
Thanks,
yamini.
|
|
|
|
|
Split the string using SPLIT()
Ex.
string a = "code#project"
string [] b = str.split('#')
Regards
KP
|
|
|
|
|
|
use the split function, with '#' as the delimiter
Keshav Kamat
India
|
|
|
|
|
|
I want to have a text file in which one can do copy and paste to only those users to whom i would have given the permission.So i want to disable copy and paste button to restrict from other users. How could I do this in c#
|
|
|
|
|
you could write your own code, get the user information and do stuff accordingly
http://www.csharphelp.com/archives2/archive439.html
or use azman
http://community.bartdesmet.net/blogs/bart/archive/2006/06/29/4112.aspx
Visual Studio can't evaluate this, can you?
public object moo<br />
{<br />
__get { return moo; }<br />
__set { moo = value; }<br />
}
|
|
|
|
|
I have a problem with a windows service i have created. I am using SqlDependency to notify my service of changes in a table in a database. When I compile this in Debug mode everything works fine. However when I compile in Release mode I am getting problems. The service runs fine until the table in the database changes and then the service just hangs. Does anyone have any ideas on why this might be occuring in the release build but not the debug build?
|
|
|
|
|
I've figured out this problem is a result of timing. I have put in some simple for loops just to create delays and the problem has gone away.
Now to implement a better solution.....
|
|
|
|
|
It seems that the download dialog triggered by this code
prevents the label control “Label2” to show its message.
What should I change/add to this code in order that the message
"Download Complete" could appear in the web page in the
“Label2” control ?
Here is the relevant code:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
protected void DownlFile_Click(object sender, EventArgs e)
{
string web_path = "./items/X-103.pdf";
string path = Server.MapPath(web_path);
FileStream MyFileStream = new FileStream(path, FileMode.Open);
long FileSize;
FileSize = MyFileStream.Length;
byte[] Buffer = new byte[(int)FileSize];
MyFileStream.Read(Buffer, 0, (int)MyFileStream.Length);
MyFileStream.Close();
Response.ContentType = "application/pdf";
Response.AddHeader
("content-disposition", "attachment; filename= X-103.pdf");
Response.BinaryWrite(Buffer);
Label2.Text = "Download Complete";
}
<asp:Button ID="DownlFile" runat="server" Text="Download The File"
OnClick="DownlFile_Click" />
<br /> <br />
<asp:Label ID="Label2" runat="server" Text=""></asp:Label>
|
|
|
|
|
You can't do that. Either set the type to a file download ( in which case it will pop up an open/save dialog, or otherwise, you're writing a PDF to your page, in which case, you're showing a PDF, which will replace any HTML, and you shouldn't be generating any. I do a response.End after code like this.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
|
Hello people!
I'm using the function SHGetFileInfo from shell32.dll to get the icon handle for a normal file, but i don't know how to get the ghosted icon for a hidden file.
Anyone knows if there's a way to get the ghosted icon?
Thanks in advance
|
|
|
|
|
Is SFGAO_GHOSTED what you're looking for?
|
|
|
|
|
Well, I use IShellFolder::GetAttributesOf to find out if a file is hidden. The problem is that I don't know if there's an ghosted icon in the system imagelist, or if I have to make the ghosted effect for the icon myself.
|
|
|
|
|
This link might be of some use, the article has vb code but you can download or view online both C#/VB.
|
|
|
|