Answer Questions
Robert F Bouillon textbox visible priority set to "false" will not keep value (how-to use Form Field)
Hi, This should be simple to do but I just can't figure how to fix the problem. I have a form with one master table and 20 other tables showing related data. The data is linked by the key value in the master form. For example, I have a "Long_Desc" variable in the master table which holds the ky value for the descriptions I keep in the "descriptions" table. Maybe I am doing this wrong but I in my test, I was displaying the content of the key "Long_Desc" in a read-only TextBox just to make sure I was getting the right record from the "descriptions" table. I could also display the content of the "Long_Desc" TextBox using a messagebox. Now, I would like to hide the the "Long_Desc" field on the form. I set the "ReadOnly" priority to True and "T ...Show All
Pedro Felix Two Bugs in HTML Select Element
I believe I have found 2 bugs in the Select HTML element. If you enter server-side of: ddService.Items.Item(index).selected = true ddService being the ID of the <select> element with a runat="server" attribute the code that is generated is <option selected="selected" value="3233">Some option text the proper structure is <option selected value="3233">Some Option text The same is true for the multiple attribute. the code that is generated is multiple="multiple" Microsoft's own documentation states that the proper values for selected and multiple are true/false. Thanks, PS: I would appreciate a fix for this before I am too old to enjoy it ...Show All
ThE_lOtUs DBGrid/MSFlexGrid Help for Display
I am working with DBGrid/MSFlexgrid. By Default, Table Fields are displayed as "Columns" and Record as "Rows" My requirement is that I want it other way round, I want Fields as "Rows" and Record as "Columns" Doea anyone know about such properties setting or runtime code or any thrid party control tool that will help me with my requirement Please respond.... Thanks ...Show All
Jan Byvaly Report Manager - cannot give rights to the user that is not in domain, MachineName\UserName doesn't work.
In order to let the user to view reports, that user should be given rights by using report manager area. If my machine and report server are in the same domain then I am able to give rights and it works fine. But if the machine are not in domain then I am not able to give rigths as when I specify MachineName\UserName it gives the error as mentioned below: The user or group name 'FINENG\vishal' is not recognized. (rsUnknownUserName) FINENG is the domain name and vishal is the user name. What if the Report Server itself if not in the Domain Any help is highly appreciated. I am using VB.net and SQLServer reporting services. But In order to set the rights I use the Report Manager area of the report server. ...Show All
Joe H. BITBLT not working?
I have 2 bitmaps in memory; one is an original copy of a picture and the second I intend to block out parts of, and display it. my bitmaps are named b1 and b2. b1 is loaded from a file (and converted to a 32bpp bitmap along the way) b2 is created with the same height, width, pixelformat, horizontal and vertical resolutions. (but empty) I then attempt to copy part of b1 into b2 using BITBLT. (I don't want to use Graphics.DrawImageUnscaled - the reason being that I intend to copy parts of the image in the future) I assign b2 to a picturebox, but it displays a blank image. Here is the code which doesn't seem to work: pbox2.Image = Nothing Dim g1 As Graphics = Graphics.FromImage(b1) Dim hdc1 As IntPtr = ...Show All
MatthewMaas Listbox
hello, How can I retrieve the values the user selected from a listbox with a selection mode set to = SelectionMode.MultiExtended From what you appear to have done - you need to specifically cast each item to a datarowview which is probably what was used in the databinding scenario. The following code show demonstate this - most of the form load is creating a datatable and then a dataview from it which is being used for the databinding on the listbox. The button click event will display the selected item values. Public Class Form1 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim dt As New DataTable dt.Columns.Add("col ...Show All
dfullerws Vertical label
I would like to add a vertica label on my from, is there somebody can help me with that I assumed you wanted the text vertical too. Add a new class to your project and paste the code shown below. I couldn't get it quite perfect, MeasureText is behaving oddly. Imports System.Text Public Class VerticalLabel Inherits Label Private mSize As Size Public Sub New() AutoSize = False End Sub Private Sub CalculateSize(ByVal value As String) mSize = TextRenderer.MeasureText(value, Me.Font) Me.Height = mSize.Width Me.Width = mSize.Height End Sub Public Overrides Property Text() As String Get Return MyBase.Text End Get Set(ByVal value As String) MyBase.Text = val ...Show All
DanoruX Date time
I need to pull the filecreation date and have it in a format of mm-dd-yyyy. I can use creationtime to get mm/dd/yy hh:mm:ss and then a toShortDate to get mm/dd/yy How to replace the / with - Thanks! Hello Ryan. You will want to actually use the .ToString method on your DateTime which allows you to use custom format specifiers . Dim FormattedString As String = MyDate.ToString("MM-dd-yyyy") Documentation to link above should be followed so you remember where to go in the future. Hope this helps. This gave me exactly what I needed! Thanks so much! the pattern s/b "yyyyMMdd" mm=minutes MM=m ...Show All
NeoNmaN Special Characters in XML File
Hi all, I have a little problem with XML. This XML file is a UTF-8 codeification and most of the times a "tiny square" appears inside the text, I know I can replace the character but I just don't know which character is. Working with VB.NET (System.xml and System.XML.Path), I tried to get the char number but I get two values: 63 and 13 Dim CharWeird As Char = GetChar(xString, 15) ' 15 is the position of the character (zero based) CharWeird = 63 BUT if I..... Dim CharWeird As Double = Char .GetUnicodeCategory(xString, 14) ' 14 is the position of the character (1 based) CharWeird = 13 Not to mention that if I lookup the char inside the string: xString.IndexOf(63) or xString.IndexOf(13) it always returns -1 me ...Show All
Tadwick Checking negative values in a DataGridView
Hi there, I have one dataGridView and there are some columns. I'm using DataGridView to capture some values and one of the column can accept either whole numbers or decimal values. What i do want to check it - sign or negative value as I don't want the user to input any - value. Is there any way to do it Thanks in advance Bye Hi Check out the System.Math.Sign function ... it returns -1 for negative values, 1 for positive and 0 for zero. Richard ...Show All
furjaw unable to cast COM object error
Hello, I am having a strange problem that I can't seem to figure out. I am using visual studio 2005, visual basic, .net 2.0. In my application I am using the Microsoft Internet Controls COM object to automate an Internet Explorer instance. The whole application runs fine in debug and release on my development WindowsXP machine. When I publish the project to Windows Server 2003 to run as a release, I receive the following error. I was reading some posts on registering COM components, etc, but I was not sure why this would run fine on my dev machine and blow up on the release box. Both machines have the same versions of .Net on them. Any insight on where to go, or how to register the COM component would be appreciated, as I am new to ...Show All
Bigmo wrong Count of Records
Hi, I am having troubles with the count of records in a Form. All my Tables used in my Access database are linked tables to an SqlServer. The Form I use is a wizzard created form and the recordsource is simple like "SELECT * FROM tab1 join tab2 ..". I want to display the number of records in the form, but it seems, that the recordset does not load all records at once. What i did is: Private Sub Form_Current() lblRecordCount.Caption = Recordset.RecordCount End Sub But when I open the form, it displays just "16", if i move to a record below, it changes to "28", when i scroll to the end it finally displays "100" - which is really the right count. I tried this also with a new database, where i created a table with 500 records ...Show All
wencey combining datatable and buttonGridCell in dataGridView
I have a dataGridView that I would like to consist of a couple regular columns, then an buttonCellColumn, then a imageCellColumn, followed once again by a regular column; text text buttons images text; I would like each of the text columns to be bound to a datatable, but don't necessarily need the buttons and images to be (though its fine if they are). Q1. Considering I have 18 rows, is this OK to do from a GUI performance point of view (the images will be very small) Q2. In general terms, how do I do this. I know how to create the datatable, bind the dataGridView. I can even add the buttonImageColums. The part that confuses me is then adding the final text column - since I really want it to be part of the bound data ta ...Show All
Andrew Buyan Use a class passed by reference when the unmanaged function demands two levels of indirection.
msdn help states that for passing structures using p/invoke; Use either a structure passed by reference or a class passed by value when the unmanaged function demands one level of indirection. and Use a class passed by reference when the unmanaged function demands two levels of indirection. I am calling the following 'unmanaged' C++ function from vb.net int EXPORTED GetValues(long lSegmentIndex, sStructA * pStructA ) I need to fetch values for szName of sStructA and var1 of sStructB. Is that 2 levels of indirection If so, do I need to lose my struct, which worked for vb6 and use a class now Thank you. greg typedef struct sStructC { enumeratedValue ...Show All
S. Visual Basic 6.0 and MS Access linking pictures!
Hey all, im a student in a UK college, using VB for my coursework in computing. Basically, i can't get a hold of the code for something which i think is important in my project. First, let me put it into context, my project consists of a program for use in an opticians, so "stock control" is one of the forms. Thus, i have a database of the available spectacles, linked to the form via an ADO control. My intention was to place images in the database, then have a set space on the form in which the image will change according to the record. E.g. if i move "next, next, last" the image would correspond to the last set of spectacles. I tried a basic hyperlink from the directory in the database (which is MS access btw) but that didn't seem t ...Show All
