|
Thanks
|
|
|
|
|
Vista doesn't allow writing to the root directory; get a better operating system (XP).
Better yet, store application data in the application data directory.
|
|
|
|
|
Trouble with storing in the application directory is then you have to have the user browse to where he stored the application so you can pick up the path. Better than random locations on C I suppose.
|
|
|
|
|
The application data directory.
|
|
|
|
|
Hello everyone,
I need to call a function that needs arguments from a COM object using the IDispatch interface. I have been able to call functions that does not need parameters and to get values from properties of the COM object using the Invoke function of the IDispatch interface. However, I am unable to call a function with parameter using the Invoke function of IDispatch. I believe it is because I don't set in the proper way the value "rgvarg" of the DISPPARAMS structure that must be passed to the invoke function to represent the arguments that must be passed to the object function. DISPPARAMS.rgvarg is expecting a IntPtr that represent an array of objects.
Does anyone have done this?
Here is a sample code of my program.
Type tSWApp = Type.GetTypeFromProgID("SldWorks.Application");
object swApp = Activator.CreateInstance(tSWApp);
IDispatch idisp = (IDispatch)swApp;
Guid guid = new Guid();
int[] nIds = new int[] { 0 };
nRetVal = idisp.GetIDsOfNames(ref guid, new string[] { "Visible" }, 1, 0, nIds);
DISPPARAMS dispParams = new DISPPARAMS();
dispParams.cArgs = 0;
dispParams.cNamedArgs = 0;
object pVarResult;
System.Runtime.InteropServices.ComTypes.EXCEPINFO excepInfo = new System.Runtime.InteropServices.ComTypes.EXCEPINFO();
nRetVal = idisp.Invoke(nIds[0], ref guid, 0, (ushort)System.Runtime.InteropServices.ComTypes.INVOKEKIND.INVOKE_PROPERTYGET, ref dispParams, out pVarResult, ref excepInfo, null);
object[] oArgs = new object[]{ 10 };
nRetVal = idisp.GetIDsOfNames(ref guid, new string[] { "GetUserPreferenceIntegerValue" }, 1, 0, nIds);
dispParams.cArgs = 1;
--> dispParams.rgvarg = ???; <-- Here, I must provide a IntPtr object that represent the array "oArgs" defined above.
dispParams.cNamedArgs = 0;
dispParams.rgdispidNamedArgs = new object[] { };
nRetVal = idisp.Invoke(nIds[0], ref guid, 0, (ushort)System.Runtime.InteropServices.ComTypes.INVOKEKIND.INVOKE_FUNC, ref dispParams, out pVarResult, ref excepInfo, null);
Thanks!
|
|
|
|
|
|
Hey guys,
I'm writing a windows application which is going to be run on a local server and accessed by around 5, 10 clients.
I'm using visual studio 2008 + SQL Server 2005
I wanted to get some tips before I start coding, like how to figure out sqlserver connection should I use IP or server name what is best method of configuring the database, cause this isn't meant for one place and I don't want to customize it every time I want to install it in a new place.
and also any other hint that might come handy in the future, if u got any links, tutorials, etc that would be great.
Thanx
K1
|
|
|
|
|
mrkeivan wrote: should I use IP or server name
Either will work.
mrkeivan wrote: if u got any links, tutorials, etc that would be great.
How about this one, www.codeproject.com
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Your questions aren't really answerable because the "best" solution depends entirely on how your app is designed, what it's supposed to be doing, your data model, how you want to handle concurrency issues, ... You're asking about coding when you haven't even sat down and layed out the requirements for the app yet.
|
|
|
|
|
that is exactly what I'm looking for, up to now I have always worked on win application on single computer, this is my first experience with app on network, if u ve got any articles, sites or anything that can guide me, that would be superb.
regards,
|
|
|
|
|
|
hi every one in world of codeproject !
Q) How can i add datagridview in a special column of another datagridview?
for exp:
i wanna to add another datagridview to dgvTell.columns[0] :
something like this :
dgvTell.columns.Add(another datagridview);
efrew
|
|
|
|
|
Um, you could try doing a google/bing/whatever search for "Nested Datagridview".
That will even give you the codez.
|
|
|
|
|
Class not Registered (Exception from HRESULT:0x80040154(REGDB_E_CLASSNOTREG))
how should i solve this...
|
|
|
|
|
You can start here[^]
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Hi all,
Sorry for the inconvenience but it seems that Google can't help me out here.
I have a Textbox in a windows form in which the property 'accepts tab' has been set to true.
When pressing the tab key it works as expected, the cursor moves forward.
However when pressing shift + tab the cursor also moves forward instead of the expected backward.
Does anyone have an idea as to why this happens?
Thx in advance,
Jeff
|
|
|
|
|
Have you checked your tab order?
You should never use standby on an elephant. It always crashes when you lift the ears. - Mark Wallace
C/C++ (I dont see a huge difference between them, and the 'benefits' of C++ are questionable, who needs inheritance when you have copy and paste) - fat_boy
|
|
|
|
|
Hi OriginalGriff,
Thx for the swift reply.
Yes I have checked the taborder, but it actually has little to do with tab order.
The behaviour that I would like to see is to be able to tab text forward and backward.
It's not about going to the next control. It's more about using the tab as indentation and then be able to increase or decrease the indentation of the selected text as well as indenting a new line in a multiline textbox.
Greetz and thx,
Jeff
|
|
|
|
|
Sorry - my bad! I misread your original question.
Don't know about Shift+Tab in a textbox, never needed to try it... Good luck!
You should never use standby on an elephant. It always crashes when you lift the ears. - Mark Wallace
C/C++ (I dont see a huge difference between them, and the 'benefits' of C++ are questionable, who needs inheritance when you have copy and paste) - fat_boy
|
|
|
|
|
That's default behaviour of textbox control
============================================
The grass is always greener on the other side of the fence
|
|
|
|
|
This is how TextBox and RichTextBox are supposed to behave. You've probably noticed the alternate custom behavior in, say, Visual Studio or MS Word. To implement this, you'll have to capture SHIFT+TAB and implement it yourself.
|
|
|
|
|
I have a C# CGI app that I have to modify so that it can accept file uploads from (company internal) web users. The app currently only expects 'regular' form data (ie, text name/value pairs).Can anyone point me to something that tells how to handle the file contents?
I've got the HTML form set up as a POST with 'enctype="multipart/form-data"', but I don't know how to handle the multipart form content on the server side. Currently, the app just uses 'Console.In.ReadToEnd()' to get the form contents and then splits the resulting string on '&' to get each name/value pair, and then splits those on '=' to get each name and value. Obvisouly, that doesn't work for multipart/form-data.
Any suggestions? And no, rewriting the app in ASP.NET is not an option currently.
Dave
|
|
|
|
|
hi,this is sudhir.i am doing a call center project software using c#.everything is complete.the main thing is to attain call from customer through software and also make call to customer.hows it possible?please give me some idea how to implement this features in my project.its important.
|
|
|
|
|
sudhir behera wrote: call center project
sudhir behera wrote: everything is complete
sudhir behera wrote: call from customer through software and also make call to customer
sudhir behera wrote: how to implement this features
Is it just me?
DaveIf this helped, please vote & accept answer!
Binging is like googling, it just feels dirtier. (Pete O'Hanlon)
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
|
|
|
|
|
Nope, I think I saw something similar a couple weeks ago... and I will reply the same, if you don't know how to do it, I'll be more than happy to do it for you... I can send you my rates if you're interested
I want to die like my grandfather- asleep, not like the passengers in his car, screaming!
|
|
|
|