Answer Questions
GSK_phili add image to listview subitem
Hi, I am trying to add an image to a subitem of my listview , how can I do this if not possible, are there any other alternatives thanks in advance! Could you please post some sample code Yeah, look at this thread . It's exactly what you want. Moreover, I think you will definitely enjoy this sample http://www.codeproject.com/cs/miscctrl/EXListView.asp df=100&forumid=266091&exp=0&select=1427247 You've got some links to look at apparently (haven't checked them myself), but here is a very simple example. Before this code will have effect, you'll need to set the OwnerDraw property of the ListView to True: p.MsoNormal, li.MsoNormal, div ...Show All
StuartGM Print Preview problem(Bug)
Hey, I have this code in the PrintDocument control under the PrintPage event: private void printDocument_PrintPage( object sender, PrintPageEventArgs e) { RtextboxUC thisrichtextbox = GetCurrentTextBox(); //Start printing text and store last letter... checkPrint = thisrichtextbox.Print(checkPrint, thisrichtextbox.TextBox.TextLength, e); //Check if there should be more pages if (checkPrint < thisrichtextbox.TextBox.TextLength) { e.HasMorePages = true ; } else { e.HasMorePages = false ; } } There are no errors, but when I test it on my program and click print preview...when it opens the PrintPreview dialog It shows the dialog that is telling you how many pages it is det ...Show All
Raymond Dalton Populate data to label based on dropdown selection
I'm doing an academic project and come across a problem and really need help in that area. APPLICATION USING: Visual Studio 2005 OBJECTIVE: I have a dropdownlist which bind to the database. The the table called: Product, and has 3 fields (ProductID, ProductName, ProductDescriptions). The dropdownlist is bind to 'ProductName'. The idea is to select the product name from dropdownlist and label will display the product descriptions of that product. If anyone can help with an example of the codes, I really, really appreciate it. For sure Initially you create a BindingSource object which will hold the binding information. So, the datasource of your control will not be directly related to the DataTable, s ...Show All
hadjici2 how could i work with data in a form?
Hello to all experts... i have a form with already had a button for ADD/EDIT/DELETE & NAVIGATION BUTTONS for browsing next record,previous record,top of records & bottom of records...and also i already attached a table from a data source using ODBC from an MS SQL server2000 database my problem is how do i make a code for adding a new record in add button, a command for saving the record, delete a certain record , browsing next record,previous, top to bottom. thanks for any help...sorry for this questions i am new to this language and doesn't know where to start, and doesn't know how could i make things easier for me to start with.. thanks...and any help deeply appreciated Take a look at this download: 101 Visual Basic an ...Show All
obricker Generic Bootstrapper - SQL Express Named Instance
I'm using the bootstrapper to install a named instance of SQL Express as a prerequisite. If SQL Express is installed on the computer but my instance isn't, the bootstrapper will bypass the installation of my named instance. 1. Is there a way of passing an argument to the SqlExpressChk.exe to look for the named instance instead of any SQL Express installation 2. Is there a better way of accomplishing my installation goal Thanks, Wayne Anyone have a solution to this Has anyone done a bootstrapper for SP2 64-bit I have created one based on the x86 SP2, the only differences are the executable names and the download link. I have got my setup program running and downloading the SQL Express installer ...Show All
Ian Arhip DataGrid, Detecting doubleClick on Row header not working properly.
Im using the code below: private void dataGridMessages_DoubleClick( object sender, System.EventArgs e) { System.Drawing.Point pt = this .PointToClient(Cursor.Position); DataGrid.HitTestInfo hti = dataGridMessages.HitTest(pt); if (hti.Type == DataGrid.HitTestType.RowHeader) { MessageBox.Show("double clicked clicked row " + hti.Row.ToString()); } Clicking on half of the rows work but other half does not. Any ideas This is off topic for the Visual C# Language forum, moving to the Windows Forms Data Controls and Databinding forum. Try using Control.MousePosition instead of Cursor.Position. ...Show All
MarlAtkins problems with showdialog and visible true & false
Hi I’m work in a system with showdialog form (Modal). The trouble is when open a modal form over other (in modal too), this open good, but when i hide it (childform.visible=false) and again open this from parent ( childform.visible=true) this one becomes visible but lost MODAL (showdialog) property. How I can make visible the child form with MODAL property piece of code to open child form Private Sub oPb_Cheque_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles oPb_Ch eque.Click If not vpb_EstadoFormCheque Then Recepcion.oFm_cheque.ShowDialog() ' Here, we will fill the form whit our data... vpb_EstadoFormCheque = not vpb_EstadoFormCheque Else Recepcion.oFm_cheque. ...Show All
Fille set a Datagridview datasource to datareader
How can I set a Datagridview datasource to datareader My code appears below... //Build the connection and open it System.Data.OleDb.OleDbConnection con = new System.Data.OleDb.OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + Application.StartupPath + @"\MyDb.mdb;User Id=admin;Password=;"); con.Open(); //Create SQL statement string sql = "SELECT * FROM Log"; //Open a command object using the connection and prepare the sql statement. System.Data.OleDb.OleDbCommand cmd = new System.Data.OleDb.OleDbCommand(sql, con); //Run the command System.Data.OleDb.OleDbDataReader reader = cmd.ExecuteReader(); //Loop though and display the first col ...Show All
Ogulcank MultiSelect Listbox databinding
Hi, I have a form that contains two list boxes they both are initially populated using NameValue list. They both have DataBinding to my Business Object to two separate Properties. The first listbox is a single mode select and this one seems to work ok. The problem I am having is on the second listbox which is multiSimple mode. What is the proper way to bind a multi select listbox to a business object Thanks ...Show All
kcchesnut combobox control is loading slowly ,tried other forum tips too
Hi, I 'm trying to load around 60,000 record (1 col) in a combo ctrl .It's taking long time to load. Is there any other alternative for this. venp-- ...Show All
SonAsylum Creating Windows Form in run time for client applications
Hi... I'm developing a desktop application and I need create some Window Form in run time according to database's data. I mean, if a product property include expired date, weight, name and color. Then the form in the client to fill this product kind would be a date control (for a expired date), a scale control (for a product weight), a text control (for a product name) and a color palette control (for a product color). How to build a application like that Thanks for all. Hi, araujo.guntin Do you mean to create a window form to display the information about a certain product You can try in this way, create a form when designing, add these controls: DateTimePicker( for expired date ), NumericUpDown( for pr ...Show All
davidy13 ClickOnce: How to add a prerequisite from the command line?
Hi, I have Crystal as a prerequisite, so if I publish using VS, several additional entries appears in the .manifest file: <dependency> <dependentAssembly dependencyType="preRequisite" allowDelayedBinding="true"> <assemblyIdentity name="CrystalDecisions.CrystalReports.Engine" version="10.2.3600.0" publicKeyToken="692FBEA5521E1304" language="neutral" processorArchitecture="msil" /> </dependentAssembly> </dependency> If I create a manifest manually, using Mage, what should I do to add the prerequisite to the manifest file Thanks, Leonid. Thank you for the confirmation. I ended up b ...Show All
Julian&#237;n Error calling Application.SetUnhandledExceptionMode()
Hello, I receive the following error when trying to call Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException) in my VB .NET app. System.InvalidOperationException was unhandled Message="Thread exception mode cannot be changed once any Controls are created on the thread." Source="System.Windows.Forms" I have looked at a couple of C# examples online and they seem to be calling this function before calling Application.Run() in the Sub Main(). However, I couldn't find the Sub Main() in my application. So I wrote the following in the same file as my form: Namespace My Partial Friend Class MyApplication Private Sub MyApplication_Startup( ByVal sender As O ...Show All
MA2005 Question about setting the output path of the setup file
I created a setup file with visualbasic for my webfeed program, but I want the setup to unpack a shortcut of the program to the startup section of the start menu so that the program starts every time the PC starts up. Does anybody know how to do this I made this program for a mass of people who don't (need) have any computer experience. So I want it to automatically unpack there. If this is a setup&deployment project, In the File System on Target Machine view, right-click that File System node, and Add Special Folder lets you add the Startup folder. The drag and drop your file to that folder. ...Show All
barbbayne Fade
How can I make a label "fade in" and "fade out" Preferably with a timer Thanks, Warning: lots of code ahead. To fade a label, you would just have to smoothly change from the foreground color to the background color. Doing that smoothly is not easily done by changing the RGB components of the color. Converting colors to the HSL color space (Hue, Saturation and Luminosity) works a lot better. The code below does just this and looks quite spiffy. Here's the code for a custom Label control that automatically does the fading. It has a Faded property to activate the fade. You can edit the Rate property in the designer to determine how fast to fade. Add a new class to a VB project and paste this code: Imports Sy ...Show All
