291 Posted Topics

Member Avatar for ebabes

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 …

Member Avatar for Bilal Saeed
0
200
Member Avatar for swathi.ch

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

Member Avatar for JerryShaw
0
227
Member Avatar for rinoa04

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 …

Member Avatar for JerryShaw
0
307
Member Avatar for edek

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] …

Member Avatar for JerryShaw
0
70
Member Avatar for kanjali

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.

Member Avatar for kanjali
0
127
Member Avatar for ramiljoaquin

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

Member Avatar for ramiljoaquin
0
135
Member Avatar for blacklocist

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 …

Member Avatar for ChaseVoid
0
386
Member Avatar for rams111
Member Avatar for olibara

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 …

Member Avatar for sanjayNawab
0
265
Member Avatar for puneetkay

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 …

Member Avatar for puneetkay
0
98
Member Avatar for harcaype

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(); …

Member Avatar for harcaype
0
108
Member Avatar for ayomide_aluko

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

Member Avatar for Jx_Man
0
88
Member Avatar for techie_kuldeep

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.

Member Avatar for JerryShaw
0
94
Member Avatar for yaninea

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 …

Member Avatar for JerryShaw
0
123
Member Avatar for sibotho

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] …

Member Avatar for sibotho
0
117
Member Avatar for tubatsimoloi

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 …

Member Avatar for scru
0
66
Member Avatar for knowledgelover

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 …

Member Avatar for knowledgelover
0
169
Member Avatar for Soundgarden

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; } }

Member Avatar for Soundgarden
0
254
Member Avatar for IT_Techno

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); …

Member Avatar for JerryShaw
0
2K
Member Avatar for atn

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 …

Member Avatar for JerryShaw
0
87
Member Avatar for choudhuryshouvi

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.

Member Avatar for choudhuryshouvi
0
222
Member Avatar for atn

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 …

Member Avatar for Narue
0
157
Member Avatar for arleyquininy

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

Member Avatar for JerryShaw
0
104
Member Avatar for ang xinyi

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. …

Member Avatar for JerryShaw
0
82
Member Avatar for Elmo_loves_you

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

Member Avatar for JerryShaw
0
851
Member Avatar for silvergirl

Move the variable up. You can not redeclare the variable in the while statement.

Member Avatar for JerryShaw
0
227
Member Avatar for prabhuraj

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 …

Member Avatar for JerryShaw
0
113
Member Avatar for avnerharel

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. // …

Member Avatar for avnerharel
0
302
Member Avatar for aminit

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, …

Member Avatar for Jx_Man
0
110
Member Avatar for emilio

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) …

Member Avatar for emilio
0
90
Member Avatar for Aasal

Did you trace through the code with the debugger ? Is there actually a bitmap file with the user's name in that directory ? // Jerry

Member Avatar for JerryShaw
0
112
Member Avatar for santoo

SQL is a service. Therefore using the NET START syntax for a remote machine might get it done.

Member Avatar for JerryShaw
0
120
Member Avatar for isiebe

What does this class do ? Care to post the class to allow someone to assist you in this effort ?

Member Avatar for $dunk$
0
76
Member Avatar for emilio

If you are talking about the dropdown height, there is a property for that setting.

Member Avatar for emilio
0
84
Member Avatar for Genuis Man
Member Avatar for it2051229

Change: ("c:/data/theData.txt", TO ("c:\\data\\theData.txt", and try it again. // Jery

Member Avatar for $dunk$
0
108
Member Avatar for emilio

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 …

Member Avatar for emilio
0
143
Member Avatar for big_B

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 …

Member Avatar for big_B
0
387
Member Avatar for IT_Techno

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 …

Member Avatar for JerryShaw
0
124
Member Avatar for teffie

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, …

Member Avatar for JerryShaw
0
105
Member Avatar for aminit

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 …

Member Avatar for aminit
-1
175
Member Avatar for knowledgelover

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 …

Member Avatar for JerryShaw
0
109
Member Avatar for R3B3L

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

Member Avatar for R3B3L
0
123
Member Avatar for Aasal
Member Avatar for JerryShaw
0
49
Member Avatar for jitupatil_2007

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 …

Member Avatar for JerryShaw
0
112
Member Avatar for zorgoban

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 …

Member Avatar for Ramy Mahrous
0
110
Member Avatar for AbuShokry

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) { …

Member Avatar for JerryShaw
0
223
Member Avatar for jitupatil_2007

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 …

Member Avatar for JerryShaw
0
119
Member Avatar for charlie81

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, …

Member Avatar for JerryShaw
0
59
Member Avatar for Draghen

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.

Member Avatar for Draghen
0
79

The End.