|
HI,
I have add Refernce to COM DLL in ASP.NET.
Now how can i use it, means create its object
and calls its Functions etc,
DLL name is COMDLL.dll
and after creating its refernce nameis Interop.COMDLLLib .
so how i can use it
thanx
Regards.
|
|
|
|
|
One, you haven't set a reference in ASP.NET. ASP.NET is a technology, not a language...
You've set a reference to the .DLL in your C# project.
Second, without the docs on the .DLL, you're pretty much groping around in the dark.
What is this .DLL supposed to do? Where did you get it from?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I am using FileSystemWatcher component to monitor a folder for file creation. My folder is basically an FTP folder where file take time to upload, but as its creation starts, file creation event is raised.
Now when i get the file size at the same time, it gives returns me 0 bytes. Kindly tell me how to deal with this issue. how to check if file creation is complete.
Also how can i know if a file has been fully copied???
Thanks in advance
|
|
|
|
|
I had a similar problem, I dint find any direct approaches like filecopied event or something similar,may be this will be of some help.
Use the Changed event, select the LastWrite notify filter.
u will get approx 3 events raised for each file activity.
keep a counter when it has reached 3 u can be relatively
sure that the file has been fully copied then u can check for file size.
cool man
|
|
|
|
|
There really seems to be no built-in way to do this.
Usually to determine if a file has been copied completely you try to open the file with exclusive access (for example using a File.Open() overload), and if this fails you know that another program is still accessing (i.e. copying) the file.
If the
Repeat until your File.Open() succeeds (or a certain number of retries has been made to avoid deadlocks).
Regards,
mav
|
|
|
|
|
Hi,
I'm a bigginer in programing C# and I have a simple problem that and I hope some one can help me out. I'm sending IP multicast from a server and after 10 packets I want to make a break for 10 sekunds before I transfer the next 10 packets. So my question is basically what is the command for making a delay?
Thanks in a million
|
|
|
|
|
hi,
If you are using threads then you can go ahead with the method
Thread.Sleep(1000)
parameter is in millisecond.
**************************
S r e e j i t h N a i r
**************************
|
|
|
|
|
I want to do a user control. It can input number only and can check Integer's length and real's length. Can give me a sample?
|
|
|
|
|
hi,
Create a user control with a textbox or something. And provide a error provider which you will get from toolbox.
private void textBox1_Validating(object sender, System.ComponentModel.CancelEventArgs e)
{
if(textBox1.Text.ToString().Length > 5)
{
errorProvider1.SetError(textBox1,"can't be > 5");
}
else
errorProvider1.SetError(textBox1,"");
}
See this is a small hint to achive. Remaining is upto you to develop. And don't expect entire source code from here.
;P
**************************
S r e e j i t h N a i r
**************************
|
|
|
|
|
int year = int.Parse(cboYear.Text);
int month = int.Parse(cboMonth.Text);
int day = int.Parse(cboDay.Text);
System.DateTime moment = new System.DateTime( year,month,day);
string dMy = moment.ToShortDateString();
string test_SQL = "Select * From test Where startDay <= " + (dMy) + "And endDay >= " + (dMy);
System.Data.OleDb.OleDbCommand test_cmd = new System.Data.OleDb.OleDbCommand (test_SQL, test_conn);
System.Data.OleDb.OleDbDataAdapter test_adapter = new System.Data.OleDb.OleDbDataAdapter(test_cmd);
System.Data.DataSet test_ds = new DataSet(); test_adapter.Fill(test_ds,"test");
// bind datagrid to dataset
dataGrid2.DataSource = test_ds;
dataGrid2.DataMember = "test";
test - table name
startDay (MM/dd/yyyy)- column name
endDay (MM/dd/yyyy)- column name
when the user select the date, month and year, my program will grab this value and compare it into the database. if found, it will display into the datagrid. i wanna use the date format (MM/dd/yyyy) to compare those in the database. Is not working!!!! help!!!!
Chris
|
|
|
|
|
hi,
After getting the date from user. here this line
System.DateTime moment = new System.DateTime( year,month,day);
Suppose your date is (value of moment ) 22-05-2004
You can convert it into string like
string dMy = moment.ToString("mm/DD/yyyy"); result will be->05/22/2004
string dMy = moment.ToString("dd/MM/yyyy"); result will be->22/05/2004
string dMy = moment.ToString("dd-MMM-yyyy"); result will be->22-May-2004
string dMy = moment.ToString("mmm-DD-yyyy"); result will be->May-22-2004
i think this will serve your need.
**************************
S r e e j i t h N a i r
**************************
|
|
|
|
|
thanks but it doesn't work. in my database, for example the startDay is 1/10/2005. whereas in my program, after extracting the date value from the user, it displays as 01/10/2005.. will there be any problem if there is a zero infornt ->01/10/2005 whereas in my database is just 1/10/2005???
|
|
|
|
|
hi,
please check the date format of your database. i can't figure out this.
**************************
S r e e j i t h N a i r
**************************
|
|
|
|
|
My directory always get much temporary files after compiling. I always need to pick source files (like *.cpp, *.h etc) one by one when I want to copy them to another folder or backup them. It's so pain
Fortunately, I found a program today, it's very useful to me, maybe it's useful to you too. It can copy or clean specfied type of files and integrate with Explorer, very easy to use.
It's name is Clean Now!(http://www.liuxz.com/cleannow/index.htm) I have installed it in my computer and feel good Usually, I develop with VC6 and C++Builder 6. So I create my own "File Group" like following:
VC 6 Source Files: dsw;dsp;cpp;c;h;hpp;def;clw;lib;opt;rc;ncb;
CBC 6 Source Files: h;hpp;cpp;c;lib;dfm;res;bpr;bpg;
Now, it's very easy to copy my source files to another folder or backup them without garbage: (1) Right click at my source folder (2)Move mouse to "Copy"->"VC 6 Source Files" (3) Select a destinition folder. After a few seconds, all source file and only source files will be copied to destinition folder. I don't need to pick them manually anymore!
If I don't want to copy them out, I just select "Clean"->"VC 6 Source Files", and HOLD SHIFT while clicking. All files EXCEPT source files will be deleted. My source folder become clear
You can try it out if you have interest
code, debug, code, debug ...
I love it!
|
|
|
|
|
hi,
don't post these sort of information here. Go for some other section like soap etc
**************************
S r e e j i t h N a i r
**************************
|
|
|
|
|
If I have a datatable I want to bind to a listbox, how can I make the valueMember equal two columns instead of one ?
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
Hello all,
I've been trying like crazy to find a way to make it so that a ScrollableControl with AutoScroll = true will not scroll to a control within that gets focus. That is, I'm talking about this part from the MSDN : http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwindowsformsformclassautoscrolltopic.asp[^]
"Additionally, when autoscrolling is on, the client area of the form automatically scrolls to make the control with input focus visible."
I do not want this to happen. I need scrollbars when items are outside of the client area, but not the scroll-to-focus. I have a workaround already that involves making a specialty panel that stores its scroller's location and has methods to "snap back" to the stored location but this causes a nasty flicker.
Is there someone that has made a panel that behaves the way I want? Rewriting the Windows Forms scroll behavior is not appealing. If there's a way to stop the flicker it would be acceptable as well.
|
|
|
|
|
Hi,
My question is :
I have a checkedListBox control in a WinForm, where I am displaying 'siteName' column from a table and the checkedListBox is being populated by siteName, but when forming a dynamic query, I want to form a query by 'siteID' not the sitename. How do i make a hidden column in a checkedListBox, where it selects, 'siteID' and should display 'siteName' on the checkedListBox control.
I appreciate your help.
Thanx
abhi
|
|
|
|
|
I have a form which contains several controls. But I now need to have a few of those controls portable as they will be used several time in my tool.
I encapsulated all of the logic including the Drag and Drop logic into my own UserControl, replaced the existing control with a panel and added the portable control into the panel.
The form looks the same as it always had and it is opened as a child form in an MDI parent. While everything looks fine, I now find that my events (MouseDown, MouseMove, DragDrop) are not reaching the controls. It is as if the form is stopping them from reaching my inner control.
Is there a document anywhere that discusses the event hierarchy --- or even better the steps I need to take to bubble these events down to the embedded control?
Thanks
This signature left intentionally blank
|
|
|
|
|
Either your form or your control has a property that sets how this works, but I forget what it's called. KeyPreview, perhaps ? It's a boolean property.
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
Christian,
The KeyPreview boolean only passes KeyPress events down to the form before they are raised to the control. Kind of the opposite of the problem I have.
I am trying to get my mouse events recognized by embedded controls inside my user control.
Michael
This signature left intentionally blank
|
|
|
|
|
Oh crap. I found the problem!
When I copy and pasted the controls into the user control, I never rebound the event handlers in the TreeView control (which originates the whole functionality within the user control!!!!
Well, thanks for at least giving me something to look at, Christian.
This signature left intentionally blank
|
|
|
|
|
Am I crazy? I cannot for the life of me figure out how to grab a column from a datagrid and convert it into an array...
Yes, I am the highly suggestable type.
|
|
|
|
|
The DataGrid can use any of the following data sources: DataTable , DataView , DataSet , DataViewManager , IListSource , or IList from the DataSource property. Access the data is simple from that. Check out the information on the DataTable[^] which the DataSet will hold. If you are having a specific problem with one of these, post it so we can help.
- Nick Parker My Blog | My Articles
|
|
|
|
|
I am making some progress, but i am hitting a wall at one point i have code that looks like this:
string[] bender = this.DataGrid1.Items[1].Cells[0].Text.Split(new char[]{'*'});
I am wondering how to do this, and wether or not it is even worth a try:
I am looking to make Items[1] look through all the rows, not just the one specified. Basically, if there are 7 rows of info, i want it to go through rows 0-6 and create an array of all the information. to test i have a "foreach" statement that writes a line of asp .net code that displays each of the results in it's own tag.
What is bothering me is that asp .net obviously has tools in place to gather the information in the dataview and make it into an array, then display that information in a table in the form of a datagrid. i want to crack that code so that i can make it write other kinds of formats, not just a datagrid.
Yes, I am the highly suggestable type.
|
|
|
|