I started using MSScript Control a while ago, and it was working fine. Then I started a new project, and it breaks my whole form... I copied the exact code from my other project where the code works.
Imports System.Threading Public Class Form1 Public TEngine As MSScriptControl.ScriptControl Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
I'm writing some VB2008 code to control four 7-seg LEDs I bought from Velleman. They came with some example code in VB 5.0, and with instructions telling me to input 5 bytes at a time in the format Chr$() & Chr$() & etc. for the rest of the 5 bytes. When I try to do this using VB2008, it rejects the $ sign, so I've tried it using the Chr() format, which VB2008 allows. However, it doesn't work. Is Chr() the new version of Chr$() or are they different entities? In sending data to the LEDs, I'm using LiveComPort.WriteLine() as my command. (My serial port is called LiveComPort) I also tried it with LiveComPort.Write() asthe command. I know that my serial port and the LEDs are working, because they respond to the demo program provided by Velleman.
I want to connect a vb.net code , with a different application ( the user denyed from access them untill he enter a password in the vb.net window that appear when he click on that applications )
I am trying to make a new label be created everytime the user clicks a button. But at the moment when the user presses the button It only creates one, if the users clicks the button again. Nothing happens.
This is my current code I use:
[Code]...
I know that the label is not being created on top of each other because the location values changes everytime the user clicks the button.
I am working on a form with several databound textboxes, each with its own label to identify it. I would like for the label to enable/disable based on code logic. I see the label properties in design mode, but cannot access the label properties in code. The intellisense tells me my label name is not declared. Am I not able to access label properties as in vb6 or the same as a textbox?
I have never dealt with dynamic control events before. I have a variable number of a controls each created at runtime. However I don't know how to code events for each control as they should do different things. I've looked at WithEvents and AddHandler and know I have to use Sender however not sure how to use /where to put eg. MouseEnter 1 panel when there's several.
Though I know your site ask for some effort on my part im not exactly sure where to start.. I know how to code some decent things and such but recently I wanted to make a serial code system.. What Im looking for is to have a list of Serials on my website (possibly through MySQL? Or something simpler Not sure on this either) I know about the obvious
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If TextBox1.Text = "BLAH123" Then MsgBox("Valid Registration key. Thank you")
[CODE]...
But I do not like this system as I have no control over multiple uses. I want to pull the keys from my website (hell through a notepad if its easier) therefore allowing me to delete and add serial keys as needed..
I'm working on an application that uses a control with up, down, left and right user bottons to move a box in another control (another form). I know the name of the control. If I place the buttons in the same form, I'm able of keeping the focus on the control that have the box, by using:cvsDisplayControl.focus()
I tried to compile the control with this instruction within the code, but I got a errors since this the display control is not part of the one that has the buttons. Something that can help me is a way to assign tha name of the display control in runtime or read it from a file so the control can be compiled ok.
Here the code behind... I'm trying to retrieve this control so I can add items to the drop down list (I'm retrieving the Role Groups to add to the drop down list in the code-behind)
Protected Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim DDRoleGroups As DropDownList
I'm looking for a control like the image bellow, treeview combined with a listview, and with editable cells.does someone have a sample code or some information on how can i do this?
Just about every day as I build my app and run/test it, I click on a control (button, grid, anything) and nothing happens.I double-click the control in design mode, and it's like clicking on a new control, no code is there.It turns out that the control loses the part of the line of code.[code]This has happened so often that I know I'm not deleting it accidentally.
Sorry about the bad title. Just wondering if it is possible to use a control name as parameters rather then doing the same code over and over again. Example.
I have a lot of ListView control on a form and I'd like them to have the same Click event . The problem is that I would like that be done by code . The reason is not only that they are many so it would take time to select them all one-by-one , but also in the future I might add more or even change the name of some of them . So , is there any way that we specify (by code) an event to be the Click event for all of the ListView controls , no matter how many they get to be and no matter what their names are ? The editor I am using is VS2008 , not VS2005 that I specified in the topic's name .
I've created another header row for a gridview programmatically. In this row I have a few controls including a label that I want to align all the way to the left of the cell. The one cell has a columnspan of 7 so it runs across the entire gridview. how do i align that label programmatically?
Dim cell As New TableCell Dim lblfilter As New Label Dim row As New GridViewRow(-1, -1, DataControlRowType.Header, DataControlRowState.Normal)
I've created another header row for a gridview programmatically. In this row I have a few controls including a label that I want to align all the way to the left of the cell. The one cell has a columnspan of 7 so it runs across the entire gridview. how do i align that label programmatically?
Dim cell As New TableCell Dim lblfilter As New Label Dim row As New GridViewRow(-1, -1, DataControlRowType.Header, DataControlRowState.Normal)
I tried to add a calendar control column to a datagridview using code i found on the internet, and for some reason now im getting a designer error that i have no clue how to fix.
I created a DatePicker user control (ASP code below, no code behind) which is simply a textbox, image button, and a sometimes visible calendar.
[Code]...
Can I somehow tie or pass the value of the TextBox as the value of the whole control to use in the calling code? EDIT: My actual goal here is to be able to tie the SelectedDate as a parameter of a database query. I was able to select values for the other parameters in a controls dropdown list in a query parameter configuration window.
Private Sub CheckBox1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged mycommand = New MySqlCommand Dim daMyName As New MySqlDataAdapter
[CODE]......................
The bold part is my problem. its about date time picker. there is no error but whenever i choose a date that was handled on the specific day, there is no data displayed in my excel file with the selected date. but in my database, there was a ticket handled on the day that i picked.
In my old VB6 programs I use control events like Keydown to activate code. The code is the same for all text controls. However, I am hoping that there is a efficient way of handing this in VB.net. Using VB2010.
Private Sub txtField1_KeyDown(sender As Object, e As System.Windows.Forms.KeyEventArgs) Handles txtField1.KeyDown ButtonState2() End Sub Private Sub txtField2_KeyDown(sender As Object, e As System.Windows.Forms.KeyEventArgs) Handles txtField2.KeyDown [Code].....