|
You could test one thing just in case:
- define both parameters as string and assign them
- put the string to clipboard
- paste the text to command prompt and execute it
If the pdf is opening, it's clear that the command is valid.
For example:
string filename = "\"C:\\Program Files\\Adobe\\Reader 8.0\\Reader\\AcroRd32.exe\"";
string arguments = "\"C:\\sourcedir\\somefile.pdf\"";
Clipboard.Clear();
Clipboard.SetText(filename + " " + arguments);
System.Diagnostics.Process.Start(filename, arguments);
Mika
|
|
|
|
|
Hi there.
How can we understand what in the clipboard is ?
|
|
|
|
|
|
Hi there guys.
I want to create a ListView with all columns' items selectable . (Win App)
I searched in ListView's properties but I couldn't find anything special to do that.
Can you help me ?
modified on Tuesday, August 12, 2008 4:38 PM
|
|
|
|
|
Mohammad Dayyan wrote: I want to create a ListView with all columns' items selectable .
First things first. Is it a Windows App or a Web App?
|
|
|
|
|
|
What do you actually mean by saying "all columns items selectable".
Do you want to see the entire row as selected instead of just the first column when clicking a row or do you want to select each cell separately on one row or something else?
|
|
|
|
|
OK. Thanks.
I want to select this[^]item in second column in my ListView.
But I couldn't.
Now Do you understand what I mean ?
|
|
|
|
|
Ok I see,
As far as I know it's not possible to select a cell in a second column in ListView. The only options are:
- select the first cell
- select the entire row
What I would suggest is that you use DataGridView instead. It's a little bit more complicated than ListView, but on the other hand it gives you very much flexibility (better visualization for each column, frozen columns, data editing in every cell and so on).
Hope this helps,
Mika
|
|
|
|
|
Mika Wendelius wrote: As far as I know it's not possible to select a cell in a second column in ListView. The only options are:
- select the first cell
- select the entire row
That's too bad.
Thank you Mika for reply.
|
|
|
|
|
You're welcome
|
|
|
|
|
Mika Wendelius wrote: - select the entire row
Excuse me.
Can you tell me how I can do it ?
|
|
|
|
|
Set FullRowSelect -property to True .
Mika
|
|
|
|
|
|
Glad to help you
|
|
|
|
|
Hi guys, I want to build a class either from Control or UserControl but I don't want to display it's parent properties (Control) inside the PropertyGrid control. I am wondering if there is any easir solution rather than just overriding the parent properties.
Thanks
|
|
|
|
|
Hi,
As far as I know, there's no easier way to do this. Also simply overriding isn't enough but you must also apply BrowsableAttribute.
If you are trying to make your own properties more easy to find in Properties window, you could use CategoryAttribute to create your own category where your properties are shown. But don't know if this is what you're trying to achieve.
Mika
|
|
|
|
|
Actually, I created my a custom button that is derived from the Button class. I just want to display properties that are only defined in my custom class. Currently, it shows all, offcourse.
It could have make my life very easir if there is a way to do.
|
|
|
|
|
What is the difficulty if all properties are shown? Finding only the ones you actually neeed (=your own properties)?
|
|
|
|
|
It's becuase, I do'nt want to display all the properties in my application. Let's say, you have a Rectangle class and it's has the following properties
Width, Height
Color
Name
So, why would you want to display all the Control properties inside the PropertyGrid.
Another way way i was thinking is to create a data class that olds only the properties and populate the my custom object through that class. And also assign that data class to the PropertyGrid.
The bigggest problem will be that for each (Control object) I will have a data class. So, by extending my above example. I created a Field, Player Control(FieldControl.cs, PlayerControl.cs) classes I'll have to have FieldDataClass.cs,PlayerDataClass.cs.
if so do you think this may be led me into problems?
I appreciated your answers. Thanks
|
|
|
|
|
You're welcome.
netJP12L wrote: I do'nt want to display all the properties in my application
So is this actually a run-time problem, not design time? i.e. you're using property grid in your app to let user modify properties?
|
|
|
|
|
yes that's right. Is there any advice you would like to suggest for my design
|
|
|
|
|
Based on the info in your posts I would use data classes as you thought instead of controls directly. It keeps the solution more simple and maintainable. Also use inheritance wherever applicable along with interfaces. Especially if you have common logic based on properties using interfaces and extension methods could be powerful.
Mika
|
|
|
|
|
|
Hello,
I have two versions of a software (let's say, 1 and 2), and version 2 needs to import user settings from version 1, which is stored in the Isolated Storage. The two versions have different Strong Names, resulting in two different folders in the isolated storage.
How can I, in version 2 of the application, obtain access to the isolated storage of version 1?
I've found this method that seems hopeful,
http://msdn.microsoft.com/en-us/library/dwc9b5sy.aspx#Mtps_DropDownFilterText[^]
However, I can't find any examples of how to create domainIdentity and assemblyIdentity objects.
Thank you for your time.
|
|
|
|