pawlu's Q&A profile
Windows Forms C# Combobox ValueMember problem
Hi all, I'm pretty new to the world of C# and .Net and enjoying it so far. I'm having trouble setting the index value in a combobox. I'm using MySQL connector/Net and because it doesn't provide certain tools/extensions to work with Visual Studio I have to do certain things manually (which isn't problem because it helps me understand C# and .Net better). :^) My original intention was to take names and ids from a table and use the id as the index in the combobox list and the names as display. I get a full list of the names no problems. But the index is always the same, integers incremented with each item. As you can see I've tried crea ...Show All
Visual Studio Creating Custom Editor
Hi I have the following requirement: 1) Provide custom editor - with intellisense support 2) Customize property Grid - which will list custom objects etc... 3) Provide custom tool window - which will enable user for data entry 4) Any data entered by user either using property grid or in custom tool window should be parsed and displayed in custom editor I have following queries, I would be glad if you'll could help me with this 1) Should I create custom project types or just support custom editor/custom files in existing project types (supported by .NET) 2) Can I host custom editor, property grid and custom tool wi ...Show All
Visual C# Date Validation on a Databound Textbox
Friends, I am curious if anyone knows a way to pop a validation messagebox based on what is already taking place in a date bound textbox in Visual Studio 2005. What I mean is this...... Yes, I can write a routine to run through the characters and check if it is a valid date but the textbox (and/or bound dataset ) seems to be doing its own validation. If I do not type in a valid date using a /, ., or -, the form simply will not let me advance to the next record using the navigator, which tells me that the textbox or dataset is doing it's own validation WITHOUT me having to write a whole new method to do it. I even checked an invalid lea ...Show All
Visual C++ DGLDATA.CPP
Hi There, I have made some changes in my application (move some statics and some sliders) and I got some error when I compile my code. The problem is dlgdata.cpp in line 43. I have read something at the MSDN website, and they told: 1-Open the .rc file 2-Rename the DIALOGEX to DIALOG 3-Erase some WS_BLABLABLA I have made that, but now, I got some 4 errors, they are: (91): error RC2112 : BEGIN expected in dialog (91): error RC2135 : file not found: 0x1 (93): error RC2135 : file not found: Tab1 (96): error RC2135 : file not found: 129 Can anybody help me! Many thanks, Take a look at the help of the errors you are getting for a hint of wh ...Show All
Windows Forms TabControl - Disable/Enable tab page
I have a tabcontrol with 2 pages. OnLoad the 2nd Tabpage shall be disabled (grayed out and not selectable). Later with code I need to enable the 2nd tab. Any Ideas how this can be done please. /Morten Maybe you could remove the tab altogether from the TabControl and add it later when it's needed. Just an idea. Luis Alonso Ramos ...Show All
Visual Studio Express Editions color coding vs black&white appearance of .vbs file
Hi, I was using MS Visual Web Developer to edit a .vbs file, and it appeared with line numbers and color coding for the various components. I just installed Visual Basic 2005 Express, and when I open that (or any) .vbs file, it appears in black and white. Any idea how to get the color coding back Thanks! Nevermind, I had to associate .vbs files in the Tools-->Options-->Text Editor-->File Extensions. A follow up question though, the icons to comment out selected lines are greyed out. (But not if I use the MS Visual Web Developer version). Not sure if this means there are even other fe ...Show All
Windows Forms Runtime error, File Format is not valid in RichTextBox.LoadFile()
Hey, I have a starnge runtime error, when I run my program and click ont he load option it opens up the load dialog, so then I click on Text FIle(*.txt), and then click on a text file to open and then when it is opening it, it gets a runtime error, it highlights this line of code: RichTextBoxPrintCtrl1.LoadFile(openDialog.FileName) This is the load code: Private Sub openMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles openMenuItem.Click openDialog.Title = "Open File" openDialog.Filter = "Rich Text Files (*.rtf)|*.rtf|Word Files (*.doc)|*.doc|Text Files (*.txt)|*.txt|All Files ...Show All
Visual C# How to determine week no. of a given date?
For example I have a list of dates 5/11/2006, 5/18/2006, 5/25/2006 How can I categorize these dates sample output: Today: 5/25/2006 Last Week: 5/18/2006 for Today,compare with DaysOfYear for Date.Now with DayeOfYear of the passed Date.Time and if 0,then today Use this method to categorize weeks- First time pass DateTime.Now - get week Next time pass the date to determine-get week (if 1 then last week) public static int GetWeek ( DateTime t) { int dayOfYear = t.DayOfYear; double week = Math .Floor(dayOfYear / 7.0)+1; return ( int )week; } ...Show All
Windows Forms Is this app still alive?
I cannot insert a new critter.... my first critter....ERROR "Server is expirenceing some problems try later" I have got this error for 5days now. Please help The web server was running out of disk space. I had some alerts in place, but they weren't firing, so I didn't catch this problem early on. The database server has been ex ...Show All
Visual C# Problem about Control's SetStyle
I create a component inherit from UserControl,now,when i use SetStyle in initializing instance,code like this: SetStyle(ControlStyles.DoubleBuffer,true); SetStyle(ControlStyles.ResizeRedraw,true); SetStyle(ControlStyles.UserPaint,true); SetStyle(ControlStyles.AllPaintingInWmPaint,true); but,when use this component,it seem work well when set this small size,when i set size as 30000,30000,it contains a error:System.ComponentModel.Win32Exception but i think this SetStyle it's needed,how can i do with this problem What you're seeing is the failure to create a memory buffer of that size. When you set double buffer = true, there is ...Show All
SQL Server Error: The value was too large to fit in the output column "colName" (60).
Hi All, I'm trying to transfer data from DB2 Database to SQL Server 2005. Well, i used the OLE DB Source, the Data Conversion Component and the OLE DB Destination component. I have five Data flows with this configuration above. But I am receiving an error message from one of them. Please check below the error message: "[Source Table TARTRATE [1]] Error: The value was too large to fit in the output column "ADJ_RATE_PCT" (60). " "[Source Table TARTRATE [1]] Error: The "component "Source Table TARTRATE" (1)" failed because error code 0xC02090F8 occurred, and the error row dispositio ...Show All
.NET Development converting c++ char array to .net string
Hi all, I'm having some trouble to read a binary file containing a c++ struct's data into my c# application. The last 16Bytes of the 24 Byte file contain a 15 chars and the \0 end character. I'm trying to convert these bytes I read from the file to a C# string using BitConverter.ToString(data, counter + 8, 16); However, what I get is just: 30-20-36-30-30-20-38-30-30-20-30-32-34-00-00-83 I don't have any idea how get the actual text from the file. Anybody who could help me Thanks, Marco byte [] source = new byte [16]; data.CopyTo( source, counter + 8 ); string myString = System.Text.Encoding.AS ...Show All
Windows Forms Please Help !!!
How can I tell when a form is in design mode Please Help !! -Andy Moyer First of all, am not a guru but I just want to comment... :p <i>However, If I drop an instance of the composite control (which is compirised of UCA and UCB) on a form, the UCA and UCB controls now think that they are not in design mode.&nbs ...Show All
Smart Device Development MSB3247
What a pain in the arse! I've obviously not properly de-installed VS2005 beta 2 properly before I installed the vs2005 release version, so now the code I've been working on doesn't work. Hurrah for nice easy install/de-install methods! When I build my app the output is this... ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Consider app.config remapping of assembly "System.Data, Culture=neutral, PublicKeyToken=969db8053d3322ac, Retargetable=Yes" from Version "1.0.5000.0" [] to Version "2.0.0.0" [C:\Program Files\Microsoft Visual Studio 8\SmartDevices\SDK\CompactFramework\2.0\v2.0\WindowsCE\System.Data.dll] to solve conflict and get rid of wa ...Show All
Visual Studio Tools for Office error in retrieving a .xls file.
Hi guys, im currently dev a prog that used asp.net to generate .xls reports. the report will actually use a template found in /template to generate the r eport. thereafter, will save to the destination /temp before being retrieved . im running it on microsoft server 2003. apparently, there is some problem with generating the report. it keeps returning me a System.IO.FileNotFoundException. i've checked the permission of excel, the templates but apparently, that is not the cause. Program wise, not possible because 1 out of 5 type of report is working fine . any advice also, i got this errors in the event log.. Detect ...Show All
