|
u can send the value of textbox from first form to second form
by sending it through second forms constructor
rahul
|
|
|
|
|
|
I have a list view control.
Say, if i drag a word document from windows and drop it on the list view control. can i get the file name with path.
Is is possible to get the details?
By what way i can acheive it??
thanks in advance..
|
|
|
|
|
Yes off-course.
Handle the drag-drop event of the dropdown
and use the following code
if (e.Data.GetDataPresent(DataFormats.FileDrop))
{
file = (string[])e.Data.GetData(DataFormats.FileDrop);
}
file is a string array
that will be filled with the filenames with their paths.
Regards,
Everyone is a genius at least once a year - Pramod
|
|
|
|
|
thank you pramod.
I am still facing some problems....
i enabled the allow drop property of that list view control.
and when i drag an item from the desktop to that control nothing is happening.
tht particular event is not firing...
any idea what i have to do next.... plzz
thanks again...
|
|
|
|
|
one thing u need to do
is handle the drag-enter event and write the following line
e.Effect = DragDropEffects.Copy;
Regards,
Everyone is a genius at least once a year - Pramod
|
|
|
|
|
thank u.... its perfect.........
thank u.... on the track again.......
|
|
|
|
|
how to add columns to datagrid form its property??
sikandar
|
|
|
|
|
Hi,
right click the grid you will get property builder as one of the options.
in that property builder u will add the columns that is present in the available list. hope its helpful for you.
-- modified at 3:25 Tuesday 29th August, 2006
sivamyneni
|
|
|
|
|
THERE IS NOTHING IN IT
sikandar
|
|
|
|
|
Hi,
I think u didnt get my point.In property builder u have 5 fields they are general,columns,paging,format,borders. in the columns option u will add the columns of ur choice. hope u got me
sivamyneni
|
|
|
|
|
Hi all,
I want to insert a folder path as a link in the RIchtextbox,
so when the user clicks on that link the folder should be opened.
I have set this using the "file" protocol but
the folder path is c:\Documents and settings\
here when i handle the linkclicked event
and try to get the path from the e.linktext property
i only displays "c:\Documents"
i.e. only upto the first space character.
How do i get rid of this?
Thanks & Regards,
Everyone is a genius at least once a year - Pramod
|
|
|
|
|
Hello
AFAIK URLs don't support actual spaces. You'd have to substitute spaces with "%20".
eg.
Documents and settings => file:///C:\Documents%20and%20Settings
If you can change the text -not the link- it won't matter as long as the link itself goes without spaces.
Regards
|
|
|
|
|
Thanks for the quick reply,
When i use the "%20" to replace with the spaces in the path,
The following is displayed "file:///c:\Documents%20and%20settings\foldername"
and the link does not open, it gives and error.
i don't want the word "file" to be displayed as well
the link should look like
C:\Documents and settings\foldername
how do i do that?
Thanks & Regards,
Everyone is a genius at least once a year - Pramod
|
|
|
|
|
Hello
Yadav Pramod wrote: it gives and error.
What is the error message?
Yadav Pramod wrote: how do i do that?
It's possible, but I don't think it's worth it!! It will take some effort.
1- Make a LinkLabel object and initialize it.
2- Add it to MyRichTextBox object.
3- Set it's location according to your text -don't worry about scrolling-.
4- Handle the LinkLabel's own click event rather than the RichTextBox's event.
Sample code:
LinkLabel MyLink;
private void Form1_Load(object sender, EventArgs e)
{
MyLink = new LinkLabel();
MyLink.Text = "This is a link";
MyLink.Links.Add(0, MyLink.Text.Length, @"file:///C:\Documents%20and%20Settings");
MyLink.Click += new EventHandler(MyLink_Click);
MyRichTextBox.Controls.Add(MyLink);
}
void MyLink_Click(object sender, EventArgs e)
{
Process.Start(MyLink.Links[0].LinkData.ToString());
}
I hope this helps!!
Regards
|
|
|
|
|
Thanks, but i have used a "_" (underscore) character.
and later replaced it with a space while opening the link,
BUt how do i remove the file keyword?
Thanks & Regards,
Everyone is a genius at least once a year - Pramod
|
|
|
|
|
Hello
Well, Mav did that one for you. If his article work, it's solved!
Regards
|
|
|
|
|
Hi!
Take a look at this article[^]
Regards,
mav
--
Black holes are the places where god divided by 0...
|
|
|
|
|
Hello
iam of student of BS compSc ,im working on my final project that is"Histogram-Based Fuzzy Filter" trying to implement research paper, but i m facing alot of problem do not know how to encode in C#,
i have done some work on image like conversion of rgb image into grayscale ,and also draw its histogram but no succes towards implementing this papper,
i have to complete this project in a 15 days
plz help me
-- modified at 1:50 Tuesday 29th August, 2006
|
|
|
|
|
Hello
Your title was quite clear in stating that you are facing a problem with images -and this is the C# forum BTW. Welcome -
Yet, your post itself didn't specify what exactly are you stuck with??
Asma Saleem wrote: i m facing alot of problem do not know how to encode in C#
At All?!! And what exactly are you expecting??
Asma Saleem wrote: plz help me
We realy want to help -that's why we are here after all-, but how??
Regards
|
|
|
|
|
plz help in converting code from matlab to C#, i m sending u code as i told im working in image processing , ihave done all work in matlab but now i hve convert it in to C# Code is below
%Reading image file and storing it in a variable.
imagex=imread('D:\MS_courses\ece655\Project\test_images\test_image3.jpg');
%RGB2GRAY converts RGB images to grayscale by eliminating the
%hue and saturation information while retaining the luminance.
%im2double takes an image as input, and returns an image of class double.
f = im2double(rgb2gray(imagex));
%f=[.1,.2,.3;.4,.5,.6;.7,.8,.9];
%Storing the number of rows and columns in separate output variables
[sizeM, sizeN] = size(f);
%Counter is used just to check the status of the program at all times.
counter = 0;
%for k=1:1:256
%gvalue_f(k) = 0;
%gvalue_N(k) = 0;
%end
%--------------------------------------------------------------------------
%This loops makes a window of 3*3 and scans over the image from left to
%right and top to bottom to get those pixel values that are most probably
%a function of Impulse, called Nimp.
for x=2:1:(sizeM-1)
for y=2:1:(sizeN-1)
k = x;
l = y;
x1 = f(k-1, l-1); x2 = f(k-1, l); x3 = f(k-1, l+1);
x4 = f(k, l-1); x5 = f(k, l); x6 = f(k, l+1);
x7 = f(k+1, l-1); x8 = f(k+1, l); x9 = f(k+1, l+1);
W = [x1,x2,x3,x4,x5,x6,x7,x8,x9];
x_sum = 0;
count = 0;
x_temp = 0;
wind(1,1) = W(1);
wind(1,2) = W(2);
wind(1,3) = W(3);
wind(2,1) = W(4);
wind(2,2) = W(5);
wind(2,3) = W(6);
wind(3,1) = W(7);
wind(3,2) = W(8);
wind(3,3) = W(9);
for m=1:1:3
for n=1:1:3
x_temp = wind(m,n);
if((x_temp == min(W)) | (x_temp == max(W)))% | (x_temp <= 10) | (x_temp >= 230))
Nimp_sub(m, n) = x_temp;
else
count = count + 1;
x_sum = x_sum + x_temp;
Nimp_sub(m, n) = 0;
end
end
end
%Nimp=size(f);
Nimp(k-1:k+1,l-1:l+1) = Nimp_sub;
counter = counter + 1
end
end
%---------------------------------------------------------------------------
%for k=2:1:sizeM-1
% for k=2:1:sizeN-1
% gvalue_f(f(k, l)) = gvalue_f(f(k, l)) + 1;
% Nimp_db = im2uint8(Nimp(k, l)) + 1;
% gvalue_N(Nimp_db(k, l)) = gvalue_N(Nimp_db(k, l)) + 1;
%end
%end
%Calculating the histograms of input image and Nimp (those pixels in the image
%which are most probably members of impulse noise).
temp_hist_f = hist(f, 256);
temp_hist_imp = hist(Nimp, 256);
for i=1:1:256
hist_f(i) = sum(temp_hist_f(i, );
hist_imp(i) = sum(temp_hist_imp(i, );
end
imshow(imagex);
title('Original Image');
figure;
imhist(imagex);
title('Histogram of Noise Added Image');
figure;
imhist(f);
title('Normalized Histogram of Noise Added Image');
figure;
|
|
|
|
|
Hello
I've never worked in Matlab -I'm a C++, C# developer-, so the code above is very unfamiliar. Yet I can get a grasp of what you are trying to do.
One Question:
Did you ever program in C#??
If you're asking someone to build your program from the scratch!! It's highly unlikely to find him here!! Sorry!
Regards
|
|
|
|
|
Hello,
I am aware of that I can open a website using the following snippet using MS IE,
System.Diagnostics.Process.Start("iexplore", "http://www.google.com");
But I dont want to specify Internet Explorer, I want to open the link using any installed default website explorer of the user.
Would anyone please give me an idea.
Thanks
|
|
|
|
|
In .NET 2.0 you can do this....
Help.ShowHelp(this, "http://www.google.com");
Steve Maier, MCSD MCAD MCTS
|
|
|
|
|
Hello
You can also do that in .Net 1.0 and 1.1 frameworks. Simply don't specify your application:
Process.Start("http://www.google.com.eg");
This way you are telling the "Windows Explorer" to open this "Document" -whether it's a website, pdf, image, etc...-. Windows Explorer doesn't open anything by itslef, rather it opens the default viewer associated with this type of "Document". In our case it will open the default web browser.
BTW: I use FireFox. And it works!
Regards
|
|
|
|
|