|
I have a c# exe that must tranfere files from one server to another. Well it works perfectly when I am logged on remotely to the server but if I am not logged on it give an error saying it counl not find the destination drive.
How can I make it to run while I am not logged on?
|
|
|
|
|
If you are referring to the remote system's file system using a mapped drive then don't. Refer to it using a UNC path name.
|
|
|
|
|
Could you please explain further. I am not an expert in C#(still learning).
|
|
|
|
|
Colin is suggesting you directly use the UNC[^] notation, instead of mapping a drive to that location. You typically would have used the UNC path to setup the mapping in the first place.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
can i get some unique value when I will press the backspace in the following event
private void richTextBox1_TextChanged(object sender, System.EventArgs e)
|
|
|
|
|
Try it by selecting the keypressed property for the textbox then checking when backspace is pressed. You KeyPreview should also be true i think.
e.KeyCode = BackSpace
or Back or something like that.
|
|
|
|
|
Only on TextChanged event not in key press
|
|
|
|
|
No.
You get what the event's name is indicating: The Text property has changed, nothing more, nothing less.
For example, if your cursor is at the beginning of the text, pressing Backspace will not modify the text, so no TextChanged event will occur.
To find out how the text has changed you'll have to save the previous version of the text and compare it with the new value.
Regards,
mav
--
Black holes are the places where god divided by 0...
|
|
|
|
|
Hi there, can anyone please help me? I wrote a program with a deployment project too. How can i add a sqlconnection setup during the deployment / installation of the program ? Thanks in advance.
|
|
|
|
|
Why do you need to create the connections tring at setup time?
You can create a custom action in your install package to write the connection string.
only two letters away from being an asset
|
|
|
|
|
I dont know what the client's datasource address is so i want him to be able to enter it on setup of the website.
How does one create a custom action in your install package to write a connection string?
|
|
|
|
|
|
Im sorry but i can't find anything in custom actions that i want to get a connection string from the client during the installation.
|
|
|
|
|
Create dialog to display within your install package asking the user to supply connection string details. Use a custom action, possibly of type 2, to run an exe that adds this info to the config file.
only two letters away from being an asset
|
|
|
|
|
Hello !
Is there a way to make modeless dialog top most/always visible without using
TopMost=true ?
Because if we click button to show modal from this modeless dialog, they always stay at back.
Thank you.
Sovann
|
|
|
|
|
Hello,
Maybe, "BringToFront" can Help you.
All the best,
Martin
|
|
|
|
|
If you set your main form to be the Parent, it will never go behind the parent, but TopMost is the only way to make it topmost.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Hello,
Thank you for your advice. I have tried them all but
1. BringToFront() didn't solve the problem
2. set_Parent always complain 'cannot add top level control to this control'
I tried :
Dialog dialog = new Dialog(); // TopMost=false
dialog.Parent = mainForm; // set parent to main form
dialog.Show(); // run modeless
Sovann
|
|
|
|
|
Sorry, C# is dumb. It's not Parent, but Owner that you want to set, as it's a top level control.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Hi.
I'm using a function from a dll. It's imported with DllImport and marked as unsafe because the function returns a pointer to a memory array that the function allocates memory for (at least I think this is why).
[DllImport("netapi32.dll", ExactSpelling = true, SetLastError = true)]<br />
unsafe public static extern int NetWkstaTransportEnum(<br />
[MarshalAs(UnmanagedType.LPWStr)] string ServerName,<br />
uint level,<br />
uint* pBufptr,<br />
uint prefmaxlen,<br />
ref uint entriesread,<br />
ref uint totalentries,<br />
ref uint resumehandle<br />
);
How does it affect my program to compile with the /unsafe switch?
Is it possible to define the above DllImport in a way that it will not be unsafe?
BR
Christian
|
|
|
|
|
Try to replace it with IntPtr.
My english is not so good. Please, correct my errors.
Best regards, Alexey.
|
|
|
|
|
The pointer is actually a pointer to an array of structs. How would I do the conversion from IntPtr to the struct array?
[System.Runtime.InteropServices.StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Auto)]<br />
public struct WKSTA_TRANSPORT_INFO_0<br />
{<br />
public int wkti0_quality_of_service;<br />
public int wkti0_number_of_vcs;<br />
public IntPtr wkti0_transport_name;<br />
public IntPtr wkti0_transport_address;<br />
public int wkti0_wan_ish;<br />
}<br />
|
|
|
|
|
Thanks for the hint with IntPtr. I managed to convert it. Not that I think that the new sollution is less unsafe, but...
|
|
|
|
|
hi all,
I need do something before remove row in DataGridView, but I don't find any helpful event provided by .NET 2.0, so how to add a event for it?
Thanks in advance.
P.S I know there have a UserDeletingRow event, it's a void event. because we set AllowUserDelete to false.
|
|
|
|
|
I am currently creating a little C# (games) project which interrogates a webserver (quite alot).
I would like to perform Http-Tunneling in order to have different IPs query the server, but with all the responses sent to me.
Alex Turc has written something which I think is very relevant here:
http://www.codeproject.com/internet/httptunneling.asp
The problem is that this is in C++ (and quite frankly, very incomprehendible/followable to me!)
If anyone has a solution / something similar but in C# I'd appreciate the help so much.
Many thanks!!
Gerry
|
|
|
|