|
Can someone help me out with what seems to be a newbie question.
I've got a form containing a listview. I want to be able to drop files into the listview, and display them in the list. In C++ it's easy, but I can't get it to work in C#
I've set the AllowDrop property of the listview (and the form) to True, and added a DragDrop event handler, but when the program is running, the mouse pointer just changes to the "no entry" pointer when I try to drop a file onto the form.
Can somebody tell me what I'm doing wrong?
Thanks
--
Help me! I'm turning into a grapefruit!
Buzzwords!
|
|
|
|
|
|
|
I would recommend also looking at the other Drag... events to get a complete view on this.
|
|
|
|
|
Hello,
I am developping Windows application in C# that uses User Interface Process.
I want to display modal window in the application.
Does anybody knows how to achieve this?
Warm Regards
Abhijeet Ballal
|
|
|
|
|
Iam using Visual Studio .NET 2003 Academic version.I have a need to use Microsoft Flexgrid Activex Control in .NET.For that i installed Visual Basic 6.0 software.Then i import "vb6Controls.reg" from visual studio .NET disk2 for registry licenses.
i added the microsoft flex grid control to my toolbox items and then to my form also successfully.I didn't get any error upto this.
Then i want to place a textbox control to the grid to enter the data into the grid.Textbox will be move using the arrow controls.For that i want to change the microsoft flex grid proerties like cellHeight,cellLeft,cellTop, cellWidth in .NET.But these are in disabled state .but these proerties are enabled in visual basic 6.Finally the textbox moved incorrectly.
can you please provide any example of flexgrid control in .NET?
K.L.Sasanka
|
|
|
|
|
Iam using Visual Studio .NET 2003 Academic version.I have a need to use Microsoft Flexgrid Activex Control in .NET.For that i installed Visual Basic 6.0 software.Then i import "vb6Controls.reg" from visual studio .NET disk2 for registry licenses.
i added the microsoft flex grid control to my toolbox items and then to my form also successfully.I didn't get any error upto this.
Then i want to place a textbox control to the grid to enter the data into the grid.Textbox will be move using the arrow controls.For that i want to change the microsoft flex grid proerties like cellHeight,cellLeft,cellTop, cellWidth in .NET.But these are in disabled state .but these proerties are enabled in visual basic 6.Finally the textbox moved incorrectly.
can you please provide any example of flexgrid control in .NET?
K.L.Sasanka
|
|
|
|
|
I required a c# code to clears all textboxes in my form
balu
|
|
|
|
|
Using the form.Controls you get all controls. You can get the type from the GetType method. Compare the TypeName with Textbox then you know which controls are textboxes. Then you can touch them, clearing the text.
Greetings,
Ingo
------------------------------
A bug in a Microsoft Product? No! It's not a bug it's an undocumented feature!
|
|
|
|
|
foreach Control c in this.Controls<br />
{<br />
if (c is TextBox)<br />
{<br />
((TextBox)c).Text="";<br />
}<br />
}
- Malhar
|
|
|
|
|
Hi,
how to convert a character array containing ascii values to unicode string in C#.
Thanks
Jayshri
|
|
|
|
|
Can you describe the source data a bit more specific?
As an array of Char is not ASCII in C#, either you don't mean that or you don't have what you think you do.
---
b { font-weight: normal; }
|
|
|
|
|
Actually here is what i want to do:
byte[] buffer = new byte[buffersize];
baseStream.Read(buffer, 0, buffer.Length);
where basestrem is a network stream.
now I want to convert this byte array to a string containing unicode values.
|
|
|
|
|
Use a streamreader to read the stream with the correct encoding (making the buffer obsolete), or use ASCIIEncoding.GetString to decode the buffer.
---
b { font-weight: normal; }
|
|
|
|
|
hi
i want to change datagrid properties in form1 from other forms .. how to do this ???
i tested some waye (using public modifier for datagrid in form1 or using property to return datagrid properties or method that change datagrid properties from other forms but did't get result)
Please Help me how to this ???? (please give me a full details solution because i am beginner)
thanks ..
|
|
|
|
|
Hi,
Any of those methods should work. Just make sure you are not creating a new instance of the form1 to get access to property/public method.
Ashish Iddya
|
|
|
|
|
My program runs on a sql server database. What I need to do is that when I update the program I need to update the database automatically with the sql script files, is there anyway that I can include the script files inside of the app istaller so that the database is automatically updated.
At present what I do is to install the program and then manually via command prompt update with osql. Is there a way that at the time of installation I can run a command to cmd.
Any help or ideas will be appreciated.
Thanx in advance.
|
|
|
|
|
Depends really on the installer.
MSI - use a custom action, or learn how to run commands.
NSIS - nsExec::ExecToStack '"yourapp.exe" /arg1 /arg2"'
|
|
|
|
|
Hi,
I have a COM application that sends out _bstr_t to a .NET interop.
The strings that I get for ASCII characters are fine in .NET,but I get junk values for unicode characters. Do I need to make any modifications to the string that I get in .NET to display peoper characters?
Thanks in advance,
Ashish Iddya
|
|
|
|
|
have u changed the project settings to UNICODE in ur COM application???If not then try to change the settings in the preprocessor defition and Project options to Unicode.
|
|
|
|
|
Yup, have done that. The COM application seems to pass the characters correctly.
I tried returning the unicode string back to COM from .NET, & it returned the correct string.
.NET seems to handle the string differently, if I pass 5 unicode characters, I get 10 characters(all junk but there are 5 commas in them).
Any ideas??!?
|
|
|
|
|
You have to decorate these strings in your .net interop interface/class/struct with a MarshalAs(UnmanagedType.BStr) attribute.
|
|
|
|
|
Tried adding MarshalAs attribute. It didnt make any difference.
Here is the code I am using..
public bool CreateFile([MarshalAs(UnmanagedType.BStr)]string file,string app)
{
FileStream fileStream = new FileStream(file,FileMode.OpenOrCreate);
/* write some stuff in the file here*/
}
Unfortunately, it is not creating a proper filename if the string is unicode.
The above function works correctly if I execute it directly from .NET(without MarshalAs attribut)
Any suggestion is welcome..This has me stumped for over a week now.
Thanks
Ashish Iddya
|
|
|
|
|
Dear all
I am developing a search engine by C#, and I have problem with searching for words in file content
I do not know how to code, what is the technique
Please let me know if you have any idea or suggestion
Appreciate yours co-operation
|
|
|
|
|
truongminhdao wrote: I do not know how to code, what is the technique
WHat is the problem you are having? What code do you have already?
|
|
|
|