jchohio's Q&A profile
Windows Forms Fill listboxes and comboboxes programaticallYy?
Can soembody please show me the code of how to do this! Thanks The key for both controls is their Items collection. There a full code samples for both the ListBox and the ComboBox on MSDN so please have a look at them and feel free to post again if you still have questions about this. http://msdn2.microsoft.com/en-us/library/system.windows.forms.listbox.aspx http://msdn2.microsoft.com/en-us/library/system.windows.forms.combobox.aspx Best regards Dennis Dietrich Developer Division Microsoft Corporation This posting is provided "AS IS" with no warranties, and confers no rights. ...Show All
Windows Forms Datagridview::copy row including hidden column to another datagridview
I have SourceDGV whose Column1 I hide programmatically. How can I dragdrop copy SourceDGV's selectedrow including the hidden column to TargetDGV and keep that Column1 hidden on TargetDGV Thanks for any help ! The following code might be useful. Instead of dragging the selected from dgv1 to dgv2, i select a row on dgv1 and click the button on the form. then the selected row will be copied to dgv2. one of the columns in dgv1 is hidden. public partial class Form1 : Form { DataTable dt = new DataTable(); DataTable dt2 = new DataTable(); public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { dt.Columns.Add("col1& ...Show All
Windows Forms DataGridView + Adding Rows
Hey all I am trying to add Data in rows using a loop, but I can't figure out how to add just the right amount of rows so it doesn't glitch on me... http://rafb.net/p/r1ITE288.html that is my code UserClassAndStudent() is my array that holds all the variables. that are seperated by my delimter "|" vertical bar. and example value of UserClassAndStudent would be (0)= Class 1|Student 1|Student 2|Student 3 (1)=Class 2|Student 1b|Student 2b|Student 3b (2)=Class 3|Student 1c|Student 2c|Student 3c (3)= Where Class 1,2,3 would be the header and everything else will be the row for that column, lastly the amount of rows in each column vary by number of students etc.... Which kind of result do you want Something like: Class1 ...Show All
Windows Forms Problem : Anchored ComboBox get selected automatically when its container resize.
Hello, I have a problem with the comboBox and I can't find a proper solution. I have many combo box that are docked fill in a TableLayoutPanel. When I resize the table layout, all combo box that DropDownStyle is DropDown get selected (all text are selected). This is very inconvenient since we have to go click in each combo box to unselect their text, and the UI is horrible. The solution I found is that always keep all combo box in DropDownList style, and change the style to DropDown when it get Focus (override OnEnter). This works find except the case the the combo box get focus by a click on the dropdown button, the dropdown appears and disappears right away, cause a flashing of the window. My solution for this is override WndProc t ...Show All
Visual Basic Another simple question from novice
I have a database on my SQL Server. One of the tables is called "Wyniki" and there are columns: ID, Imie, Nazwisko, Punkty, Status, DataGry, RodzajGry, Autor. There is some data already. I want to read data from it and I tried to use this code: Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Dim Polacz As New Odbc.OdbcConnection Polacz.ConnectionString = "Driver={SQL Native Client};Server=localhost;Database=ProjektKoncowy;Trusted_Connection=yes;" Dim cmd As New Odbc.OdbcCommand("SELECT * from ProjektKoncowy.dbo.Wyniki", Polacz) Try Polacz.Open() Dim reader As Odbc.OdbcDataReader = cmd.ExecuteReader() While reader.Read ...Show All
Visual Studio Tools for Office Word2007 Add-In: Can I customize the Word Options dialog ?
Hello, I am developping an Add-In for Word 2007 with the VSTO3 CTP (this add-in will be released using Cypress) I would like to know if it is possible to customize the Word Options dialog box. Typically, I would like to add a category to the left pane and provide UI elements to control the options of my add-in. For the time being, I use a custom dialog bow that I show using a button in a custom ribbon, but I am looking for a more elegant solution that would be more tightly integrated to the new Word 2007 UI. Thanks in advance for any help. There's never been any interface exposed in the Office object models for this. And Office 2007 concept is much more restrictive about what customizations are allowed. That said, ...Show All
Visual C# IList<> or ICollection<> which one is more efficent????
In my code I use ICollection<> for some reason I decided on ICollection<> after doing some research but I forgot why I am using ICollection<> ;-) Looking at different samples I have come across on the web it seems that most people use IList<> which is better or does it matter Portion of my code using ICollection public static Collection < AvatarImageInfo > GetAvatarImages() { string key = AVATARIMAGE_KEY + "GetAll" ; Collection < AvatarImageInfo > avatarImages = new Collection < AvatarImageInfo >(); if (avatarImageCache.Contains(key)) { //Get an AvatarImageInfo collection from the cache. avatarImages = ( Collection < Avatar ...Show All
Windows Forms creating setup of the project in .Net
Hello Alls, Me create the setup of my project in C# (through setup project ).. Now i want that wen i start installing from the setup created...Before it i got the message dat if .net framework is nt installed please installed it.. How do i add it ... Regards, Aamir ...Show All
Windows Forms DataGridViewComboBoxColumn - SelectedIndex
Hello All, Does anyone know how to set the list index of a DataGridViewComboBoxColumn. I have no problem populating and retieving the ValueMember. I just can't figure out how to set the DataGridViewComboBoxColumn to a specific item within its list programmatically. Sound simple enough. Your help is appreciated. Kind Regards, JimS ;^) Hello, I noticed that you stated that "It is important to note that if you use a DataReader to populate the Dataset the DataGridViewComboBoxColumn will display the ValueMember rather than the DisplayMember", which is the problem I am having. How do I go about getting around this problem Thanks! ...Show All
Visual Studio Express Editions I want answers to some of this c# questions
1).Net framework is nominated from a)com b)com+ c)com2.0 d)dcom 2)How multiple inheritance in c# can be achieved a)using abstract class b)using interface c)classes 3)finally block can contain a)break b)continue c)goto d)return 4)components of .Net framework 5)How thread synchronization in c# can be achieved 6)In c#.net streaming of data is called as a)winding b)synchronization c)threading in addition to Cgraus response - try the MSDN site also: http://msdn.microsoft.com has everything you need! ...Show All
SQL Server Pivot Table Connection with OLAP Cubes
Hello, I am having issue with Performance of the Pivot Table connecting to OLAP Cubes. I am wondering if any of you have links to how to improve Pivot Table performance Basically, I have done the backend optimization on the schema, but there should tricks on the Excel such as Connection Properties that I could use that could relate to MDX or Threshold Level that could speed up the Pivot Table performance. Below is some initial thoughts... Non Empty Threshold=1 Any help is appreciated! -Lawrence I am currently using Excel 2003 for pivot table functionality of AS 2000 & AS 2005 cubes. -Lawrence ...Show All
Visual Studio Express Editions How can I create a SIMPLE Report in VB Express?
Hello, How can I create/design a report in VB express Does VB Express have any Reporting functionality at all Are we NOT supposed to learn how to do reports Is this catch 22 Please help me, please. Kind Regards, Kajani VB Express as such does not come supplied with specific reporting tools. If you buy certain versions of VB/Visual Studio then 3rd party tool Crystal Reports is bundled into the product which does enable simple report development. http://msdn2.microsoft.com/en-us/library/b4z62wxz.aspx There are numerous 3rd party reporting tools available Crystal Reports - http://www.businessobjects.com/products/crystal/default.asp intcmp=hp_products_crystal ActiveReports - ...Show All
Software Development for Windows Vista turning off MIC
Hi, Can any one help me out to turn out the MIC feature in Vista.It has some option in system's control panel as i hear.But where exactly can we do it. Thanks & Rgds Soujanya There sort of isn't a way to do it. There IS a way to shut off UAC in Control Panel, definitely. But MIC -- which I'm told is now called "Windows Integrity Control" or "Windows Integrity Mechanism" -- doesn't have an on/off switch. There's really only one big use of it in Vista anyway -- IE Protected Mode. That can be shut off if you need to. ...Show All
.NET Development Network Logon Failed-Home network
I am testing a simple remoting solution and it works fine with all of the components on the same computer. However, when I test over 2 machines on my home network I am able to connect to the remote machine (and instantiate the remote object) with no problems, but when I attempt to call one of the remote object's methods I get a System.Security.Authentication.AuthenticationException exception: "A remote side security requirement was not fulfilled during authentication. Try increasing the ProtectionLevel and/or ImpersonationLevel." with an inner exception of: "The network logon failed" I am guessing that this is similar to connecting to SQL Server over a home network where you can't use Windows Authentication across ma ...Show All
Gadgets Network activity monitor ?
Hi, I'm looking for a network activity monitor gadget but I can't find any !! I only found NetMonitor and NetActivity but I can't even install them. Any ideas thx You're not running Sidebar as Administrator, right click on Sidebar, select "View list of running gadgets". You'll see it's running. If you can wait a day or two, I'll have a Gadget that works without all this fuss. I've just coded the DLL to read the NIC info, and am doing the Gadget side as we speak. ...Show All
