|
Thanks a lot.
It was so simple just for example: SendKeys.Send("{UP}");
I think I have to parse my code now for cleaning all this dirty workarounds I made the last week.
Here I found a good list for the Symbols.
http://www.codeproject.com/cpp/sendkeys_cpp_Article.asp[^]
So again,
thanks a lot for your help and time,
Martin
|
|
|
|
|
hi
how can i auto install .net framework 2.0 and windows installer 3.0 if target system have not installed .net framework and windows installer 3.0
more :
i have a project that writed on c#.net 2005 !!!
please help me
|
|
|
|
|
Use NSIS [^]which will run on any system and you can use it as a bootstrapper for the actual installation.
Of course I'd say use NSIS from the start since you have complete control and it doesn't require anything special to run.
That's one way around it, I'm sure there are others.
You know you're a Land Rover owner when the best route from point A to point B is through the mud.
Ed
|
|
|
|
|
i add a custom action in my setup project for SQL MSDE but i don't know
the condition i write in the condition property.
the condition check if MSDE already exists don't setupo it else do
|
|
|
|
|
Hi there,
I'm looking for a .NET based sample application which is using the SkyWave
API functionality to get the tracking data (position data) from the SkyWave server.
Is there anybody here to know such this sample application?
I've asked it from SkayWave support center (support.skywave.com) but their supports are not too good.
Thank you in advance.
|
|
|
|
|
how con i check for the internet connection status changes?
every time the pc goes online/offline i want to make an action...
any ideas?
Thanks
VentoEngine corp.
Program your life ^^
|
|
|
|
|
See NetworkChange.NetworkAvailabilityChanged .
/ravi
My new year's resolution: 2048 x 1536
Home | Music | Articles | Freeware | Trips
ravib(at)ravib(dot)com
|
|
|
|
|
does it work if i have an usb modem? or a router?
VentoEngine corp.
Program your life ^^
|
|
|
|
|
|
Hello,
I am writing a windows form app using c#.
I would like to create a new data row in a regular c# class using the following code.
public void addWell()
{
DataRow row = new DataRow();
}
But I keep getting this error: "'System.Data.DataRow.DataRow(System.Data.DataRowBuilder)' is inaccessible due to its protection level"
Does anybody know how to change the protection level of the DataRow?
thanks!
rc
|
|
|
|
|
You can't instatiate a new DataRow object like that, it's constructor is protected and you can't do anything about that. If you want a new DataRow you must use your DataTable.NewRow() method which will return a new row that has been initalized with your tables schema (i.e. all the columns have been added).
|
|
|
|
|
that worked. thank you!!!
|
|
|
|
|
i am using it in the webpage is that ok
can you please suggest me as soon as possible
|
|
|
|
|
The solution of this problem is to use :
DataTable dt = new DataTable();
DataRow dr = dt.NewRow();
|
|
|
|
|
|
Hi all,
I am developping a program which capture a webcam view (like project CaptureNet included in the DShowNet Pack), and when you record your webcam preview the file created is not compressed. I have seen on this website another project which purposed to compress the rendered file. But i would like to use my codec. Actually, my codec take in parameter the avi filename non compress and compress it to another file.
I don't have any idea to use my codec when I record webcam preview.
If someone can explain how to do this ...
Thank you.
PS : sorry for my poor english =[
|
|
|
|
|
Hi,
I have two exactly identical classes. i would like to cast an object of one class to another. Normal casting did not work . Do somebody have some thoughts ?
James
|
|
|
|
|
(1) Have them share a common Interface than use the Interface.
(2) Create a copy constructor on one or both of the objects.
|
|
|
|
|
Hi All,
I have a Tab control having a tab Page on it. I have a panel placed on the tabPage, the AllowDrop property is set to true for all three of it. I still don't know why my panels DragDrop is not firing. Even when I try to DragDrop a Usercontrol on TabPage the cursor shows a circle and a line in between i.e meaning I can't drag drop anything on it.
Please let me know the solution. The Drag Enter of panel is firing.
Thomas Chacko
|
|
|
|
|
hi thomas,
can u let me know how u resolved this issue.
I am having a similar problem.I have tried the
Loaded += delegate
{
IntPtr windowHandle = new WindowInteropHelper(this).Handle;
typeof (DragDrop).GetMethod("RegisterDropTarget", BindingFlags.Static | BindingFlags.NonPublic).
Invoke(null, new object[] {windowHandle});
};
but still the drop is not happening,Only drag works.
Please help.Have spent nearly a weak on this.Thanks
|
|
|
|
|
hi all,
how do i know if the currentrow changed or not?
is there a boolean like mydatagrid.currentrow.changed that i dont know to check this state ?
help please.
|
|
|
|
|
I found some information about the RowState property. This property tells you if that particular row has been modified. Hope this gets you in the right direction!
|
|
|
|
|
Hi!
The situation is a bit more complex than i could formulate it in the subject.
Basically the problem is the different user rights situation running a process as a child-process of aspnet_wp.exe than starting it directly as the logged on user.
I'll try to explain the situation, and if you have any idea where else to search, please post it.
Maybe you might use this approach for you own needs, so i'll decribe it a bit more in detail.
Image the following situation (using .NET 2.0, VS80, c#, c++):
A c# console application is creating the COMServer ("Host.exe") with moniker binding:
object boundhost = System.Runtime.InteropServices.Marshal.BindToMoniker ( monikername );
It is possible to get the correct COM interface like shown below and use it:
IAnyInterface usefulobject = boundhost as IAnyInterface.
Furthermore, the console application provides a .NET remoting object, that uses functions of that bound COMServer:
System.String filename = "Server.exe.config";
System.Runtime.Remoting.RemotingConfiguration.Configure ( filename, false );
System.Console.ReadLine();
[...].
public class ServerObject : System.MarshalByRefObject
{
[...]
public void CallCOMMethod()
{
if ( usefulobject != null )
{
usefulobject.CallTheMethod();
}
}
[...]
}
When starting the Server.exe (console application) it is running as a regular user process, and the bound Host.exe is running under ..\winlogon.exe\services.exe\svchost.exe\Host.exe (visible with ProcessExplorer; thank you guys for that great tool!).
Everything is fine, and i'm able to talk to my COM object via .NET Remoting.
The next part causes some trouble: I try to start and stop the console application remotely with use of a ASP.NET 2.0 WebService (e.x. LaunchService.asmx):
[System.Web.Services.WebMethod]
public bool LaunchServer ()
{
System.Diagnostics.Process p = new System.Diagnostics.Process ();
p.StartInfo.UseShellExecute = true;
p.StartInfo.FileName = "D:\\Anydir\\Server.exe";
p.StartInfo.WorkingDirectory = "D:\\AnyDir\\";
p.StartInfo.Arguments = "";
p.Start();
return true;
}
The LaunchServer WebMethod call starts the Server.exe as child process of aspnet_wp.exe as user ASPNET and the Server.exe as well.
Regardless of the console output which is missing, I route all outputs to System.Diagnostics.Debug. and i see that the server is running.
First, I had problems reading a file, so i moved the ASPNET user into the group of Administrators (do not try that at home!!), just to see whether it is technically possible at all to use remoting channels from service-processes.
Yep. excellent.
Calling the right method on the remoting object, the Host.exe starts up and the returned object is stored in the Server.exe and can be used.
This is only possible for COM object, providing no COMEvent interface !
Objects, which are providing COM event sources are not loaded:
[
coclass,
threading(both),
aggregatable(never),
support_error_info("IAnyInterface"),
vi_progid("COMObject.AnyObject"),
progid("COMObject.AnyObject.1"),
version(1.0),
uuid("{B2D69299-C894-4032-BA07-1AAC494D3D01}"),
helpstring("AnyObject Class"),
event_source(com)
]
class ATL_NO_VTABLE CAnyObject :
public MyComBaseClass,
public IAnyInterface,
public _IAnyInterfaceEvents
{
public:
CAnyObject();
virtual ~CAnyObject();
__event __interface _IAnyObjectChangedEvents;
DECLARE_PROTECT_FINAL_CONSTRUCT()
HRESULT FinalConstruct()
{
return S_OK;
}
void FinalRelease()
{
}
void RaiseEvent()
{
__raise OnChanged( x );
}
[...]
}
The exception when the Server.exe is trying to get the COM object like above and link to its event source is:
System.UnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
at System.Runtime.InteropServices.ComTypes.IConnectionPoint.Advise(Object pUnkSink, Int32& pdwCookie)
at COMObject._IAnyObjectChangedEvents_EventProvider.add_OnChanged(_IAnyObjectChangedEvents_OnChangedEventHandler )
at COMObject._IAnyObjectChangedEvents_Event.add_OnChanged(_IAnyObjectChangedEvents_OnChangedEventHandler )
at Server.BindToComObjectWithEvents() in ...
The event callback is registered in Server.exe like:
usefulobject.OnChanged += new COMObject._IAnyObjectChangedEvents_OnChangedEventHandler ( eventhanderinserver );
hmm..
Why is it possible to get a COM object and call its functions, but as soon as the COM object provides events and the event handler is about to link the callback, it raised the exception ?
I tried to configure with dcomcnfg.exe the privileges for the COMServer but nothing solved it (it's only working with the "Interactive User" setting on the identity tab).
The Server.exe is running as {machinemname}\ASPNET user and the Host.exe is running under my own account (belonging to BUILTIN\Administrators).
Any ideas ?
Thank you very much.
|
|
|
|
|
hi all,
how can i copy content of my datagridview to MS word and to MS Excel ?
i placed two button and 2 savefiledialog. and create files with the extentions xls or doc.
but dont know how to write in them ?
with using :
using Microsoft.Office.Tools.Excel;
using Microsoft.Office.Tools.Word;
these namespaces how will i going to achieve my aim?
would you please help me just for inserting a single row ( or even cell) of datagridview to ms word and ms excel ?
many thanks in advance,
bye.
|
|
|
|
|
try this code to transferring Datagrid control to excelfile
Response.ContentType = "application/vnd.ms-excel";
//create a string writer
string xlFileName = "Report - " + System.DateTime.Now.Ticks.ToString() +".xls";
string xlFilePath = Server.MapPath("../Reports/") + xlFileName;
System.IO.FileStream FS = new FileStream(xlFilePath,FileMode.Create);
StreamWriter Sw = new StreamWriter(FS);
System.IO.StringWriter oStringWriter = new System.IO.StringWriter();
//create an htmltextwriter which uses the stringwriter
System.Web.UI.HtmlTextWriter oHtmlTextWriter = new System.Web.UI.HtmlTextWriter(oStringWriter);
DataGRid1.RenderControl(oHtmlTextWriter);
Sw.Write(oStringWriter.ToString());
Sw.Close();
FS.Close();
Response.AddHeader("content-disposition","attachment;filename="+xlFileName);
Response.WriteFile(xlFilePath);
Response.Flush();
Response.End();
|
|
|
|