|
And dont forget to dispose the old font if you use that approach.
|
|
|
|
|
Hello,
here is another ,its much easier but its only when you are using (RichTextBox).
add your items to the ComboBox (1,2,3,4,5)
it actually means 1x,2x,3x,4x,5x.
Code:
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
richTextBox1.ZoomFactor = float.Parse(comboBox1.Text);
}
try it
Regards Hamza
|
|
|
|
|
Hi all,
I am using .Net framework 1.1 and i want to download files from FTP using C#. Anybody can please tell how to do this?
Pravin
|
|
|
|
|
|
Amazingly, Google provided a result...
"The hand icon was added to mimic the standard Win32 constants allowed by the API. However the hand icon in Windows is from the Win3.x days and maps to the stop sign in all current versions of Windows."
He who makes a beast out of himself gets rid of the pain of being a man
|
|
|
|
|
This adds 10 points for recursive re-use-ability, Win3.x to Win Vista!
Do rate the reply, if it helps or even if it doesnot, because it helps the members to know, what solved the issue. Thanks.
|
|
|
|
|
hi
Can you plz tell me how can i use visual web developer and develop a website in c# or vb.net?Any reference on this topic.
plz reply at delhi_egle@yahoo.co.in
thanks in advance
|
|
|
|
|
how can i hide the maximize and minimize box of mdi child form...but i want to show the X (close button) of a mdi child form....and another problem is....
how can i use the Window toolstrip menu item in C# to show the selected (opened)form choosed by user....hope u got the problem...plzzzz someone help
|
|
|
|
|
Use these properties
MaximizeBox
MinimizeBox
ActiveMdiChild
Eslam Afifi
|
|
|
|
|
And DON'T double post, be patient and wait for someone to answer.
He who makes a beast out of himself gets rid of the pain of being a man
|
|
|
|
|
Neetu Maheshwari wrote: how can i use the Window toolstrip menu item in C# to show the selected (opened)form choosed by user....hope u got the problem
Ex for windows menu[^]
|
|
|
|
|
hello
i m having a mdi parent form and 4-5 mdi child form..on click of a toolstripmenuitem i write this code..
AdminInfo ad1 = new AdminInfo();
ad1.MdiParent = this;
ad1.WindowState = FormWindowState.Maximized;
ad1.MaximizeBox = false;
ad1.MaximizeBox = false;
ad1.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
ad1.Size = new Size(1032, 800);
ad1.StartPosition = FormStartPosition.Manual;
ad1.Location = new Point(0, 0);
ad1.Show();
and on other toolstripmenuitem..i call another form
in the menuitem toolstrip it shows three button(Minimise, restore and close)
the problem is this..when i click on restore button(from new buttons)..its size increased very much..and its minimize and close and maximize box is not shown and even other form's too...so i m not able to close these child forms...i hav to close the application..plz..someone help..how to hide the restore and minimize box from mdi child form
modified on Wednesday, February 20, 2008 1:48 AM
|
|
|
|
|
Dear friends,
I intend to use LinkLabels in my project. But I am toally jumbled with it because I am not getting the exact place where the actual link should be stored. I studied its properties like LinkArea, LinkData, Links and Link types. But I am totally entangled with it.
I want to display a text and underlying link and connect it to webbrowser. the later part is easy coz' I know LinkLabel's event to handle. But Plz help me with above problem.
Thanks in Advance..
|
|
|
|
|
Hello,
The following might help you in achieving the desired:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace WindowsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
this.linkLabel1.Text = "Register Online. Visit Microsoft. Visit MSN.";
if (this.linkLabel1.Text.Length >= 45)
{
this.linkLabel1.Links[0].LinkData = "Register";
this.linkLabel1.Links.Add(24, 9, "www.microsoft.com");
this.linkLabel1.Links.Add(42, 3, "www.msn.com");
}
}
private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
string target = e.Link.LinkData as string;
if (null != target && target.StartsWith("www"))
{
System.Diagnostics.Process.Start(target);
}
else
{
MessageBox.Show("Item clicked: " + target);
}
}
}
}
Regards,
Dave
Dave Traister
Software Engineer
ComponentOne LLC
www.ComponentOne.com
|
|
|
|
|
Thank You Sir. The code snippet you gave worked perfectly fine.
So finally the "linkdata" is the attribute where we've to add the actual link.
|
|
|
|
|
Chaitanya Joshi wrote: I am not getting the exact place where the actual link should be stored
I am not getting what you are saying ? Are you facing difficulty in opening a web page when link button is clicked ? Use Process.Start to start a new browser and also send URL to be opened.
|
|
|
|
|
i am having a config file and defines list of ports,what i want is if i am request for web page(http) or any other port, then i want to note the request time for any port defined in config file.
|
|
|
|
|
Hi All,
I have a RichTextBox and two buttons placed on the windows form. Where user can type the text he wants, and inserts any picture by clicking "insert picture" button. Whenever he clicks the "EXPORT" button, i want to retrieve all the text from the Richtext box to a string variable. Now, my problem is that, i can save the text but if there is any picture inserted in the message, it is indicating as "space" in the text. I want to insert a special character ( like any character between 127 - 255 in ascii table) in the place of that picture. How could I do that?
could any one please guide me.. I'm really lost in this issue since 3 days!
Here i'm posting my code here!:
pic = ImageSelect.pbSelected[i].Image;
InsertImage(pic);
private void InsertImage(Image pic)
{
Bitmap myBitMap = new Bitmap(pic);
Clipboard.SetDataObject(myBitMap);
DataFormats.Format myFormat = DataFormats.GetFormat(DataFormats.Bitmap);
maskedTextBox1.Paste();
if (richTextBox1.CanPaste(myFormat))
{
richTextBox1.Paste(myFormat);
}
else
MessageBox.Show("cannot paste");
}
private void btnExport_Click_1(object sender, EventArgs e)
{
//richTextBox1.SaveFile("D:\\b.txt");
strMessage = richTextBox1.Text;
MessageBox.Show(strMessage);
}
Thanks,
Durga.
Strength is life, Weakness is death.
--- Swami vivekananda
modified on Wednesday, February 20, 2008 1:57 AM
|
|
|
|
|
Hello everyone,
I am developing a module in C#.net3.0 on windows XP. I am downloading a file from the ftp server in asynchronous mode. Before the download completes, i am doing another Async download of another file by again creating the object of WebClient with the same name.
I am handling the downloadFileCompleteEventHandler(Object sender, AsyncEventHandler e). Now i want to see which file download has raised this event handler. For this, i think i have to send file name as parameter to this downloadFileCompleteEventHandler(Object sender, AsyncEventHandler e) method.
My code snippet is as follows:
private void FtpToStagingServer(String spotID, Int32 Ctr)
{
//DOWNLOADING TO LOCAL DATABASE SERVER
WebClient ccftp = new WebClient();
try
{
//Download from Clearcut Server
ccftp.Credentials = new NetworkCredential(Username, Password);
Uri CcFtp = new Uri("ftp://"+HostIp+"/Assets/"+spotID+".mpg");
ccftp.DownloadFileCompleted += new System.ComponentModel.AsyncCompletedEventHandler(ccftp_DownloadFileCompleted);
ccftp.DownloadFileAsync(CcFtp, "C:\\AWS_FilesDownloaded\\"+spotID+".mpg");
tAssetId = spotID;
}
catch (WebException wes)
{
}
catch (Exception es)
{
}
// throw new Exception("The method or operation is not implemented.");
}
void ccftp_DownloadFileCompleted(object sender, System.ComponentModel.AsyncCompletedEventArgs e)
{
//Transfer the downloaded asset from Clearcut server to the Staging server/
MessageBox.Show(" Ftp from clearcut to local drive completed");
WebClient ssFtp = new WebClient();
try
{
ssFtp.Credentials = new NetworkCredential("abc", "abc123");
ssFtp.UploadFileCompleted += new UploadFileCompletedEventHandler(ssFtp_UploadFileCompleted);
ssFtp.UploadFileAsync(new Uri("ftp://somehostIpwith path/"+ tAssetId+".mpg"), "C:\\AWS_cc_download\\" + tAssetId + ".mpg");
}
catch (WebException wes)
{
}
catch (Exception es)
{
}
//throw new Exception("The method or operation is not implemented.");
}
I am trying it by taking a temporary global variable to hold the filname, but it is of no use.
Could you please help me in this.. by giving required c#.net links or sample code.
Thank you
Anee
|
|
|
|
|
Hello everyone,
I am working on C#.net(3.0) in windows XP platform. I have a two different servers with FTP in it.
I am developing a module in the above technology, in which, without i have to transfer a file from one FTP server to another FTP server, without using the local system.
Now, i am downloading required file from the FTp-server1 to local system and then, from the local system i am uploading it to the other Ftp-server2. But, i want to do file transfer directly from the ftp-server1 to the ftp-server2, without using local system.
could you please give me some hint or the required links that can help me in doing this.
Any help is greatly appreciable.
Thanks
Anee
|
|
|
|
|
suppose in my win application there is a variable which holds some text data or image binary data. i want to print that text or image by printer. so please tell me how can i send instruction to a printer as a result printer can print my text data or image data.please help me with sample code.
tbhattacharjee
|
|
|
|
|
Hello tbhattacharjee,
You would need to work with Win32 spooler functions. The link below shows how you can use them:
http://support.microsoft.com/kb/322091
Regards,
Dave
Dave Traister
Software Engineer
ComponentOne LLC
www.ComponentOne.com
|
|
|
|
|
suppose i have create one win application there is one SDI form and that form has a one button and may have other controls too.so i want that when i will click on that button then the inner portion of the form along with all the controls placed on the form will be save as.gif image in a file system excluding form's title bar.
please also tell me in case of MDI how to save look of the SDI form just clicking on the MDI menu like same way above one.
please help me with sample code in VS2003 version.
tbhattacharjee
|
|
|
|
|
Hello Friends,
I am Developing an C#.NET windows application in this i require to save text written on textbox or label as a image it may be in any format like JPG, BMP.
Means whatever text written in textbox will as it is in image format.
|
|
|
|
|
1.) Create a Bitmap with the dimension of your output-control.
2.) Create a Graphics-object for this bitmap
3.) Use the Graphics-object, the font of your control and the text of this control to render the text to the Graphics-object via it's DrawString method.
4.) Use the .Save Method of the Bitmap to save it to the desired image file
|
|
|
|