Roman Benko.'s Q&A profile
Visual Studio 2008 (Pre-release) Enumerations?
Just getting my hands on this: Is there a built-in way to specify a property type to be of an enumeration type What I'm having to do now is use the generated byte-property as a private value field, and then creating a public property in the partial class that casts it to my enumeration. Otherwise, this is freaking cool! Really digging this, team... you have no idea. :) Keep it up! Mike We are looking into Enumeration types currently. Our plans are not finalized yet but, yes, we also feel that it would be nice to have them. ...Show All
Visual Studio Express Editions Package Load Failure
I tryed several times to install and uninstall VB2005 Express but I always get the error: "Package Load Failure Package "Visual Studio XML Editor Package" has failed to load properly {GUID=a guid}. Note that during a "Repair" I got an error in Framework 2.0 installation. But then it went on. The above failure does not allow to open a project nor to create a new project Thanks for help Many thanks, however I solved the problem. It was caused by a not correct installation of Framework 2.0. Unfortunately when I tried to reinstall or repair it, I got a system error. Then I downloaded the very useful tool dotnetfix_cleanup from: http://astebner.sts.winisp.net/Tools/dotnetfx_cleanup_tool.zip I launched it, I reinst ...Show All
Visual C# HOW DO I: Insert on a table, using tableadapter?
Hi, I guess my subject said a lot of my problem, but anyways i will try to explain it. this is it: Im new at this c# stuff, so i was tryin' to insert a row, into a two colums table. after tryin' with the DataRow Class, I got to the "tableAdapter.insert" method. it worked once... but I could'nt commit the changes.. not even using the AceptChanges method. anyways you get my point... anybody can help Actually this answare seemed to me very helpful, with only one problem.. the Sqlcommand stuff, i cant find it nither as a DataType or a class. is there anything wrong with my IDE ...Show All
Windows Forms anchoring controls in flowlayoutpanel
i want to anchor (left,right), few controls in a flowlayout panel. But, as it turns out, flowlayoutpanel resizes the other controls only to the maximum lengthed control. How can I make the controls touch left-right boundaries of flowlayoutpanel on resizing i m using vs 2005, c#. to give an idea...here's a code snippet i m using: .........(inside a for loop) tview = new TreeView(); tview .Tag = i.ToString(); //sz.Height = tview .Size.Height; tview .Anchor = AnchorStyles.Right | AnchorStyles.Left; //tview .Size = sz; //tview .Hide(); flowLayoutPanel1.Controls.Add(tview ); .......... Hi, Docking the controls might help (“tview.Dock = DockStyle.Top” instead ...Show All
SQL Server A deadlock when selecting from a view with replicated tables.
I moved this from another forum because it seems more related to replication the longer I look into it! The following code often dies on a deadlock. I have also seen "Spid x blocked by Spid x", where x is the spid of this connection. The view selects from several tables and some other views as well, and many of the underlying tables are being updated by replication. I have seen cases where the replication Insert proc participated in the deadlock, and the table being inserted into is joined twice in the view, suggesting that somehow this causes the deadlock or makes a deadlock more likely SELECT * INTO dbo.tbl_stg_LoansMarketingFirstBorrower FROM view_loans_marketing_first_borrower OPTION (MAXDOP 1) I do not under ...Show All
Software Development for Windows Vista ActiveX installation
We have an application that periodically downloads and installs new updates and plug-ins that can be implemented as ActiveX controls. Once ActiveX control is downloaded it is registered and plugged into application's components. Does the application need to elevate to administrator privileges to perform this operation or there are some settings where admin can allow standard user to install and register ActiveX controls coming from specific place ActiveX Installer Service provides mechanism that lets administrators define the Host URLs from which standard users can install ActiveX controls. Can we use this service programmatically (without IE7) Thanks for any help you can provide. Dmitry. ...Show All
Visual C++ Problems with Char*'s and LPCWSTR need help
I am trying to use the openregistrykeyex or openregistrykey function from the windows.h include file and I have the following code HKEY hKey = NULL; char * temp = "String" ; int len = strlen(temp) +1; wchar_t *wText = new wchar_t [len]; if ( wText == 0) return 0; memset(wText,0,len); ::MultiByteToWideChar(CP_ACP, NULL, temp2.c_str(), -1, wText,len); const wchar_t * test = wText; //long tempResult = RegOpenKey(HKEY_LOCAL_MACHINE, test, &hKey); long tempResult = RegOpenKeyEx(HKEY_LOCAL_MACHINE, test,0, KEY_READ, &hKey); Neither work and I can't understand the cryptic error codes if someone could help me unravel the error codes error code = Error 1 error LNK2028: ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Beta 2 removed System.Xml?
I can't get the Bitmap Font class released back when beta 1 came out to compile because it won't accept let you access System.Xml or System.Drawing. Is this just me Or was it removed and if so what can you do to work around that Ahh I fixed it I didn't realize there were no references created automatically in beta 2 for it. Once I added a reference it cleared everything up. ...Show All
Windows Live Developer Forums Getting the tic tac toe example
Where do I get the entire Tic Tac Toe example mentioned in the SDK TIA And here you go. I haven't got a good server to host it on at the moment, so if somebody would be so kind as to place the file on his website and post the link here This link is again a temporal one, so you must download it within 7 days... ...Show All
.NET Development PrintDocument leaves a large bottom margin on some printers
I'm trying to print a Bitmap which fills a complete A4 page (portrait). I use the following code: PrintDocument pd = new PrintDocument (); pd.PrinterSettings.PrinterName = printer; foreach ( PaperSize ps in pd.PrinterSettings.PaperSizes) { if (ps.Kind == PaperKind .A4) { pd.PrinterSettings.DefaultPageSettings.PaperSize = ps; break ; } } pd.PrinterSettings.DefaultPageSettings.Margins = new Margins (0, 0, 0, 0); pd.PrintPage += new PrintPageEventHandler (pd_PrintPage); pd.Print(); private void pd_PrintPage( object sender, PrintPageEventArgs e) { e.Graphics.InterpolationMode = System.Drawing.Drawing2D. InterpolationMode .HighQualityBicubic; e.Graphics.SmoothingMode = System.Drawing.Drawing2D. Smoo ...Show All
Visual Basic Show/Hide Properties of form
I use a form as dialog box for requesting some kind of user input I want to hide all it's properties from other forms and expose only my custom properties I know I can make that by creating a custom control but I dont want to locate the form in an external dll I want it to stay embedded in my program exe how I can do that I use vb2005 Hi Samer, Create a public class MyDialog that does not inherit a form but that has an instance member of type Form. Create an instance of Form when needed - either in the construtor of MyDialog or maybe as late as in a Show method of MyDialog. Now you can add any public methods/properties you want and forward them approprietly to your internal For ...Show All
Visual C# Creating visio like behaviour in C#
Hi All, I would need to create an application that sort of behaves like visio in a way that allows users to drop objects to screen and than connect them with lines. Also the objects on the screen may contain another objects within them (simmilar to folders/sub-folders and files) There would be two basic types of objects: 1. Containers (able to contain multiple Conatiners or Simple objects) 2. Simple objects (able to be connected to multiple other Simple objects or Containers) Does anybody have any idea on where to look for more help Cheers, Yes that would be very helpfull. I have actually managed to add buttons/labels on the screen and move them around the form with the mouse at runtime I have also impl ...Show All
.NET Development reflecting changes of DataTable to Database
Hi All, Ive spent days breaking my head over why the code below doesnt update changes to the database. Could someone please help... [CODE] OleDbDataAdapter adp = new OleDbDataAdapter("select * from TestTable", connection ); adp.InsertCommand = new OleDbCommandBuilder(adp).GetInsertCommand(); DataTable dt_dst = new DataTable("TestTable"); adp.Fill(dt_dst); DataRow rw = dt_dst.NewRow(); rw["ID"] =123; rw["CAT_ID"] = "adadas"; dt_dst.Rows.Add(rw); dt_dst.AcceptChanges(); adp.Update(dt_dst); [/CODE] remove acceptchanges! :-) It will tell the datatable that there are no changes to be given back to the dataAdapter when you call the update method. Remove acceptc ...Show All
SQL Server Can't uninstall Reporting Services
I need to reinstall Reporting Services but during uninstall I face the following error: "The setup failed to read IIsMimeMap table. The error code is -2147024893" Nothing seems to help with the problem. Regards, Ksenia Does anyone have any updates on this. I am naving the same issue as Botia. I need to uninstall the default instance of RS 2005 on a production box, but I am getting the MimeMap error. I have tried... a) Using the RS config tool to re-create the IIS Virtual directories. b) deleting the virtual directories in IIS, and then re-creating them using the RS config tool. c) stopping the IIS service during the install. d) stopping the Default Website during installation. I want to a ...Show All
Visual Basic Connect to MS Exchange Server?
Hi, I'm really clueless on where to start on this one. Are there any ways to connect to an exchange server and get ones emails and appointments Thank You, Bryan St. Amour Hrmm, after reading the msdn notes on System.Net.Mail here: http://msdn2.microsoft.com/en-us/library/system.net.mail.aspx it doesn't look like that will help me very much - I'm not interrested in sending mail out, I am looking to basically read my appointments that are stored on my exchange server. Re-reading my first post I guess I wasn't specific enough. ...Show All
