MickRivers's Q&A profile
Visual Basic Common Language Runtime detected an invalid program
Alright... Now I have made some research and I found out that this exception can be thrown by invalid IL or by too many controls on a page. But since I have not more than 30 controls in my page that throws this exception it must be the IL. I have also run the PEVerify.exe on the assembly Here's the output: [MD]: Error: MethodImpl's Decl and Body method signatures do not match. [token: 0x0000017D] [MD]: Error: MethodImpl's Decl and Body method signatures do not match. [token: 0x00000180] [MD]: Error: MethodImpl's Decl and Body method signatures do not match. [token: 0x00000189] [MD]: Error: MethodImpl's Decl and Body method signatures do not ...Show All
Smart Device Development Retrieve current active connection (GPRS, WIFi) IP address of device
I want to know, how can I retrieve an IP address of active connection to internet. here are some methods I use to help: static public string [] IPAddress(){ String strHostName = System.Net.Dns.GetHostName(); // Then using host name, get the IP address list.. IPHostEntry ipEntry = System.Net.Dns.GetHostByName(strHostName); IPAddress[] addr = ipEntry.AddressList; string [] IPArray = new string [ipEntry.AddressList.Length ]; for ( int i = 0; i < addr.Length; i++){ IPArray = addr .ToString(); } return IPArray; } static public bool IsConnected(){ bool Connected= fa ...Show All
.NET Development Parent Child Relationships within a Datatable
Hi there, I've read some of the threads on parent-child relationships but nothing seams to deal with relationships within the same table. I'm using ADO.NET 2.0. Basically I have a DataTable which I add rows to during my processing. It contains parent child realtionships within the table. When I call the update I'm getting Foreign Key Violations obviously because the child is being filed before the parent. I don't have any control over the order in which I add the records to the DataTable. To make things more complicated, the Parent and Child IDs are GUIDs which means sorting is no use. Can anyone assist me with a pattern h ...Show All
Smart Device Development Datagrid Horizontal Scrollbar
Does anybody know any way to control the Horinzontal Scrollbar of DatagridControl As I try there isnt any event which fires when there is a change in Scrollbar, and there isn’t also a way to position the scrollbar in the region that i want. If the answer is no as I expect, does anybody know any thridparty component apart than resco smartgrid an ComponentOne C1Flexgrid. Thanks for your help. Correct, there's no event like that. However, as user scrolls, grid would be repainted. That means you might be able to inherit from DataGrid and hook into OnPaint() to simulate event you need by ...Show All
Windows Forms Richtext box Background Image
Hi as a part of my development Project i need to show a watermark image on the richtextbox.(ie) the image should be transparent.in other words the user should be able to view the text with the background image. There is no background image property exposed. richTextBox1.CreateGraphics().DrawImage(objBitmap,-10,0, new Rectangle(0,0,richTextBox1.Width,richTextBox1.Height) ,GraphicsUnit.Pixel ); And Moreover the image should be drawn Diagonally from bottom left to top right. the above code draws the watermark image but the text is getting Hided(its draws a layer over the text) Pls post me the complete code on how to a ...Show All
Visual Studio Tools for Office Opening an existing Word doc via a Word addin
I've got a Word addin coded in VS 2k5 beta 2. I want load an existing Word document from within the same instance my addin is running. How can I do this Example: Dim test As Word.Document = ThisDocument.ThisApplication.D ocuments.Open(strFile) With the code above Word creates a new instance of itself and loads the document. Finding the executing assembly path is pretty simple. Here's how you can discover it at runtime for any .NET assembly (VSTO or other solution type): string appPath = System.Reflection. Assembly .GetExecutingAssembly().Location; Also, you should read the product documentatio ...Show All
Microsoft ISV Community Center Forums New to VB
I have to do a project in VB Excel. I don't write code and it has been over 10 years since I took any programming classes. I have books on VB but I don't know where to start. I need to have our main invoice spredsheet update automatically when we get new invoices at the end of the month from our printing service. I know what I want to do but not how to code it. I would appreciate any advice. Thanks, Melissa I guess the number one question would be, why have you been given this task It hardly sounds fair... I would suspect that you need to be more specific about what you want to do. You say the invo ...Show All
Windows Forms how to populate a datagridview?
how can i populate a datagridview without a database i'd like to use it as a list. You need to manually create the columns for the datagridview at either design time, or runtime. Check out msdn resources for "Unbound Datagridview" You'll also have to create the rows programatically. ...Show All
Visual Basic Getting the connection string for a project
I'd like to set a string variable to the connection string for a project. I've seen the build connection string module/function and tried to use it but it's hopelessly complex for what I want. I just want the string. Is there an easier way LMAO ROFL!!! That's gotta be the greatest "one-upper" ever! I can't wait to use that one on my company President, Marketing Developer, and Advertising Manager!!! Anyway, don't wanna get too far off topic. Glad that solution worked for ya. Good luck! ...Show All
Windows Forms Dialog ZOrder Behind Parent on Win98 / NT
I beleive I've found a bug in the Windows 98 / NT runtime for .NET framework 1.1. I've an MDI child which opens another form as Dialog. While editing the form I noticed that while clicking on the second control in the tab index on the from caused that form to "fall behind" the parent form. The form was still open but the  ...Show All
Visual Studio Upgrade to VB.net 2005 gives - the given assembly name or codebase was invalid
Just upgrading a VB.NET COM enabled DLL (class library) from VS 2003 to VS 2005 I am getting this error message... Error 1 'The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)' C:\company5\BusClassNET04\LC companybusinessclass5 The file LC does not exist Another similar project compiles OK so I am really confused as to why this is happening. I have tried shortening the assembly name. I don't really understand codebase but the text "codebase" does not occur in the entire project. Any help would be appreciated OK, I found the ...Show All
.NET Development Urgent - ADO XML data ending up in single field
I'm really in seriour trouble, running way behind on a project and have tried everything, I think. I've got to create reports from data that's stored in a text field in XML. I get a recordset using ADO then I invoke the save method on the recordset to generate an XML file. The problem is the is the file that is saved contains a number of fields from the same table as well as the fields from the text field; most of my data is in the text field and just gets strung together as one field. I've tried authenicating the ADO XML file using XML Spy but it gives me error - unable to locate a reference to a support schema type within document. This i ...Show All
.NET Development How to publish website created using Visual Web Developer 2005 Express Edition
Hi Everybody! I created my website using Visual Web developer 2005 Express Edition on my local machine.My database stored on Sql Server 2000 and My web site stored on another Server. Now i like to publish my website.I also have one server having IIS. Any one can please help me how to publish my website for intranet purpose.This web site is used by internal staff within one building. Thank you Kirti email:kirtimistry2001@hotmail.com Hi kirti, There is no way to publish site if you have install studio 2005 express edition, you have to have studio 2005 professional or enterprise serve ...Show All
SQL Server DataBase Connection
hi everybody; my questions about when database connection : i am when connecting database latter receiveing exception error.Error is : An unhandled exception of type 'System.Data.SqlServerCe.SqlCeException' occurred in System.Data.SqlServerCe.dll codes : SqlCeConnection cnn=new SqlCeConnection("Datasource=\\My Documents\\Business\\LOREAL.sdf"); cnn.Open(); // Exception is here help me.. can i doing Mehmet, Try the code below instead - it fixes your connection string and provides you with a way to get more information about specific exceptions you may encounter using SQL Mobil ...Show All
Windows Forms Inserting Multiple Rows With Identity and TableAdapter
Hello, Using VS 2005, Sql Server 2005. I need to create and insert several rows. The table has a primary key which is an identity column. My problem is, using the below code, every row is getting assigned the same PK value. For example, the first row gets inserted fine, but an exception is thrown on the second row: Column 'PrintEditionPK' is constrained to be unique. Value '1' is already present Here's my code: public static void CreatePrintEditionRecords( int printPK, int numberOfEditions) { PrintEditionDataSet . PrintEditionDataTable table = new PrintEditionDataSet . PrintEditionDataTable (); PrintE ...Show All
