|
yes i think i need to build my own custom control for this... thanks for the input...
regards
sudhir
|
|
|
|
|
Even if you hide the Control Panel, user can always manually travel to the folder location and save files there. Hence, hiding control panel is not going to solve your problem.
All I can suggest is to create your own control and do not let user select the folder you dont want to.
Time is the best teacher; unfortunately it kills all of its students.
जय हिंद
|
|
|
|
|
yes i think i need to build my own custom control for this
regards,
sudhir
|
|
|
|
|
what about error handling after the dialog is confirmed?
you can check the directory, if its one you dont what to use then inform the user and display the folderbrowsedialog again
If only MySelf.Visible was more than just a getter...
A person can produce over 5 times there own body weight in excrement each year... please re-read your questions before posting
|
|
|
|
|
yes now i am doing that only as i want to avoid user saving the files in administrator tools folder, i am checking is he selected theat folder and if yes then i am showing him a msg telling he cant save there...
thanks anyway...
|
|
|
|
|
Hi,
How can word document pages convert to jpeg?
Thankyou
Yesuprakash
|
|
|
|
|
It is not easy.
One idea would be:
-open the document, using Microsoft.Office.Interop.Word .
-select the active document, word.ActiveDocument.Select()
-copy current selection, word.Selection.CopyAsPicture()
-get the Image by calling Clipboard.GetImage()
Calin
|
|
|
|
|
With opening the word file i want to get the images of all pages.Is it possible
Thankyou,
Yesuprakash
|
|
|
|
|
Document.Select() selects the entire document, so basically, you will copy the entire document.
Calin
|
|
|
|
|
Hi I am writing a small program , I need to find the application data folder which exists in c:\documents and settings folder. I need to know the exact path, if the user has installed the windows in d:\ then it should look at d:\. Even if I could know the windows installation drive then I think it would help ? I got some code in VB but i cannot use it in csharp . Any suggestions would be appreciated.
//************************************************************
Public Function GetTheWindowsDirectory() As String
Dim strWindowsDir As String ' Variable to return the path of Windows Directory
Dim lngWindowsDirLength As Long ' Variable to return the the lenght of the path
strWindowsDir = Space(250) ' Initilize the buffer to receive the string
lngWindowsDirLength = GetWindowsDirectory(strWindowsDir, 250) ' Read the path of 'the windows directory
strWindowsDir = Left(strWindowsDir, lngWindowsDirLength) ' Extract the windows 'path from the buffer
GetTheWindowsDirectory = strWindowsDir
//*********************************************
The above is the code for vb.net
Thanks
|
|
|
|
|
Hi,
The Environment class in the System namespace contains methods to get all of this info.
The GetFolderPath method is especially useful.
Alan
|
|
|
|
|
Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
|
|
|
|
|
The APPDATA environment variable.
string filename = System.Environment.ExpandEnvironmentVariables ( "%APPDATA%\\myfile.txt" ) ;
(If I recall correctly.)
|
|
|
|
|
Hi friend
I am having a problem with passing a button and form to a method.
Let me explain detail.when i click a button it will send some this button and a form to a method. The method then do some job. like
private void btnEducationNFinance_Click(object sender, EventArgs e)
{
showForm(button1, i , formName); //Any Wrong ?
}
public void ShowForm(.......) // I need this declearation
{
form1 frm = new formName);
frm.show();
}
Thanks
|
|
|
|
|
hmmm... if your hardcoding the function call why dont you just create an instance of the form you want to show?
When would a button click open different forms?
If only MySelf.Visible was more than just a getter...
A person can produce over 5 times there own body weight in excrement each year... please re-read your questions before posting
|
|
|
|
|
I can easyly do this but then I have to write 100 line of code.
If I can get work by this method, it will tak eonly 10-20 lines.
Thanks. 
|
|
|
|
|
|
Please, use normal English in here. I myself are not best at english, but please don't use msn/sms- language in here....
U... this is a letter in the alphabet.
You... this is a word which you can see as a pointer to a person you refer to.
|
|
|
|
|
sorry
OKay im again trying to make you understnd.
I want to pass an form object to a method.
Exmp:
I have a form form1.
public void btnClick(object sender, EventArgs e)
{
showForm(formObject);
}
showForm(......)\\ is there any way to catch it here)
{
formObject frmObj = new formObject(); \\ If there has any way then will it work
}
Thanks
|
|
|
|
|
The comment wasn't for you, but for Prajeesh.
But to help you with your problem. You can just do this with a normal parameter.
public void btnClick(object sender, EventArgs e)
{
showForm(formObject);
}
public void showForm(Form myForm)
{
myForm.Show();
}
If this is not what you mean, then you have to specify the problem slightly better.
|
|
|
|
|
Im afried sorry.
Actually I mean a form object passing to method.
By that I can create instance of that object in that method.
Exml:
void showForm( catch the form object)
{
objectName frm = new objectName();
}
public void button_click(..)
{
showForm(formObject);\\ formObject is a type by this i can creat form instance.
}
If you cant get inform me.
Thanks 
|
|
|
|
|
I'm sorry, but I've never seen such thing working.
But what's the difference of doing it your way or doing it this way:
void showForm( Iobject obj)
{
}
public void button_click(..)
{
showForm(new formObject());
}
Add an interface to your class so you can use different kinds of classes.
I think your problem is solved by this.
|
|
|
|
|
Hahaha
Okay may be im talking stupid but i need it now
Ya i think i have the ans.
Thanks
|
|
|
|
|
Let's see if I understood what you mean.
You want to pass to the showForm method the type of form to show and then show the kind of form desired.
If it's so, you can use reflection in the following way:
void ShowForm(Type formType)
{
Form frm = Activator.CreateInstance(formType) as Form;
if (frm != null)
{
frm.Show();
}
else
{
}
}
Is this what you wanted to do?
modified on Friday, February 27, 2009 11:14 AM
|
|
|
|
|
it is interesting..
Thanks
I will try it later.
|
|
|
|