|
are you asking about executing a program from Windows Explorer by dragging and dropping a target file onto it? If so then write your program to handle command line args. By default the paths of files dropped onto a program icon are passed to the Main function as parameters.
If that's not what you're asking about then you might want to clarify your question.
|
|
|
|
|
no thats not what i want
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87??6?N8?BcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-i?TV.C\y<p?jxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
When the file drag is completed - the foreground window is changed. You could use GetForegroundWindow from user32.dll to find which window is currently active at the end of the drag operation. I'm not sure how you'd get the path from it though. If the 'Display the full path in the title bar' option is enabled on the system, then you could use GetWindowText from user32.dll to get the path (if it's the desktop the text is 'Program Manager').
Once you get the path you can then use Process.Start
Dave
|
|
|
|
|
thanks man for info, i will try it and reply soon
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87??6?N8?BcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-i?TV.C\y<p?jxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
Hi All,
Every time i try to execute a project i am coming up with the above error.
Can any one advice on the problem?
Thank you
regards
|
|
|
|
|
Hi,
You may try the following options:
1) Verify that the file 'C:\WINNT\Microsoft.NET\Framework\v2.0.50727\WebDev.WebServer.exe' exists. Visiaul Studio installs the necessary file in the v2.0 framework folder by default. Removing the framework would screw up the local server option.
2) If you are running 64 bit machine then check out the following link:
http://support.microsoft.com/kb/920719
Hope this helps
Regards,
John Adams
ComponentOne LLC
|
|
|
|
|
hey guys
ive got two dataTables and two DataGrids on a form
The first datagrid's data is bound perfectly, now on a button click i need to add the selected row of the 1st DataGridView to the 2nd dataGridViews dataTable and remove it from the first
i tried this to remove the row...
private void button1_Click(object sender, EventArgs e)
{
foreach (DataGridViewRow row in dataGridView1.SelectedRows)
{
avalibalTimeCatRow = avalibalTimeCatTable.NewRow();
avalibalTimeCatRow[avalibalTimeCatIdColumn] = Int32.Parse(row.Cells[0].Value.ToString());
avalibalTimeCatRow[avalibalTimeCatNameColumn] = row.Cells[1].Value.ToString();
avalibalTimeCatTable.Rows.Remove(avalibalTimeCatRow);
}
}
the error is " The given DataRow is not in the current DataRowCollection. "
any other ideas on how to remove the row?
thanx
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
you.suck = (you.passion != Programming)
|
|
|
|
|
replace the error line with this
dataGridView1.Rows.Remove(row); , you were deleting a row that is not exist in that table thats what error is saying
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87??6?N8?BcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-i?TV.C\y<p?jxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
i tried that aswell before posting... the problem with that is the table.row is of type DataRow, which the remove method expects, and the dataGrids row is of type DataGridViewRow
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
you.suck = (you.passion != Programming)
|
|
|
|
|
will you try again with that code line i gave you ? i'm sure it will work
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87??6?N8?BcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-i?TV.C\y<p?jxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
i did, the problem is the method expects a DataRow and im inserting a DataGridViewDataRow if i table.Rows.Remove(row);
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
you.suck = (you.passion != Programming)
|
|
|
|
|
i said this :
dataGridView1.Rows.Remove(row);
Not this :
table.Rows.Remove(row);
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87??6?N8?BcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-i?TV.C\y<p?jxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
it works
that doesnt make sense, does the dataGridView automatically change its dataSource if i change the data in the datagrid view?
thanx
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
you.suck = (you.passion != Programming)
|
|
|
|
|
yes of course
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87??6?N8?BcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-i?TV.C\y<p?jxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
i didnt know that
thank you
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
you.suck = (you.passion != Programming)
|
|
|
|
|
Hi
I guess you have to select the rows in the datatable and then delete it.
foreach (DataGridViewRow row in dataGridView1.SelectedRows)
{
DataRow[] selectedRows = avalibalTimeCatTable.Select("IDColumnsName = " + row.Cells[0].Value.ToString());
foreach (DataRows rowtoDelete in selectedRows)
{
avalibalTimeCatTable.Rows.Remove(rowtoDelete);
}
}
Not tested
Might fail in the foreach loop.
Kjetil
|
|
|
|
|
YOUR A GENIUS!!!!!!!!!
it worked like a charm!!!
thanx
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
you.suck = (you.passion != Programming)
|
|
|
|
|
I have two tables in my MS SQL database. The first one (Publication) contains all sorts of information about books, and has one foreign key (AuthorID). The second table (Author) contains the names of the authors. Now, I need to sort the first table, alphabeticaly, by the authors names. But all I succeeded in doing so far was to sort it by Authors IDs. If anyone has an idea on how to solve this, any help would be greatly appreciated.
Thanks.
|
|
|
|
|
I don't know, but I suspect you'll need classes from System.DirectoryServices, perhaps DirectorySearcher.
|
|
|
|
|
Hello.
I have been creating a application that checks the application version and sees if it fits with the version from http://msbeditor.dumpen.dk/versioninfo.html
If it doesnt I use a webBrowser component to open a download link to http://msbeditor.dumpen.dk/msbEditor.rar
But this is not very practical because, the ones using my application have to download all files even though some of the files are not changed..
So I wanted to ask if you have an idea on how to make a auto updater in C#?
I was thinking of something like:
Check the application version with the online version (Allready done)
If it doesnt fit, then match all the files (last changed or file size or similar) in the rar file (from msbeditor.dumpen.dk) with the files in the application folder
If they are changed then download the changed files
Any ideas?
|
|
|
|
|
Sounds okay. You can create an additional updater application that will download the files and then update your main application when finished.
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Thank you
Im glad you like the idea
But do you have any like real code for me?
Because (for me since im not that expierenced) its hard to go from idea to actullay coding it
A snippet or similar is just fine!
|
|
|
|
|
Hi.
Have you considered ClickOnce ?
Kjetil
|
|
|
|
|
Hello,
could anyone solve my problem. I have application working with MSSQL Server: there is one table "goods" (id, name) and another one - "info" (id, idgood1, idgood2, info), where idgood1 and idggod2 - foreign keys.
In my application I need to present a DataGridView in such a way,
_______| goods1 | goods2 | goods3
goods1 | info11 | ______ | ______
goods2 | ______ | ______ | info23
goods3 | info31 | ______ | info33
I select data from two tables ("goods", "info") in appropriate DataTable instances: GoodsDataTable and InfoDataTable. Then I CREATE (dynamically) one more DataTable - VisualDataTable, which IS what i need. Then I put VisualDataTable into DataSet, DataSet into BindingSource, and, finally, BindingSource into DataGridView. It's working. Until I want to update something!
I tried to call SqlAdapter's Update method as for InfoDataTable as DataSet. But nothing happens.
In general, how should I update data in case when "visual" part of DataGridView and database structure are different..?
Another words, I take data from database, and put data into database with one table, and I edit data with another table.
|
|
|
|
|
Your design is a bit blur. What I understand form your post is that you combine two tables into one, this is called DataView object which should be in the SQL server layer of your program.
Create a SqlCommand that creates a DataView combining both tables then make your SELECT/UPDATE commands on that view. Both tables will be updated accordingly.
I hope I got you right.
Regards
|
|
|
|