|
Hey, howzit, anyone know a good place to get good FREE C# eBooks?
|
|
|
|
|
|
imsathy wrote: gimme ur mail id
If it is a valid free eBook then you can link a URL to it. We don't condone the distribution of copyrighted material. Someone had to write that book and its sales put food on that author's table and a roof over their head. The bottom line is that distributing copyrighted material without the creators consent is theft.
ColinMackay.net
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
|
|
|
|
|
saravanan_article@yahoo.com
|
|
|
|
|
I dont know of e-books as such, but there are many good reference sites such as Coding4Fun at http://msdn.com/coding4fun - it contains tutorials to make sample applications ranging from a LCD driver to a GPS-Wired application.
|
|
|
|
|
|
|
can somebody give a simple login validation program, i'm a newbie and i just need it for a refernece.thank you!
|
|
|
|
|
it's very simple
just get the text values of the textboxes that u
have used to accept the username and password and
then check those values with the valid username and password
if they match then the user is allowed to login
else the error message is displayed.
Regards,
Pramod
|
|
|
|
|
thank you! I'll create one and try running it.
|
|
|
|
|
I am having a problem here with my project development. I would be glad if someone can help me out with this. Here comes.
I am trying to look for a way to find back the reference of a created object. Its something like vb6 callbyname but even using callbyname, i still need to have the reference of the object before i can use the callbyname.
Thanks.
MiaoMioa
|
|
|
|
|
can u e more specific about ur problem
if u have created an object u have a reference to it
then y do u need a reference to it again?
|
|
|
|
|
I have something like the below code which might be reasonable to be in this way when there is just a 1,2 class and 1,2 property. But now i am having like 10++ different classed with each class having dozens of properties that i need to get and return the value which the name i can only know when its running coz its classname/propname is from a database table.
*********************************************
Select Case ClassName
Case "Class1"
Select Case PropName
Case "Prop1"
Return clsObj1.Prop1
Case "Prop2"
Return clsObj1.Prop1
End Select
Case "Class2"
Select Case Key
Case "Prop1"
Return clsObj2.Prop1
Case "Prop2"
Return clsObj2.Prop1
End Select
End Select
*********************************************
I was thinking to do something like
*********************************************
Select Case ClassName
Case "Class1"
return myType.InvokeMembers(PropName, Binding.GetProperty, clsObj1, nothing)
Case "Class2"
return myType.InvokeMembers(PropName, Binding.GetProperty, clsObj2, nothing)
End Select
*********************************************
This actually works but only problem is i still need to do this numerous time for each object. Is there somewhat a way to get back the reference of created object by name/type of the object so i do not need to code like this.
Thanks for ur reply.
MiaoMiao
|
|
|
|
|
Here in the select case u check the Classname
so u can create an object of that class and through
that object u can get all the properties of that class
and then do as u wish.
Hope u get it
Regards,
Pramod
|
|
|
|
|
I can get what u mean but problem is am not trying to create a new object from the class name. Actually the object is declared at module level and created during page_load. When a button_click is trigger, i need to get this value from the existing object instead of recreate the object again.
MiaoMiao
|
|
|
|
|
So wht happens to the object that u have created during the page load event
can't u use the same object in the button click event?
Regards,
Pramod
|
|
|
|
|
Yes, ofcoz i can use back the object i create previously but problem is if i have 10 different data object and during the button click, i need to select which object to use, then i would need to have 10 cases rite. It really seems not right to do like this way but i couldn't get any other way to do so. That's why i would like to seek if anyone have meet this problem and have a solution to it.
|
|
|
|
|
Hi All,
I have a DataList with checkbox and a label box in my ItemTemplate and I have used the binding informations for that. In Footer I have a button control.
My query is..when I click that button, I have to get all data that are checked using checkbox.
Can anybody Please help me to do this?
Thanks In Advance,
Regards,
J
|
|
|
|
|
Dear all,
I am using C# to alter a DBF file , Foxpro driver downloaded ,Everything working fine but after running alter query whole DBF format gets corrupted. And I am not able to open it again.
I am adding the code snippet below.Do help me in this regard
public void Alter_table()
{
try
{
string strConnect;
strConnect="User ID=;DSN=;Collating Sequence=MACHINE;Data Source='d:\\22.dbf';Provider=VFPOLEDB.1;Cache Authentication=False;Mask Password=False;persist security info=False;Mode=Share Exclusive;Extended Properties=;Encrypt Password=False";
OleDbConnection dconn=new OleDbConnection();
dconn.ConnectionString = strConnect;
dconn.Open();
OleDbCommand mycmd=new OleDbCommand();
OleDbCommand myCmd = new OleDbCommand("ALTER TABLE 22.dbf ADD COLUMN TEST1 c(10) NULL", dconn);
myCmd.ExecuteNonQuery();
}
catch(OleDbException ex)
{
MessageBox.Show(ex.Message);
}
}
Thanks for any kind of help
Thanks & Regards
Anil Dhiman
Anil Dhiman
GIS Engineer
|
|
|
|
|
Hello.. I am triyng to make a windowsProgram which is like the "search" in windows.. But I don't know where to start? First determine the directories..But how? For example I need to find every directory in C drive and their subfolders ..Then I need to find every text file in that folders and then look for my word.. So anyone any idea how to do that? I found something "directorySearcher" can this be a starting point?
Thanks for advice
Revelation 22:13
|
|
|
|
|
If you read the documentation[^] for the DirectorySearcher class, it reads, "Performs queries against Active Directory." It's for querying Active Directory which is a networking layer, to put it basically. It won't help you.
You'll have to recursively search directories and open files as you stated. This is very expensive, however, and you should consider indexing files instead. You could rely on Windows Desktop Search, which exposes an API[^]. There's lots of other tools out there you can use like Indexing Service, which comes installed in Windows (originally by default, but now you have to install it explicitly but it's a component on the CD/installation media). There's lots and lots of other libraries out there as well.
Indexing only has to traverse files once (and will typically re-index changed or new files). The index is queried and files are returned. This is how web search engines work, too.
If you want to use the slow and expensive recursive search there are several articles available here on Code Project how to do that. Look at the examples in the search http://www.codeproject.com/info/search.asp?cats=2&cats=3&cats=5&cats=6&searchkw=recursive+directory+search[^].
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Customer Product-lifecycle Experience
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
|
I realized the sad fact, that there's no FolderTreeView control on .NET, just a dialog, so I've created my own based on browsing capabilities of the TreeView. It works fine despite fact there are no such beautiful icons like in explorer and root nodes are drives, not the Desktop...
It's OK, but now I'm looking for a way how to deal with network drives, shared folders etc. In Explorer, there's just some "Network Neighborhood", but I'm using ManagementObjectCollection to obtain logical drives. What do I need to enlist network drives such as shared folders?
Thanks in advance.
|
|
|
|
|
Enumerating shell namespaces (which is actually what they're called; some namespaces just happen to be drives while others are mapped drives, etc.) includes a lot of complicated calls (relatively speaking). There's no simple solution to what you want to do. To do this correctly WMI isn't the best solution. Instead you need to use the Shell interfaces which return you namespaces and allow you to query for their icons along with many other things. Doing this doesn't work with paths at all, but item ID lists (IDLs) of objects. Folders and files have unique IDs. The control panel has a unique ID, etc. Everything visible in the shell namespace has a unique ID. See Navigating the Namespace[^] for an overview with links and a sample in native code.
Another problem is that since all these interfaces are native you'll need to create RCWs (runtime-callable wrappers) for several dozen interfaces, define lots of constants (you'll need the C/C++ headers in the Platform SDK[^] - also installed with Visual C++ - for values), and define lots and lots of structures - some of which aren't so easy because of unions which don't have an equivalent representation in .NET. Because of this you might consider writing such a control in Managed C++ - which allows you access to native constructs but compiled to managed code (the resulting assembly is actually a mix of native and managed code, which means the assembly isn't verifiable and won't run in some security contexts like from an Internet or intranet site).
The article http://www.codeproject.com/csharp/csdoesshell1.asp[^] on this site will give you a start. You can find other articles about shell namespace extensions in the search results at http://www.codeproject.com/info/search.asp?cats=2&cats=3&cats=4&cats=5&cats=6&searchkw=IShellFolder[^].
You can find some commercial solutions at http://www.windowsforms.net/ControlGallery/default.aspx?Category=29&tabindex=10[^]. It takes a lot of work to write these correctly and the prices for some of these controls is a very good deal (no royalties, either). If you're developing this on a budget you might find using one of these cheaper controls may be cheaper than the cost of resources to write it yourself. Just a suggestion to consider. This is a daunting task, though not impossible. The articles above should give you some idea about enumerating the shell and handling IDLs. With that you can query for other interfaces to get the icons you're desiring.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Customer Product-lifecycle Experience
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
Hi peoeple,
i originly was working with VS.Net 2003 and i use WINXP.
when i tried to run my package on win 98 (installed the Framework 1.1) , it caused an Exception.
do i need to copy dll file along with my package?
my dll definitions:
<br />
[DllImport("user32.dll",CharSet=CharSet.Auto,<br />
CallingConvention=CallingConvention.StdCall)]<br />
public static extern int SetWindowsHookEx(int idHook, HookProc lpfn,IntPtr hInstance, int threadId);
my use in the code is :
KeyboardHookProcedure = new HookProc(KeyboardHookProc);<br />
hKeyboardHook = SetWindowsHookEx( WH_KEYBOARD_LL,KeyboardHookProcedure,Marshal.GetHINSTANCE( Assembly.GetExecutingAssembly().GetModules()[0]),0);<br />
Please Help.
Thanks alot,
Ran.
-- modified at 17:43 Tuesday 24th January, 2006
|
|
|
|