|
Hi,
try Process.Start("cmd.exe", args)
If that does not do what you want, have a look at ProcessStartInfo class and use Process.Start(psi)
|
|
|
|
|
|
I know d@nish was trying to get the same point across...
Blog link to be reinstated at a later date.
|
|
|
|
|
I have a DataGridView bound to a table in Sql Server CE. I'd like to filter results but I couldn't figure it out so far. I'm trying to use DataView RowFilter but I couldn't manage it to work. Could you please tell me what should I look for? Here's the code, auto-generated by VS.NET, to bind data:
this.gridRecords.DataSource = this.RecordsBindingSource;
this.RecordsBindingSource.DataMember = "Records";
this.RecordsBindingSource.DataSource = this.tempRecordsDataSetBindingSource;
this.tempRecordsDataSetBindingSource.DataSource = this.tempRecordsDataSet;
this.tempRecordsDataSetBindingSource.Position = 0;
this.tempRecordsDataSet.DataSetName = "TempRecordsDataSet";
this.tempRecordsDataSet.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema;
this.RecordsTableAdapter.ClearBeforeFill = true;
this.RecordsTableAdapter.Fill(this.tempRecordsDataSet.Records);
This is what I tried:
this.tempRecordsDataSet.Records.DefaultView.RowFilter = "Field = 1234567891";
|
|
|
|
|
Your idea of using DataView is correct. However when using view, don't bind the control to the original data table, bind it to the view.
The need to optimize rises from a bad design.
My articles[ ^]
|
|
|
|
|
Hi all,
Can any one guide me?
how to create crystal report using generic list ? (I am using .NET crystal report)
I have a list of class and using this list I want to create crystal report.
I want to create parameter fields of crystal report at runtime.
|
|
|
|
|
How can i know whether a report is printed that was displayed in the viewer?
Print event occurs when user clicks print button.
Printing can be canceled. so how do we know exactly whether the report was printed or not?
Kanchana
|
|
|
|
|
System.Printing namespace contains PrintServer , PrintQueue and PrintSystemJobInfo classes. Use those classes to find the correct job and then the job has several status properties including IsCompleted .
However, I'm a little bit suspicous about that property since if the actual printer has spooled the data I think it's removed from the queue and the job is marked as complete. However the printer may still be unable to print the job (running out of paper, power loss in the middle of printing etc.).
Mika
The need to optimize rises from a bad design.
My articles[ ^]
|
|
|
|
|
|
Hi All,
While learning unmanaged code i got few questions Please if anyone knows please let me know.
1. If i have unmanaged code like C or C++ in my C# application then who is going to compile this code ?
2. Can we have intermediate Language (MSIL) for unsafe code?
3. What compiler will do when we make true for "Allow unsafe code" setting in build option of configuration.
4. Which languages comes under unmanaged code ?
I gone through many articles on Web but couldn't got answer for these questions
modified on Tuesday, November 4, 2008 1:43 AM
|
|
|
|
|
Member 4554649 wrote: 1. If i have unmanaged code like C or C++ in my C# application then who is going to compile this code ?
You cannot have mixed languages in the same project. So, yes, you can have a C# project and a C++ project in the same solution. Seperate compilers would have to compile each project, depending on the language used in that project.
Member 4554649 wrote: 2. Can we have intermediate Language (MSIL) for unsafe code?
The question doesn't make sense. All managed code (C#, VB.NET, C++ CLI, ...) is compiled to MSIL, so yes, in all cases, you have MSIL code in unsafe code blocks. But, I don't think that's what you're asking.
Member 4554649 wrote: 3. What compiler will do when we make true for "Allow unsafe code" setting in build option of configuration.
This makes me wonder if you know what "unsafe" code is. An unsafe code block is just a block of code that uses pointers. Since pointer math and types cannot be verified safe at runtime, it's called unsafe code. The Unsafe keyword just tells the compiler that this section of code cannot be verified type safe, so it needs to relax it rules a bit in this section in order to successfully compile the code.
|
|
|
|
|
Thanks Dave,
Actually i got confused in Unmanaged and unsafe code.
Now things are clear in my mind but one thing that needs to be addressed
Unmanaged code means All languages like C,C++,Win API, VC++,VB 6
i.e languages which produces Native code when compiled for windows OS
Is it right ?
One more thing if in my application i have unmanaged code who is going to compile that code ?
|
|
|
|
|
Member 4554649 wrote: Unmanaged code means All languages like C,C++,Win API, VC++,VB 6
Yes, but...there are managed variants of c++ (called c++\cli). The Win API is a framework not a language. It is an unmanaged framework, but it can be called from either managed or unmanaged code. VB6 actually has the option to be compiled as unmanaged or managed code (called P-code in the case of VB6). It's int the project settings somewhere IIRC.
Unmanaged is anything that is compiled straight to machine code and runs directly on the system. Managed means it is compiled to an intermediate language (MSIL for c#, bytecode for Java, etc), and a runtime (like the CLR or JVM) is used to interpret that intermediate language and convert it to machine code as the program is running - This is called JIT compilation (Just In Time).
Member 4554649 wrote: One more thing if in my application i have unmanaged code who is going to compile that code ?
The compiler. GCC for c++ or the visual studio IDE for vc++. You can't mix managed and unmanaged code in the same project.
Simon
|
|
|
|
|
Hi all,
I have created an Excel 2003 AddIn project and created one Setup project also for install the AddIns in target machines. My setup contains the primary out put of the AddIn project. I just came to know some registery entries are required for successful installation. Can any one help me in creating setup project with necessary registery entries.
|
|
|
|
|
Stop cross posting.
Pick 1 forum most related to your question, and ask your question there, and only there. People won't help you any faster if you just post everywhere.
Post 1[^]
Post 2[^]
Post 3[^]
Post 4[^]
Simon
|
|
|
|
|
Hi,
In VS 2005 I am using Reflection to parse .Net System libraries. Using GetMembers(BindingFlags) returns some additional methods other what is defined in the interface/class in .Net system library. For filtering out I am using following BindingFlags combination
BindingFlags::Public | BindingFlags::Instance | BindingFlags::Static | BindingFlags::DeclaredOnly
I am trying to get the declared members in class/interface say for example System.Collection.ICollection which has following 4 members:
int Count { get; }
bool IsSynchronized { get; }
object SyncRoot { get; }
void CopyTo(Array array, int index);
However using GetMembers I get following 7 members:
int Count { get; }
bool IsSynchronized { get; }
object SyncRoot { get; }
void CopyTo(Array array, int index);
int get_Count();
bool get_IsSynchronized();
object get_SyncRoot()
I get extra 3 get methods corresponding to each property. How do I suppress or filter out these additional members?
~Manish
|
|
|
|
|
A property is just a declaration which specifies the get and set methods.
Either use GetMethods or take a look at the MemberInfo, theres a whole bunch of info exposed there that you can use for filtering.
|
|
|
|
|
Hi there
I would like to be able to stop all text in a ComboBox from being automatically selected when I tab into a it (it has DropDownStyle of DropDown).
Currently, I check for KeyUp event, and select the text I want to select, rather than the whole lot. This still has the effect of all text being selected temporarily until the tab key is released. Is there any way to suppress the SelectAll behaviour?
Thanks in advance
Paul
One day I want to be a code monkey. Right now, I'm more like a code amoeba...
|
|
|
|
|
Instead of using KeyUp, try wiring Enter or GotFocus event and deselecting the text.
The need to optimize rises from a bad design.
My articles[ ^]
|
|
|
|
|
Thanks Mika, GotFocus solved it. Enter occurs before the SelectAll, otherwise I would have used that. Never knew about GotFocus though, so awesome result!
Cheers
Paul
One day I want to be a code monkey. Right now, I'm more like a code amoeba...
|
|
|
|
|
You're welcome
The need to optimize rises from a bad design.
My articles[ ^]
|
|
|
|
|
Hello,
I am developing a client and server application for bluetooth devoce. My server is desktop PC which has dongle attached and client will be Windows Mobile. As client server get connected server will send to client list of some files. from the client side i should be able to download file means copying file from server to client. I am using sockes for eastablise connections. Now i have to send a file from server to client. How can i send a file? Please help me.
Thanks and regards,
Yudhisthira attry(India, Bangalore)
|
|
|
|
|
|
Hi,
i want to show the windows File Association form when user presses a button. I use the following code:
Imports System.Runtime.InteropServices
Public Declare Auto Function OpenWithDialog Lib "shell32.dll" Alias "OpenAs_RunDLL" (ByVal hwnd As IntPtr, ByVal hinst As IntPtr, ByVal lpFile As String, ByVal nShowCmd As Int32) As Int32
Private Sub button_ItemClick(...)
OpenWithDialog(Me.Handle, Marshal.GetHINSTANCE(Me.GetType().Module), "", CInt(AppWinStyle.NormalFocus))
End Sub
Well, it opens a similar form, the "Open With..." form, but i am not looking for the Open With... form. I imagine that i have to make 1-2 changes and after that then it will really open the File Association form(Set Association - Associate a file type or protocol with a specific program).
Any idea what i need to change on this so it work?
Thanks in advance
|
|
|
|
|