- Strength to Increase Rep
- +14
- Strength to Decrease Rep
- -3
- Upvotes Received
- 102
- Posts with Upvotes
- 93
- Upvoting Members
- 51
- Downvotes Received
- 14
- Posts with Downvotes
- 13
- Downvoting Members
- 13
Just ask what you need to know...
- Interests
- Delivering latest technology, blogging, making new friends allover world, etc =)
- PC Specs
- http://www.caira.uk.com/ProductDetails.aspx?PID=56
Re: No, they shouldn't. You should add reference from Project1 to Project2 to be able to write [icode]using namespace MainProject.Project2;[/icode] To add reference, from Project1 solution explorer references->add reference->browse to locate the project2 assembly or projects tab to get all assembles in all solution including project2 assembly. | |
Re: Sorry Jerry I was out Cairo last 4 days, I didn't read your question else now so binary columns by default in gridview read as image, in your scenario VS tries to convert your binary data (timestamp) to image so it fails so it throws exception!!! try to change the … | |
| |
Re: In UserClass define UserType enumerator and assign it a value (came from database userTable) indicates it as an admin or user | |
Re: hmmm, default scenario is to encrypt username and password in .config file, and just decrypt them while application is running. you'll just decrypt 1 time. | |
Re: First create delete button in the grid [CODE=C#] //I prefer to use the wizard to generate the delete button private System.Windows.Forms.DataGridViewButtonColumn Column1; this.Column1.HeaderText = "delete"; this.Column1.Name = "Column1"; this.Column1.Text = "delete"; this.Column1.UseColumnTextForButtonValue = true; [/CODE] [CODE=C#] private void dataGridView1_CellMouseClick(object sender, DataGridViewCellMouseEventArgs e) { if (e.ColumnIndex == 4)// created column index … | |
Re: From the solution which you develop your application, right click then add new project->Other project types->Setup and deployment->setup wizard. This will create for you ClickOnce installation project which let you setup your application on any client machine. Once you accept the default settings, you'll be able to deliver the .msi … | |
Re: Better to ask @ ASP.NET forum [url]http://www.daniweb.com/forums/forum18.html[/url] | |
Re: I added some modifications to Scott code [code=c#] using System; using System.Diagnostics; using System.IO; using System.Windows.Forms; namespace daniweb { public partial class frmFile : Form { public frmFile() { InitializeComponent(); } public static void AppendText(string FileName, string Buffer) { //I'm using another method here in case you want to log … | |
Re: You can do it by using 2 methods first TabControl.SelectedTab = TabPage or TabControl.SelectedIndex = theNumberOfTabSelected | |
Here's I wrote some code to insert\retrieve images from SQL Server database 1- Create table to hold Image ID, Name and itself [CODE=SQL] USE [ImagesDatabase] GO /****** Object: Table [dbo].[Image] Script Date: 07/10/2009 23:46:46 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO SET ANSI_PADDING ON GO CREATE TABLE [dbo].[Image]( … | |
Re: Like to pass a value from one form to another [code=c#] public void TakeThis(int[][] array) { // } [/code] [code=c#] int[][] arrayOfIntegers = new int[1][2]; Form2 form2 = new Form2(); form2.TakeThis(arrayOfIntegers); [/code] | |
Re: to open a file that's beside your application [code] Application.StartupPath returns the path where your application starts from [/code] Example to open text file called 1.txt which is beside your .exe [code] System.Diagnostics.Process.Start(Application.StartupPath + "\\1.txt"); [/code] | |
Re: One of prerequisite to have SQLExpress installed, then you can attach your database automatically using SMO, if you need any help regarding SMO don't hesitate to reply. Serkan, I didn't became Feature Code yet, I'll add two code snippets today, then sleep then dream that HappyGeek sent me PM congratulates … | |
Re: overload ShowDialog method make it returns true or false in case of true show second (main) form your question is long but I'll tell you how to call a form from another one this example calls form 2 from form number 1 [code] dim form2 as Form2() form2.ShowDialog() [/code] | |
Re: In form load event handler [icode]tabControl1.SelectedTab = tabControl1.TabPages[1];[/icode] it's zero based. | |
Re: Just read your XML file as normal file, [code]string xmlData = File.ReadAllText("path.xml");[/code] then write this data to your binary file [code]FileStream fs = new FileStream("path.txt", FileMode.OpenOrCreate); BinaryWriter sw = new BinaryWriter(fs); sw.Write(s); sw.Close(); [/code] | |
| |
Re: [code] Dim str As string str = "Ramy1" str = str.Remove(str.Length - 1); ' str = Ramy [/code] | |
Re: You mean MDI? or just you need to open Form2 from Form1 and use some values in Form1 user entered in Form2?? For second case, just create another Form let say it called Form2, some public members (TextBox, ListBox, etc...) Add this code in Form1 to open Form2 [code=c#] Form2 … | |
Re: modifiy your code to this [code] Console.Write("Enter values for the matrix: "); int[,] matrx = new int[3, 3]; for (int i = 0; i < 3; i++) { for (int j = 0; j < 3; j++) { matrx[i, j] = int.Parse(Console.ReadLine()); } } [/code] | |
Re: Sometimes, but you must answer\put work around in a blog to make it easier for whom they come after. | |
Re: To manage management tasks you can use SMO namespace | |
Re: [QUOTE]I don't want user open many form2 so I use a private boolean variable. When the button is clicked, it call the function to check the bool variable, if false then show form 1 and set the bool variable to true. And form2 open, and that works to prevent user … | |
Re: go to its process then terminate it | |