MrHorizontal's Q&A profile
Visual Studio Print problem
When i hit the print button in the report, it does'nt print the first time, or it prints the document after a few minutes. Need help, pls... I found an answer, and it did the job, 10x! http://forums.microsoft.com/MSDN/ShowPost.aspx PageIndex=2&SiteID=1&PostID=177732&PageID=2 ...Show All
Windows Forms DataGridView Control replacing certain values with a string
I have a datagridview control which uses an array of class objects as its data source. Is it someway possible to set it up so that certain values in the data are shown differenty in the control. What I actually want to do is when the value is -1 show either nothing or a dash. Cheers, Gareth Hi Gareth, you could use the CellFormatting event for formatting your original data, something in a way of: private void dataGridView1_CellFormatting( object sender, DataGridViewCellFormattingEventArgs e) { // You can adjust the column/type/value checking here, according to your needs if (e.ColumnIndex == 1 && e.Value != null && e.Value.ToString() == "-1&q ...Show All
SQL Server Deleting an entry during run-time
I am trying to delet a row duing run-time but everytime i go to save the program I get an error message saying: "Update Requires a valid DeleteCommand when passed DataRow collection with deleted row. Anyone any ideas hi, this problem would be probably better answered in .Net forums, as this seems to be related to your actual .Net code, VB or c# or the like.. anyway, you should provide the adapter you are using to submit changes with the appropriate DeleteCommand .. regards ...Show All
Visual C# Getting Image Source URL
Hey everybody, I'm trying to drag-and-drop an image from a web page to my application. What I wanna do is to get the image source url.. When I drag an image to my app. I got the image itself or the target link (if the image is a link HREF).. How can I get the source url of the image.. For example, in the upper-left side of this forums there is a "msdnR" image.. When I drag and drop it to my app, I got as a result the image itself and the target of the image ( http://msdn.microsoft.com ).. What I want from my app to do, is to give me the location of the image itself, in this example, I wanna get http://forums.microsoft.com/library/toolbar/3.0/images/banners/msdn_masthead_ltr.gif as a result.. Can you help me ...Show All
Smart Device Development PhoneCall with CF?
Hello, is it possible to establis a PhoneCall by using the Compact Framework I donst find anything about it and search the hole day. Only by using unmanaged code I think (I can’t code c++) or by using OpenNetCF which I don’t want to use. Can anyone Help Thank you so much twickl NETCF itself does not include support for that, but it is possible via TAPI. As you already know there's TAPI wrapper from OpenNetcf.org. If you don't want to use it then you'd need to create your own TAPI wrapper. It does not involve any actual C++ but very good C/C++ understanding and TAPI familiarity is required. Or, if you're developing for Windows Mobile 5.0 and don't need support for older platforms, you can use Micr ...Show All
Windows Forms DataGridView.Sort explodes after modifying/adding row(s)...
I am creating a little app that has a DataGridView to keep track of tasks. In the DataGridView I have several columns - an id (a textbox column set with the ValueType of Type.GetType("System.Int32")), a priority, an image column (representing the priority with an image), and a few other text, date, and checkbox columns. When I first load my application, I read in the data from a DataTable in a DataSet, and create a new row in the DataGridView for each row in the DataSet. This allows me to select the right image for the image column based on the value of the Priority column. When the application shuts down, it does something similar - for each DataGridViewRow in the DataGridView, it extracts the data that needs to be written to the disk, ...Show All
SQL Server Distributed Transactions between servers on different VLANs
Hi there, I have two SQL servers, SERVERA and SERVERB. They are on two different VLAN's within our corporate network. They are physically only about 5 feet apart. SERVERA is SQL2005 while SERVERB is SQL2000. I am running a distruted transaction as a result of an insert on SERVERA which then causes a Stored procedure stored on SERVERA to insert a record on a table on SERVERB. I know my syntax is correct, 'cause I can get the Process to work between two servers (one SQL2000 and the other SQL2005) on the same VLAN. But when I run it in the problem environment, I get the following error message: SQL Execution Error Executed SQL Statement: INSERT INTO Tablea(recordid, recordtext) values(3, 'Testagain') Error source: .Net SQLClient D ...Show All
Visual Basic GDI newbie help
I am jus beggining to work with GDI with visual basic. Trying to draw a line with the system graphics, I get a nulll exception error. Dim bb As System.Drawing.Point bb.X() = x_plot bb.Y() = y_plot hit.DrawLine(Pens.Black, x_plot, y_plot, 580, 195) I get the error on hit. what I am missing. Thank for help Dim TmpGraphics As System.Drawing.Graphics = System.Drawing.Graphics.FromImage(PictureBox1.Image) TmpGraphics.DrawLine(Pen, X1, Y1, X2, Y2) PictureBox1.Refresh() ...Show All
.NET Development Best method to insert the content of an XmlWriter into another XmlDocument?
I have an XmlWriter stored as a MemoryStream. I would like to insert it into an existing XmlDocument. So far I have loaded the XmlWriter into its own XmlDocument and then imported the nodes into the existing XmlDocument. Is there a better way using XmlDocument of doing this Thanks, Tad p.s. I have used the CreateDocumentType (see below) in my code but it appears incredibly slow. Is there a faster method of creating the Document Type element When I tried it on my XmlWriter it raised an error. xmldoc.AppendChild(xmldoc.CreateDocumentType("svg","-//W3C//DTD SVG 1.1//EN","http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd",null)); Thanks Sergey. Using this method, How do ...Show All
Windows Forms ArgumentException from BindingSource when closing a form
I have an issue where closing a form containing a binding source results in an unhandled exception as follows: Unhandled Exception: Cannot bind to the property or column StartDate on the DataSource. Parameter name: dataMember System.ArgumentException Stack Trace: at System.Windows.Forms.BindToObject.CheckBinding() etc... Any idea what the cause of this is It's thrown once the OnClosing has completed and the form is being disposed, but only happens on a couple of forms whereas most are fine. All of the forms inherit from the same base class, so I'd assume the issue relates to the form, or the data object bound to the BindingSource, but there's nothing different in the ones that throw this exception as far as I ...Show All
.NET Development New column problem....!
I made a procedure Public Sub Novo(ByVal nova1 As String, ByVal nova2 As String) that creates a new oledbDataAdapter with insert update select and delete commads. I also added that commands can change depending how many columns are in a Table (insSql). Dataset is Studenti1data, I made it by the new data source wizard,and made datagridview and bindingsource draging Table1 to Form2. I use Access database. I add a new column with this code: Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click Dim noviStupac As Data.DataColumn = New Data.DataColumn("Test Marko", System. ...Show All
Visual Basic Full Text Search in Visual Basic
I am trying to create a simple full-text search application in Visual Basic (2005 Professional trial version). I have been successful in doing full-text searches within SQL Server Management Studio using SQL queries, so the database has a working catalog, index, etc. Here is a sample SQL query statement that I have used in SQL Server Management Studio: SELECT SectionText FROM Full_Documents WHERE CONTAINS (SectionText, ' "radio" '); This query returned all the rows containing the word “radio” within the SectionText column of the Full_Documents table. I have placed a textbox (SearchTextBox), button, and listbox on a form in VB. I want to be able to type a word in the textbox, clic ...Show All
Visual Studio 2008 (Pre-release) XBAP, Webclient and the Current Credentials?
Hi everybody! I’m wondering if it is possible to supply the WebClient with the current windows user information I am trying to webclient my way to a page inside a web publication system that authenticates via the current windowsuser. Using the WebClient.UseDefaultCredentials = true does not work, i still get an exception which says that a request for a System.Security.Permissions.EnviromentPermission failed. Is it possible to do this witin an XBAP, or is this not available in the sandbox many thanks /Simon The XBAP cookie problem is two-fold - it doesn't work at all if the XBAP is hosted in a frame, and when it is a top-level applicaiton, it can only access cookies that are written to the hard drive. X ...Show All
.NET Development Returninig a string from the Main method in a Console Application
Can I return a string value from the Main() method of a Console Application The scenario I am looking for is: 1. Program1 returns a string (say "hello") 2. Program2 must take this as input and process the job as required (say print "hello" twice). Is it possible for me to return a string instead of an integer or nothing using Main() method No it's not. What you can do is write the standard output stream from Program1 (e.g. using Console.WriteLine) and read from the standard input stream into Program2 (e.g. using Console.ReadLine). Then you can pipe text from Program1 to Program2 on the command line. e.g.: C:\> Program1.exe | Program2.exe ...Show All
Windows Forms Step by step instruction. Open Form2 from Button on form1 C#
Hi, anyone able to tell me please how to.. Click on a Button i named Next on Form1.. it will then open Form2 page not as an extra page.. but as though its a new page on the same window. ty Hi, Woody There 3 ways: tabcontrol containing two tabpages, two panels in one form, two forms M1: Drag a tabcontrol in which lies two tabpages this .tabControl1.Dock = DockStyle .Fill; this .tabControl1.Region = new Region ( new RectangleF ( this .tabPage1.Left, this .tabPage1.Top, this .tabPage1.Width, this .tabPage1.Height)); Switch the panels by tabPage1.Hide(); tabPage2.Show(); M2: similar to M1, difference is previous use tabpage, here use panel. M3: To ...Show All
