|
Well if it is C# class then you can reference your dll in another C# project... COM registration is unnecessary in this case.
Just right click on References in Project EXplorer (assuming you use Visual Studio) and add your dll... you can then simply use all public classes in that dll.
David
|
|
|
|
|
Thanks! But i want to call some methods of class on another machine!
System.Type type = Type.GetTypeFromProgID("ProgID","ServerAddress");
object obj = System.Activator.CreateInstance(type);
How do I use obj to call some method of it!
Thanks for your help!
hoale
|
|
|
|
|
Hi
I am completely new to c# .so i am just into basics.
just now i am beginning to work with windows forms
now i have to add a text box and a insert button
now when iam entering the text it should be inserted when the button is clicked.
now wht i need is that when the text box is empty and when i clicked the button , it should show a message saying that textbox is empty
I Think this is very smalll problem. But as iam new, pls guide me to do it .
j o h n
|
|
|
|
|
Subscribe to the button's click event (Double click on the button in Forms Designer, if you're using VS) and then inside the event handler, check if the textbox's Text property is equal to String.Empty
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
void myButton_Click(object sender, EventArgs e)
{
if(myTextBox.TextLength > 0)
{
}
else
{
MessageBox.Show(this, "Textbox is empty!", "Error!", MessageBoxButtons.OK,
MessageBoxIcon.Warning);
}
} I hope this helps!
-- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
|
|
|
|
|
Hi.
Any idea how do i...
i) arrange/sort people's names displayed in a listbox in alphabetical order AND by their surnames?
ii) search for people by name? (my code now can only search by their ID no.)
Thz a lot!
|
|
|
|
|
Hi!
Im new to c# but I'l try my best to be of help.
i) the answer is posted just about 5 topic post below yours
ii) I think its either you create 2 search buttons one for the ID no and the other for the name or create a dropdownlist that triggers the search function when you select one of the items inside it. Name or ID.
of course its only logic I still have to figure out how to do it by code. hehe
hope that helps...even for bit
|
|
|
|
|
hi
how can i use Amazon Inventory Management Service ?
i write application with useing Amazaon ECS 4 but it alow me only to search in amazon and i don't know how can i creat and manipulate Inventory in amazon .
please help me.
my email: mtaghiloo@yahoo.com
majid taghiloo
|
|
|
|
|
hi to all,
i made a web service to communicate with an sql server database.
how can i, raise an event from my web service and catch it in my c# win application. i want to do that because in my c# win application i need to get the sql server informationnal messages (user messages)
i tried to use the delegate, but i think i missed something, does any one have an example.
best regards and thanks in advance
fady
|
|
|
|
|
Can anybody help me with code snippet that can guide me in inserting row in the datagrid control without any data source in the background(i.e. no data connection). I just want to use this datagrid as a source of collecting rows of data from the users. I want to handle insertion of data in database myself.
|
|
|
|
|
AFAIK you need to specify the datagrid with a datasource (i stand to be corrected and if somebody knows of a way to do this i would like to hear it). What you could do is just create a DataTable dynamically to add rows. You wouldn't need to link the datatable to anything except the datagrid.
|
|
|
|
|
|
Hi,
I am working on windows application which store data in xml and put media elements(like images) in folder. I am making zip file of xml and media element folder. Now I need to send this zip file on web server where my web application will unzip this file and will put xml data to sqlserver and place media elements to specific directory.
My question is, How I can send zip file to web application, I have considered FTP but it is not safe because it needs username and password, is there any other solution, if yes then please help me.
Thanks
navees
|
|
|
|
|
Create a webservice method that accepts a byte[] as a parameter then just call the method with the zip as a byte[]. Then just rebuild the zip on the webservice side.
|
|
|
|
|
how do i sort information in a listbox by name (that is, alphabetical order)? im doing c# programming n using microsoft visual studio .net 2003.
|
|
|
|
|
Hi,
You can use the Sorted property of the list box to do this. Set the value of this property to "True".
Thanks and Regards
Pani.
|
|
|
|
|
hi.. im new to c#.. got to do a project to display data (that was downloaded from another PC to my PC) on bar graphs like those u can find in www.advsofteng.com/gallery_bar2.html > graph titled 'Product Revenue For Last 3 Years'.. i nid the codes to produce such a graph and which reflects my data on the graph..
In order for the graph to b displayed, i nid to let user click on tree view (on the tree view there's medicine 1, medicine 2 and medicine 3).. Under each of the medicine, user shd b able to click on any of the months (jan to dec) and a graph will display the date and time of medicine taken for dat particular month..
If the patient did not take medicine on certain dates eg. 2 july and 6july, it shd reflect bars on all the dates except on 2july n 6 july.
thz a lot! any help is appreciated..
ps: im using microsoft visual studio .net 2003
|
|
|
|
|
i have created an on screen Virtual keyboard
what i did was i found the handle for the web browser form and directly used the send keys fn:-
IntPtr webHandle = FindWindow("WindowsForms10.Window.8.app3", "Web Browser");
if (webHandle == IntPtr.Zero)
{
MessageBox.Show("Form is not running.");
return;
SetForegroundWindow(webHandle);
SendKeys.Send("{a}");
}
The problem is that no keys are going inside WebBrowser control.
Please help me urgently.
Thankyou
Arun Appukuttan
|
|
|
|
|
That isn't enough, you need to get the handle to the textbox you want to send text to. You might try EnumChildWindows where you pass it the handle to the browser control. You might also consider calling SendMessage and passing it WM_SETTEXT (0x000C) with the handle to the textbox instead of using SendKeys.
[DllImport("user32.dll")]
static extern bool EnumChildWindows(IntPtr hwndParent, EnumWindowsProc lpEnumFunc, ref IntPtr lParam);
|
|
|
|
|
Hi everybody!!
I 've a problem about ListView In my Windows Form Application. I 've created a song playlist editor that use list view to display the songs and I have move up and move down button for move the song up and down in the list view. But when I push the move up or move down button the row selection will disappear because it lost focus.
Does anyone know how can I preserve the row selection of list view because it doesn't have SetSelected method like ListBox Control?
Thank you and sorry for about my English.
|
|
|
|
|
takkung wrote:
Does anyone know how can I preserve the row selection of list view because it doesn't have SetSelected method like ListBox Control?
Yep, set the ListView.HideSelection[^] property to false.
|
|
|
|
|
I already set ListView.HideSelection but I can't presserve highlighting from a selected item. I think when I select an item and I push Move Up button then the listview control need to be repaint the control because the items in the listview control has changed so the highlighting will be disappear.
The problem is how can I preserve the highlighting at the item that I 've moved up or moved down so I can continue to move that item up or down again and so on. In Listbox control there 's SetSelected method so it can highlight the moved up/down item but in ListView it doesn't have SetSelected method.
this is my code( Move up button click event handler )
int curIndex = this.listSelectedSongs.Items.IndexOf(listSelectedSongs.SelectedItems[0]);
ListViewItem aboveTmpItem = (ListViewItem)this.listSelectedSongs.Items[curIndex-1].Clone();
ListViewItem curTmpItem = (ListViewItem)this.listSelectedSongs.Items[curIndex].Clone();
this.listSelectedSongs.Items[curIndex-1] = curTmpItem;
this.listSelectedSongs.Items[curIndex] = aboveTmpItem;
|
|
|
|
|
I 've already set ListView.HideSelect = false but it can't preserve the highlighting. I think because when I select an item
and push move up/down button the items in ListView.Items has changed and ListView Control will be repaint so the
highlighting will disappear.
The problem is I want the highlighting is preserve at the selected item event through it has moved up or down.
In ListBox control there 's SetSelected method to select an item to highlight but in ListView Control there is no such method.
Thank you very much.
|
|
|
|
|
Ok, I am with you now. I have actually run into this problem before. I solution is to perform the redrawing of the selected ListViewItem yourself.
|
|
|
|
|
I'm doing some graphics work, using Bitmap objects, and a timer that calls the form's Refresh() method. This works, but it updates the entire form, and it flickers. I know it's possible to avoid this, but I'm not sure where to start. Any clues?
Thanks in advance,
Justin Clayden
===================================
| Justin James Clayden \
| Director, Cool Fusion Multimedia \
| mailto:justy@coolfusion.com.au \
| http://www.coolfusion.com.au \
| http://www.arch.usyd.edu.au/~jcla8108 \
=========================================
|
|
|
|