291 Posted Topics
Re: Make sure you understand the difference between "modal" and "non-modal" forms. When you use ShowDialog() this causes the form to be loaded as a modal form. A modal form retains focus (for the application) until it is closed. The form that calls this modal form is suspended until the modal … | |
Re: Make sure you are placing the file into an appropriate column type such as image. see attachment. I did this for someone on this forum some months ago with the same question. // Jerry | |
Re: It sounds like maybe you have a couple things backwards. Your Main Application should not be the login screen. Instead, create a Winform application, and add the Login WinForm to it. Then when the main application loads (Load Event) , create the Login form and show it modal, and get … | |
Re: I think you should re-write the tables as such: [code] CREATE TABLE [dbo].[Project]( [Project_ID] [int] IDENTITY(1,1) NOT NULL, [Project_Name] [varchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, CONSTRAINT [PK_Project] PRIMARY KEY CLUSTERED ( [Project_ID] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] … | |
Re: Simple way is to just mark the components in the second form as public (modifier property), and read the results back from the main form. | |
Re: Have you tried using a tab delimited file and give it the xls extenstion ? Excel will open the file and treate it like an xls file. // Jerry | |
Re: It is true that a method can only return one value, however that value can be an array of values. [code] private object[] getSomeData() { object[] mydata = {256, "Here's you daddy"}; return mydata; } // to use the method object[] somedata = getSomeData(); MessageBox.Show(string.Format("The number is {0}, the string … | |
Re: You can set the contextmenu args e.Cancel = true to prevent the menu from appearing. If you cause a "significant" mouse movement, you need to set a variable so that in the contextmenu Opening event, it can be checked, and prevented from displaying if the variable is true. Always set … | |
Re: There are a number of approaches, but the easiest way would be to just pass the Main.cs label1 object to the second form, and let the buttons set its text. Add the label as a parameter to the contructor. [code] India india = new India(label1); ..... [/code] In the India.cs … | |
Re: The ListviewItem is an object in a collection that belongs to a different listview. To copy it to the other list, you have to clone it, or remove it (decouple) from its current collection and post it into its new parent. [code] public ListViewItem _listViewFrequent { get { return (ListViewItem)listViewFrequent.FocusedItem.Clone(); … | |
Re: You mus tbe new to message boards. When you type in CAPS it means you are shouting. The best advise is to visit amazon.com and pick up some books, and then as you run across problems, post them here and someone will help | |
Re: Make sure the dot-net framework that is installed is version 2. CSC.exe is the c# compiler that VS and all tools use to create the actual c# executable. Each dot-net version has its own CSC. | |
Re: You can always purchase the InfoPower controls for dot-net. They have a sub-classed TreeView that connects directly to a dataset with multiple relationships to display the tree. Or roll your own. Bottom line is that the treeview is not a true data-aware component out of the box. Check out this … | |
Re: Get the data from the database with a new statement: select byEmail from ContactDetails where byEmail = 'Y' Then in c#: foreach(DataRow row in YourDataSet.Tables["YourTable"].Rows) sendYourEmailTo( row["byEmail"].ToString() ); [B]Or[/B] if you already have the dataset loaded... DataRow[] emailers = YourDataSet.Tables["YourTable"].Select("byEmail = 'Y'"); foreach(DataRow row in emailers) sendYourEmailTo( row["byEmail"].ToString() ); [B]Or[/B] … | |
Re: He doesn't know about the magical pill that turns a mere mortal into a super developer. They used to charge you for them magic pills at college, but I here you can get them from Amazon.com these days. Just having fun with you.... post a set of questions, and we … | |
Re: There are many ways to do this task, and I will let the others on this board give you the standard way(s) of doing this. One method I have been using lately is quite simple, and does not require you to learn XML syntax or file IO management, or any … | |
Re: Why not just use its handle? string pname="notepad"; foreach (Process theprocess in Myprocess) { if (theprocess.ProcessName == pname) { postmessage( theprocess.Handle, WM_SYSCOMMAND, SC_MINIMIZE, 0); break; } } | |
Re: You can place just about anything on the toolstrip. First (in the IDE) place the desired component on the form (anywhere will do). Provide yourself with a ToolStripControlHost type variable. Then when the form in instantiated, do this: [code] private ToolStripControlHost dtTScomponent; public form1() { InitializeComponent(); dtTScomponent = new ToolStripControlHost(dtMyDateTimePicker); … | |
Re: When you double click the toolstripitem the IDE will create the evet handler. You want to know what to put in this new section of code. [code] { Video video = new Video(); video.ShowDialog(); video.Dispose(); } [/code] Typically your Video.cs file would contain the default Video Class. If you changed … | |
Re: See if you can do it manually using RegEdit. I think you will discover the problem as you navigate to the node where you are expecting to write the value. | |
Re: You are not giving much detail. I assume you mean to save / store the password for this user if a checkbox is marked. Then when this user tries to log in the next time, you read back the password from whereever you stored it and use that instead of … | |
Re: Funny... You are launching a new form1 inside your onLoad handler. Each one has this dialog, and each one launches another form1... a logical never ending loop. (until you run out of resources :) // Jerry | |
Re: Your question can be interpreted in many different ways. Is the underlying data stored in an SQL Database ? Is this a WEB app, or a Windows Application ? Using the asumption that you are using SQL, there are a variety of ways of limiting rows a user can see. … | |
Re: See the attachment, there was a similar recent request for this, so I build a demo project. You should be able to figure it out from this. // Jerry | |
Re: Move the variable up. You can not redeclare the variable in the while statement. | |
Re: Is the database getting installed ? IOW can you access it using SQL 2005 Studio on the client machine ? If this is a question about connection strings (IOW the database is verified to be installed on the client and functional), then "Jen"'s answer should be all you need. If … | |
Re: Setup a Delegate and an Event in the C# component that can be assigned by the VB code on the main form. When your component detects the condition where you want to fire something or deliver information back to the main form, it will be done through the event. // … | |
Re: If you really need to do it in a listbox then look at: [URL="http://www.c-sharpcorner.com/UploadFile/vasu/OwnerDrawListBoxWithIcons11212005071009AM/OwnerDrawListBoxWithIcons.aspx"]OwnerDrawListBoxWithIcons[/URL] Most folks use a ListView instead because it does everything a listbox can do (and more) and handles the image easier through its smallimagelist property. If you want to see some code on using the listview, … | |
Re: The target computer "MUST" have dot net installed , and the correct version of dot net to run a c# Windows form application. If you are saying that it doesn't run in a seperate folder on your development machine, then you either 1) have a partial path hard-coded, or 2) … | |
Re: Did you trace through the code with the debugger ? Is there actually a bitmap file with the user's name in that directory ? // Jerry | |
Re: SQL is a service. Therefore using the NET START syntax for a remote machine might get it done. | |
Re: What does this class do ? Care to post the class to allow someone to assist you in this effort ? | |
Re: If you are talking about the dropdown height, there is a property for that setting. | |
Re: Change: ("c:/data/theData.txt", TO ("c:\\data\\theData.txt", and try it again. // Jery | |
Re: First off, your scoping is wrong. You have declared this in your constructor: col c1 = new col(); The milisecond that your constructor exits, c1 is out of scope and ready for the garbage collector. Declare your components (not initialize them, just declare them) in the class but not inside … | |
Re: The question just has to be asked..... Why are you invoking the second form this way ? If your intent is to have the first form freeze and wait until the second form closes, then why not just show the second form as model using ShowDialog() ? That is the … | |
Re: If you are doing the backup and restore on the same SqlInstance, it is trivial. Just use the SQL backup and restore syntax into an SqlCommand. If going between SqlInstances, it can be more challenging. Databases using multiple file group require the target directories to already exist, although you can … | |
Re: Can you send your project to me. You can rar or zip it, and use the additional options under the reply message to attach the file. I placed your code into a new project, and it works fine. I pressed the new buton to get the picture boxes to appear, … | |
Re: Hello Aminit, Just a thought... have you considered using a binary value to represent each group ? Set the Tag value for each checkbox with a hex value. Have a method OR the hex values for each checkbox (method will iterate through all checkboxes in a group) resulting in a … | |
Re: Another idea that so many folks forget it there is the Property.Settings capability in VS. See the Settings.settings item in your project (Solution Explorer). It is actually an XML file that can be deployed with the application. Its advantage is that you do not need to write your own configuration … | |
Re: If the matrix values are contained inside of a string, then just create a method that receives a string. private void foo(string value) { // parse the value into its parts. } // Jerry | |
Re: It sounds like you need to venture into the Regular Exressions class. | |
Re: Option #1 [code] private void button2_Click(object sender, EventArgs e) { string sLine = ""; DateTime dates; DateTime start = Convert.ToDateTime("03/01/2008 00:00:00"); DateTime end = Convert.ToDateTime("03/09/2008 00:00:00"); StreamReader sr = new StreamReader(@"C:\cvsParse.txt"); StreamWriter sw = new StreamWriter(@"C:\dates.txt"); sw.WriteLine( sr.ReadLine() ); while (!sr.EndOfStream) { sLine = sr.ReadLine(); dates = Convert.ToDateTime(sLine.Replace("\"",string.Empty).Split(',')[0]); if (dates … | |
Re: This sounds like the normal behaviour of a bound dataset. When multiple controls use the same bindingsource (Navigators, Grid, Combo, Listbox, etc), any component that causes the bindingsource.Position to change effects all components bound to the same bindingsource. Either use two bindingsources (one for the grid and its navigator), the … | |
Re: Basically, it is just a matter of first, make sure the sender is a button type, then cast sender as a button, then you have the originating button at your disposal. Looking for something like this ? [code] private void button1_Click(object sender, EventArgs e) { if (sender is Button) { … | |
Re: Make sure that you have atleast 4 tokens on the target line in each file, since you are checking to see if there are MORE than 3 in your code. Next, make sure you Close() all the files when you are done. Closing it is what causes it to write … | |
Re: Charlie, That is some messed up code you have there. Looks like maybe you were trying to convert a VB app to C#. I rarely write console apps, so there maybe some shortcuts, but the version below works. I took the liberty of loading the players account with 10 bucks, … | |
Re: Maybe posting this to the (C++) forum will help. If you want to do it in C#, then I suggest that you load a second array with unique integers from the first array, then sum the second array. |
The End.