|
try using SubItems.Add()
tmpListView.Items[0].SubItems.Add("something");
Robin Panther
|
|
|
|
|
Heyas all,
I'm kinda of stuck here and was hoping for some feedback and opinions. I'm attempting to design a simple CD cataloging programming in C#, the easiest part of designing the form is done. I'm trying to determine how to store the information such as "program name" "publisher" "cd number" "date added". I have MSDE installed and running however I've been reading and it seems that MSDE is used to program the connectivity to the database that will eventually be run on a computer with SQL server installed. I don't think this is what I want. I'm looking for something that is built into the program, you could import an existing database, export etc. I don't want the users to have to rely on having a 3rd party application installed (i.e. SQL server) Can anyone point me in the correct direction maybe someone knows of some links to beginners type Data stuff pertinent to what I want to do? Maybe this post should even be in the ADO forums, if so I appologize. Any information would be great.
Thanks All!
"There are 10 types of people in this world; Those that know binary and those that do not."
|
|
|
|
|
I think MSDE is actually a good solution for what you are trying to do. While there are "compiled-in" database libraries available, I have not seen any for .Net or that are written in managed code. MSDE is free and relatively easy to install and configure and is compatible with SQL Server. In fact the database engine IS Sql Server with limitations imposed on the number of concurrent connections and the maximum database size (4 Gig I think). The should be more than sufficient for a CD catalog program.
Just my 2 cents... Have fun.
|
|
|
|
|
In the same situation, I've used in-memory DataTable class of .NET, and saved information on disk in raw text format. (text files with tab as column delimiter).
It was enough for me - my application is not always running and do not need very fast search, sort etc. features. Try this out, may be it'll be enough for you too...
And, one more thing, when my databases becomes too big - I've added zip engine. So, database is saved, then zipped on disk. And, when loading, unzipping and loading.
Hope it'll help...
Robin Panther
|
|
|
|
|
Hi, I'm implementing a custom business object collection and must implement IBindingListView.Filter. It appears that it must parse a string which contains an expression (a la DataColumn.Expression) that evaluates to a boolean value and determines whether the object is to be filtered out. I am comfortable working with all of the binding plumbing... PropertyDescriptors and such. However, I have never implemented any sort of expression language before. If any one could spare half a clue on where to start researching this, I would be most appreciative.
|
|
|
|
|
Why not look to see how DataColumn.Expression works? You can use ildasm.exe that ships with the .NET Framework SDK (also installed by default with VS.NET) if you know how to read Intermediate Language, or use a decompiler like .NET Reflector[^].
This can be a great way to learn how things work internally in the BCL, which may lead to cleaner code that you can write, as well as new ways to use or extend the BCL types.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
how to improve button appearence to have anther look.
i heart there is some libraries do it but i dunno how to use it or how to get it ????
plz any one know plz reply
thx
|
|
|
|
|
|
thx so much ,
do u have anther source or more effcient keywords can i search throw them inthe net
|
|
|
|
|
i've problem while updating datagrid combo box column. the leave event does not work properly while inserting a new record.
|
|
|
|
|
Hi
I have a website with 3 frameset. I need to know how do I code the linkbutton_click event to open another page but in another frameset.
I already try Response.Redirect("another.aspx"); but it opens the page in the same frameset where the linkbutton is. I know how to set the target in a hyperlink, but not in a linkbutton
Any help would be appreciated
Thanks
|
|
|
|
|
|
Hi,
I need to create a file and the data I am writing to it needs to be in the following format.
"CAT",2,13.0,"X"
How can I write out the data so that some of it is quoted and some of it is not?
Also, I have a non quoted file which i write using Stream Writer and it works fine. I have noticed that Stream Writer automatically puts a new line at the end of the file. How can I remove this line or control when the file writes a new line?
Thanks in advance.
Stephen McAllister
|
|
|
|
|
Have you tried backslash befor quotes?
something like this:
string towrite = "\"CAT\",2,13.0,\"X\"";
and for and-of-line symbol - are you using WriteLine() method? Try to use Write() method instead.
Robin Panther
|
|
|
|
|
Is there a max number of nodes that can be created in the Treeview control? If so, what is the max number?
Best,
Jerry
"Making money is art and working is art and good business is the best art of all."--Andy Warhol
Toasty0.com
|
|
|
|
|
As far as i know - u can add nodes until u run out of resources.
This posting is provided "AS IS" with no warranties, and confers no rights.
Alex Korchemniy
|
|
|
|
|
Why should a treeview has max number? I think it doesn`t have it.
<italic>Work hard and a bit of luck is the key to success. You don`t need to be genius, to be rich.
|
|
|
|
|
Hello!
Does anybody know how to insert text into bookmarks in Word using late binding? If I use early binding everything works fine.
What I want to implement is somthing like this:
for (int i = 1; i <= document.Bookmarks.Count; i++)
{
object objI = i;
document.Bookmarks.get_Item(ref objI).Range.Text = "Some text";
}
but using late binding instead.
Tommy Fransson
|
|
|
|
|
Hi
I use OleDb to access MSAccess database, allways successfuly with out password, but when I set database password from Access (menu-> Tools-> security-> Set Access Password )it fails to connect even if i use the same password in the connection string such as:
conStr = "Provider=Microsoft.Jet.OLEDB.4.0;User ID=Admin;password=<thepassword>;Data Source="+ DataDir + DataBaseName + .....
the error message is [cannot start your application. The workgroup information file is missing or opened exclusively by another user.]
is there any way to set a pass word for a data base so it can not be opened from access and available from the application please?
|
|
|
|
|
In Javascript, I used this method to open a browser: window.open(URL) but I dont know how to use this way to open a new window in C# (Im writing a web page using ASP.NET with C#). Can u tell me about this?
Thank you in-advance!
|
|
|
|
|
You still have to use your javascript code, cause ASP.NET is a server-side technology and therefor cannot provide a functionality like window.open .
www.troschuetz.de
|
|
|
|
|
Hi
In my code I have:
ICodeCompiler compiler = codeProvider.CreateCompiler();
And a warning appears in VC# 2005 saying:
'System.CodeDom.Compiler.CodeDomProvider.CreateCompiler()' is obsolete: 'Callers should not use the ICodeCompiler interface and should instead use the methods directly on the CodeDomProvider class. Those inheriting from CodeDomProvider must still implement this interface, and should exclude this warning or also obsolete this method.'
How can I sort this out?
Thanks
|
|
|
|
|
Just use the CodeDomProvider class directly as it suggests.
- Nick Parker My Blog | My Articles
|
|
|
|
|
I want my application to run most of the time as just an notify icon visible in the system tray, with some dialogs that pop up if the user selects an option from the context menu on the tray icon. I've had a look at the example on code project that creates an application that runs in the system tray:
http://www.codeproject.com/csharp/desktop_mail_checker.asp
So I copied how the above article sets up the main form: the form's FormBorderStyle to none, set it to minizied, disable the titlebar controls (maximize, minimize, close etc). It was all fine until I noticed that the form was visible in the Alt-Tab menu and once you had alt-tabbed to it there was no way of hiding it again
After a bit of googling I discover if I set the Form's FormBorderStyle to FixedToolWindow then it was no longer visible in the Alt-Tab menu, result! But today I have noticed that now I can no longer minimize or hide the form it appears as a minizied tool window in the bottom left of my desktop when the application is running and even worse if the user double clicks on the title bar the window expands to its normal size, apart from the form is empty and there's no way to minimize it again!
Anyone got any ideas as to how to completely hide form so its not visible as a window on the taskbar or on the alt-tab menu? All I want is my application's icon in the system tray while its running and a context menu for the icon. I don't really need the main form at all!
Cheers,
CoffeeZombie
|
|
|
|
|
use the form's Visible property. U dont need to change BorderStyles or anything.
A sample code could be (in this example I want the app to minimize to taskbar):
private void Form1_LocationChanged(object sender, EventArgs e)
{
if (this.WindowState==FormWindowState.Minimized)
{ notifyIcon1.Visible=true;
this.Visible=false;
}
}
A better solution when ur main form does not serve any purpose as in your case, is to not use any main form at all and create your own ApplicationContext. An example would be:
public class AppStart:System.Windows.Forms.ApplicationContext
{
[STAThread]
static void Main()
{
Application.Run(new AppStart());
}
NotifyIcon myIcon;
public AppStart()
{
myIcon=new NotifyIcon();
myIcon.Icon=SystemIcons.Information;
myIcon.Visible=true;
myIcon.DoubleClick+=new EventHandler(myIcon_DoubleClick);
}
private void myIcon_DoubleClick(object sender, EventArgs e)
{
Form1 myForm=new Form1();
myForm.Closed+=new EventHandler(appForm_Closed);
myForm.Show();
myIcon.Visible=false;
}
private void appForm_Closed(object sender, EventArgs e)
{
((Form)sender).Closed-=new EventHandler(appForm_Closed);
myIcon.Visible=true;
}
}
|
|
|
|