Answer Questions
Brendan Grant VB6 Image control in VB2005 used as feedback device in a picture
In VB6 I used Image controls to give visible feedback when the mouse moves over a 'sensitive' area in a picture: set the borderstyle to fixedsingle and set it back to none when it's outside. I am looking for a simple equivalent in VB2005. VB6 Image controls are transparent, but anything I can find in VB2005 in the form of (user-) controls is opaque (right ) and requires a lot of hassle with the underlying image. So the functionality I am looking for is to let the user know where on a picture he can click, for further info and whatever. Without ruining the picture (a bitmap in a picturebox on a panel). Should be easy, but can't find any help in the help. Help! In have a lot of these areas and I want ...Show All
jwadew how to use random function
i want the code for creating random number between say 10 and 20 and random characters say between 'A' and 'G', can any one help Hi, I believe this would be one way of doing it: Dim randomizer As New Random() Dim myNumber As Integer = randomizer.Next(10, 21) Dim myChar As Char = ChrW(Asc( "A" ) + randomizer.Next(0, 7)) Andrej ...Show All
AndyJ_PS Fill Several Combobox with the same values from database
Hi, I have 15 Comboboxes in a form and I have to fill them with the same values from a database table. If I use the same datatable to fill them all at the same time, everytime I select a a value form a combobox, all the rest show the same value !!!!, I don't know why this happens. So I tried to use a function to open a new datatable for each Combobox datasource and works fine, but the problem is that my application turns slower when loading that form. This is my function when all ComboBoxes take the same value when some of them is selected: Public Sub FillCombos( ByVal xComboArray As System.Collections.Generic.IList( Of Windows.Forms.ComboBox), ByVal DBConn As SqlClient.SqlConnection) Dim i As Int16 ...Show All
edward1028 SMTP / Message ID
Is there a way to retain the generated message id from the built in System.Net.Mail.SmtpClient I don't think so since the message-id will be generated and assigned by the SMTP server (not the client). So the Message-ID header value is empty until after the message is submitted for processing. Right.. but if you monitor the process using ethereal, you will see the SMTP server respond with the message-id.. does .Net do anything with this response or store it anywhere I don't think the SMTPClient provides any access to this response. I guess you could use a TCPClient and submit the message yourself... would probably take a little work to work out the trasmission details but that would let you capture any response from t ...Show All
Npotnis digitally signing sample code
Hi, I have tried the code from MSDN reguarding digital signature. But I'm not able to make it work. Here's the code: Sub Signfile(ByVal InputFileName As String, ByVal _ OutputFileName As String) On Error GoTo ErrorHandler Dim c As String Dim s As String Dim MyStore As New Store Dim Signobj As New SignedData Dim Signer As New Signer Dim SigningTime As New CAPICOM.Attribute MyStore.Open(CAPICOM_CURRENT_USER_STORE, "MY", _ CAPICOM_STORE_OPEN_READ_ONLY) Signer.Certificate = MyStore.Certificates.Item(1) ' Open the input file and read the content to be signed from the file. I get errors at these 3 lines: Open InputFileName For Input As #1 Input #1, c Close #1 Signobj.Content = c SigningTime.Nam ...Show All
TJT Registry - REG_SZ
Hi, Please could any one help me decode a REG_SZ key in the registry I am wanting to decode the word 2007 mru list that is stored in the registry under HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Word\File MRU Cheers, Tom. . Only One Tom, In order to decode a REG_SZ key in your registry, I suggest you to read this article titled How To Read a REG_SZ Value From the Registry in Microsoft support knowledge base : http://support.microsoft.com/default.aspx/kb/258556/ This article contains information about modifying the registry. Before you modify the registry, make sure to back it up and make sure that you understand how to restore the registry if a problem occurs. According ...Show All
prithvi4u Command line not shell
Hi, How can I execute a command like executing it from the command prompt through VB. I try "Shell" but it doesn't work. You can Shell with Visual Basic.NET, you can access it by : Microsoft.VisualBasic.Interaction.Shell() And there is also Process.Start() , it can be a good choice too. If you are looking for XCOPY, the code below may help. Public Class Form1 Friend WithEvents backgroundWorker1 _ As System.ComponentModel.BackgroundWorker = _ New System.ComponentModel.BackgroundWorker() Private Sub Button1_Click( ByVal sender As System.Object, _ ByVal e As System.EventArgs) Handles Button1.Click Me .backgroundWorker1.Wo ...Show All
Robert Mileski deployment and setup project
Hi, I am using visual studio.net 2005 to develop a project, now I want to make a deployment and setup package for my project. I have some problems on that. First of all, in my project properties, the section "publish" includes many options for publishing a project. Now in my project, I need to have some prerequisites, and some third party dll components. when I publish in my project, it works very well, however, when I bulid setup project to do that, I don't find any entry to insert these requirements; Secondly, when I build setup project, and add project into my setup project, I notice I can make shortcut in desktop and start menu, but I don't know how to make connection between the shortcut and application or helps file; ...Show All
Sam Jost help in opening new forms
how do i open a new window for a form Edit : I have acutally 7 forms. one of them is supposed to be open all the time. so how do i open a NEW and SEPERATE form Not sure about mobile apps. Haven't done any work with them myself. Hopefully someone else can help you further :) I assume you mean how do you open a new form from an existing form Create a form called frmhello add a button to your form and on its click event put the following Dim frm as new frmhello Frm.showdialog alright. its okay. thank you! Try changing the .showdialog to .show You'll end up with 2 forms being di ...Show All
Virdee Putting a function into another function
I can't find a clear answer to this problem. What am I doing wrong I am having problems writing this piece of code. it is supposed to be a customized function that has within it another function. It is supposed to see if content is Non Numeric. If it is non numeric, a messagebox is displayed, if it is not the message box is not activated, and the software continues to the next argument. Here is a sample of the code: Function TextIsNotNumeric( ByVal txtBox As TextBox) As String If Not IsNumeric(txtBox) Then MessageBox.Show( "input is Not Numeric - Re enter" ) End If End Function 'and this part is where I call the code in the main program Private ...Show All
imj How do I show a confirmation box instead of a MessageBox?
I am trying to find a relatively simple way of showing a MessageBox with a "Yes" and "No"(Confirmation box). Can anyone help me please MsgBox is the VB6 way of showing the messagebox. But in vb.net it is replaced with MessageBox. So If You are working in VB.Net then use it's provided method. But there is no problem in using MsgBox because it is still supproted by .net. Thanks nobugz. Create your own dialog form and place the "Yes" and "No" button there and set the DialogResult property of the button accordingly. and use this form to work as a message box. and show it calling the ShowDialog Method. Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.Ev ...Show All
rwerner Data Validation in DataGridView
I am attempting to validate the data entered into individual cells of a datagridview. I am using the CellValidating event of the datagridview, however the 'sender' element appears to be the 'datagridview' and not the individual cell. Is this the best way or is there a better event to use You can use e.FormattedValue to get content of the cell. Have a look on the code below, I paste it from MSDN example: private void dataGridView1_CellValidating(object sender, DataGridViewCellValidatingEventArgs e) { dataGridView1.Rows[e.RowIndex].ErrorText = ""; int newInteger; // Don't try to validate the 'new row' until finished // editing since there // is not any point in validating its initial value. if (dataGridVie ...Show All
Worf Enable Application Framework - Disappeared - VS2005 Pro
Hi all, Everything was fine until yesterday... Now if I double click My project (Visual Basic 2005) I get to the Application page but the "Enable Application Framework" and "Windows application framework properties" does NOT show. I need to enable the framework to change a couple settings. How can I make this checkbox appear again If I create a new project this option will show perfect. I think the cause of this problem was that I copied and pasted a form, renamed it I got lots of errors and I think I got Application.Myapp corrupted (opened it and saw lots of chinese characters). Closed the copied form, deleted it and I was able to get rid of all the errors (I think Application.Myapp is ok now). I've go ...Show All
ChaosBlade My.Computer.FileSystem -- kinda light, isn't it?
This isn't a specific How To question, but more a philosophical one, so I may be in the wrong place... It involves the My.Computer.FileSystem, which--if I read my indicators properly--seems to be poised to completely replace the older FileOpen, FilePut, FileGet, etc. and I say this because the latter are referred to as being "provided for backward compatibility". This usually means it won't be there at all in another version or two... Don't get me wrong, I love progress. Find a way for us to stop inventing that dang wheel over and over again and I'm your best buddy. But when I look deeply into My.Computer.FileSystem, just about everything there pertains to Text files. There are two functions left for binaries, ReadAllBytes() and WriteAll ...Show All
GLutz78 List View problem
hi all I Have two list view in a form. List view 1 contains users while listview 2 contains roles assigned to each selected user. My problem is that i want when i select a user (say Item(0)), List view 2 to display all the roles assigned to him with a check and those not assigned without a check. Am using a dataset which contains all the roles available and the users assigned to those roles. Am able to load the list view with all the available roles but am Unable to check those roles assigned to specific users. my question is how to check roles that matches the roles of the specific user in the dataset Hi, I would suggest you create an array to hold string values such that>> '---- ...Show All
