|
You really can't track that. There is no status information sent back from SQL Server that you can use to track the progress of the script. At best, you can put up a "progess bar" that doesn't progress. It just spins endlessly until the call returns.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi there,
I have a VS2003 C# application which uses an unmanaged C++ library to create a bitmap that it writes into a PictureBox. To do this, I need to pass the C++ library the HWND to the PictureBox.
During initialisation, before the screen is drawn, I call pictureBoxVTKHolder.Handle
to get the handle as a System::IntPtr, and this always seems to generate a valid return value.
This is then passed through to a C++ wrapper for the unmanaged code. Within the wrapper, I try and cast it to an HWND with
phwnd = (HWND)hwnd.ToPointer()
Sometimes this works OK, but sometimes the cast evaluates to:
phwnd {HWND__} { unused=<undefined value=""> } HWND__*
Any suggestions gratefully accepted
Tim Thornton
Smartcom Software
|
|
|
|
|
Hi,
Does anyone know how I can allow my application to "receive" files either through "Open With.." or "Send To.." from windows explorer.
I've been searching but I don't know quite what phrases to search for.
Can I also make sure that only one instance of my application is open at a time, and any new files get sent to the already opened instance.
I'm coding in C# .NET 2.0 in VS 2005.
Thanks for your help.
|
|
|
|
|
Hi,
1. There is a SendTo folder under every user account. Just drop a link to your app there and it will show up in the Send To menu.
2. You can configure this under Explorer/Extras/Options/DataType. Visual Studio setup projects are able to automatically make the correct entries for your application.
3. Search this site for single instance[^]
|
|
|
|
|
Ok sorry, I wasn't very clear. I understand how to make file associations and to put things in the menus.
But I don't know how to write the hooks in my code to allow me to process the file I receive.
|
|
|
|
|
In general you just have to evauluate the parameters your Main function has. Have a look at the link I have provided. It not only shows how to do this but also how to pass those arguments to an already running instance.
|
|
|
|
|
Gotcha... I'm being a bit slow! It is friday though.
Thanks for your help
|
|
|
|
|
Dear all,
I'm just starting out in .NET and creating a simple application to store the personel information on staff, e.g. name, address, age etc etc.
My question is which would be the best storage for this type of information. I'm considering XML or a database. The application will be run on a single machine so it just needs to be something simple. It would be nice to be able to load the information into Excel too...
Any pointers would be a real help so I start down the right path.
Many thanks
Tom
|
|
|
|
|
I found SQLite to be a very good and simple storage media for small databases.
There's a ready-to-use DLL provided by Mono, but it also works fine with normal .NET applications
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Thats great, thanks for the pointer...
|
|
|
|
|
i have a problem with the old projects , they are do not open in my new installation of visual studio.net IDE. How do i open that old project in newly;P installed IDE and debug.
thanks............
|
|
|
|
|
File/Open?? Just opening the solution or porject file should launch the conversion wizard which will upgrade the project files to the current version supported by the IDE, IF the conversion is supported.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I'm looking to do something seemingly obvious:
Hashtable h = new Hashtable();
foreach ( key in h.Keys )
h[key] = //something;
but I take it the assignment h[key] kills the enumerator of the foreach. Is there an elegant way to implement the intent of the above code?
Thx.
|
|
|
|
|
You can't change the key of a node in a hash table, as the entire table is arranged according to the hash codes of the keys. You have to remove the node from the table and re-add the object in the node using the new key.
---
b { font-weight: normal; }
|
|
|
|
|
okay, but my intent is not to change the key. I'm trying to express
H[key] = //something;
That is, I'm setting my DictionaryEntry value to //something. Is there a way to use the foreach statement and assign values to existing DictionaryEntry's ?
|
|
|
|
|
Once a hashtable record is created, you don't want to change the key. Changing the value is fine though. Sometimes whan I need a quick and easy list of objects, I'll create a hashtable and just use hash.count as the key. Here is an example of how you could deal with changing values from a hashtable:
Hashtable hash = new Hashtable() ;
for (int i = 0; i <=10; i++)
{
hash.Add(i,"something") ;
}
//we now have 11 objects in the hashtable
int counter = 0 ;
//we do this, because hashtables don't guarantee that you'll
//get object out in the same order you put them in
for (int i = 0; i <= 10; i ++)
{
hash[i] = "new object" ;
//this will modify the VALUE, not the KEY
}
//if you don't care about the order you're getting objects out of the hashtable
//you can enumerate them like this:
IDictionaryEnumerator enumr = hash.GetEnumerator() ;
while (enumr.MoveNext())
{
object theKey = enumr.Key ;
object theValue = enumr.Value ;
//you could change the value here
enumr.Value = "new value" ;
}
-- modified at 9:35 Friday 21st April, 2006
|
|
|
|
|
The obvious: make a clone of the keys:
ArrayList keys = new ArrayList(h.Keys);
foreach (Key key in keys) {
h[key] = bla;
}
Wout
|
|
|
|
|
okay, so I have* to make a copy of the keys to use the foreach when assigning values to existing DE's. Thanks.
|
|
|
|
|
Just as some further info: Whenever you loop over some sort of collection with foreach you are not allowed to change it within the loop. That's no speciality of the HashTable class but affects about all collection classes.
|
|
|
|
|
I encode picture by binary byte and put it into database,now i want to get it back and put it into Grid(i use Xtragrid). I decoded it into Picture, but i dont know how to show it into grid
Please help me
Thanhs a lot.
superdragon
|
|
|
|
|
|
Hello,
is there any way using WMI on how to copy files from local computer to the remote computer on the specified path/location[C#] ?
thank you in advance
|
|
|
|
|
Sure, Win32_Directory[^]. But why would you want to??? This is kind of the Rube Goldberg method of copying files. It has limited functionality, such as it won't over-write the destination file if it already exists.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
we are using microsoft Office 9.0 Library & COM namespace is OWC
TextBox1.Text = xlsheet.ActiveSheet.Cells[i,1];
While writting this code it is not converting to object to string but in reverse case it is working properly uploading to spreadsheet.
//This is the Error
Error: Cannot convert Object to String
So pls convey this & let me know the solution for the above problem.
I m using asp.net with c# coding.
Thanking u,
Naren.
please help me
|
|
|
|
|
Try this:
TextBox1.Text = (string) xlsheet.ActiveSheet.Cells[i,1];
Best regards, Alexey.
|
|
|
|