Search Results

Search found 4472 results on 179 pages for 'vb'.

Page 16/179 | < Previous Page | 12 13 14 15 16 17 18 19 20 21 22 23  | Next Page >

  • vb.net designing questions

    - by ferrer
    i have created a dynamic table through vb.net, so htmltable, htmltablerow, htmltablecell. I have added all style and properties in there. so eg. dim td as htmltablecell td.style.add("width","100px") td.style.add("color","blue") now what i want to do is add the tag to each row. this is because the first td of every row is a checkbox. and then textboxes follow. So when anyone clicks on the textbox, i want to checkbox to get checked. Any idea how I can do this?

    Read the article

  • Using a .txt file Resource in VB

    - by Tony C
    Right now i have a line of code, in vb, that calls a text file, like this: Dim fileReader As String fileReader = My.Computer.FileSystem.ReadAllText("data5.txt") data5.txt is a resource in my application, however the application doesn't run because it can't find data5.txt. I'm pretty sure there is another code for finding a .txt file in the resource that i'm overlooking, but i can't seem to figure it out. So does anyone know of a simple fix for this? or maybe another whole new line of code? Thanks in advance!

    Read the article

  • Strong name validation failed on VB.NET Assembly

    - by Matt Baker
    I have a VB.Net 1.1 application works just fine after compiling in Visual Studio. However, I want to use ILMerge to combine all the referenced assemblies into a single executable just to make it easier to move around. After I send it through ILMerge and try to run it I get the error "Strong name validation failed for .exe" ..... But none of my stuff is strong named! I saw this post here: http://stackoverflow.com/questions/403731/strong-name-validation-failed and tried running it through 'sn.exe -Vr .exe' but that gives me this error: ".exe does not represent a strongly named assembly" Has anyone else had this problem before? How do I fix it?

    Read the article

  • trying to connect mysql with vb.net

    - by user225269
    I've found this at connection strings.com http://connectionstrings.com/mysql Do I need to download connector-net from this site: http://dev.mysql.com/downloads/connector/net/ I recycled the code that I used in connecting vb.net with ms sql: Imports system.data.sqlclient idnum = TextBox1.Text lname = TextBox2.Text fname = TextBox3.Text skul = TextBox4.Text Using sqlcon As New SqlConnection("Server=localhost;Port=3306;Database=testing;Uid=root;Pwd=nitoryolai123$%^;") sqlcon.Open() Dim sqlcom As New SqlCommand() sqlcom.Connection = sqlcon sqlcom.CommandText = "INSERT INTO [student](ID, LASTNAME, FIRSTNAME, SCHOOL) VALUES (@ParameterID, @ParameterLastName, @ParameterFirstName, @ParameterSchool)" sqlcom.Parameters.AddWithValue("@ParameterID", TextBox1.Text) sqlcom.Parameters.AddWithValue("@ParameterLastName", TextBox2.Text) sqlcom.Parameters.AddWithValue("@ParameterFirstName", TextBox3.Text) sqlcom.Parameters.AddWithValue("@ParameterSchool", TextBox4.Text) sqlcom.ExecuteNonQuery() End Using But I get this error: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) Please help, what solutions would you recommend to this problem?

    Read the article

  • Java ByteBuffer to VB .NET

    - by user1797258
    I have this java code : ByteBuffer p = ByteBuffer.allocate(packet.length - 10 + 14); p.order(ByteOrder.LITTLE_ENDIAN); p.putInt(packet.length); p.putInt(packet.request_id); p.putInt(packet.type); p.put(packet.paylod); p.put((byte) 0); p.put((byte) 0); And i want to translate it to VB .NET I started with this : Dim p(packet.length - 10 + 14) As Byte But after i dont know how to put these variables in the right way

    Read the article

  • Opening a password encrypted access database using DAO VB.NET

    - by prasoon99
    I create a database like this: Sub Main() Dim wrkDefault As Workspace Dim dbE As DBEngine Dim dbs As Database 'Get default Workspace. dbE = New DBEngine wrkDefault = dbE.Workspaces(0) 'Set the database filename Dim DBFilename As String DBFilename = "c:\mydb.mdb" 'Make sure there isn't already a file with the same name of 'the new database file. If Dir(DBFilename) <> "" Then MsgBox("File already exists!") Exit Sub End If 'Create a new encrypted database with the specified 'collating order. 'lock database with the password 'hello' dbs = wrkDefault.CreateDatabase(DBFilename, _ LanguageConstants.dbLangGeneral & ";pwd=hello;", DatabaseTypeEnum.dbEncrypt) dbs.Close() End Sub How do I open this database again in VB.NET using DAO?

    Read the article

  • How should moq's VerifySet be called in VB.net

    - by Bender
    I am trying to test that a property has been set but when I write this as a unit test: moqFeed.VerifySet(Function(m) m.RowAdded = "Row Added") moq complains that "Expression is not a property setter invocation" My complete code is Imports Gallio.Framework Imports MbUnit.Framework Imports Moq <TestFixture()> Public Class GUI_FeedPresenter_Test Private moqFeed As Moq.Mock(Of IFeedView) <SetUp()> Sub Setup() moqFeed = New Mock(Of IFeedView) End Sub <Test()> Public Sub New_Presenter() Dim pres = New FeedPresenter(moqFeed.Object) moqFeed.VerifySet(Function(m) m.RowAdded = "Row Added") End Sub End Class Public Interface IFeedView Property RowAdded() As String End Interface Public Class FeedPresenter Private _FeedView As IFeedView Public Sub New(ByVal feedView As IFeedView) _FeedView = feedView _FeedView.RowAdded = "Row Added" End Sub End Class I can't find any examples of moq in VB, I would be grateful for any examples.

    Read the article

  • Best way to deploy VB.NET Code / create an assembly on a SQLServer

    - by 1passenger
    I've created some functions / procedures with VB.NET and want to deploy them to a SQLServer. Within Visual Studio you can click right and select "deploy". An assembly will be created on the server and a lot of functions and procedures. It's really easy. Now I want to script the whole deployment process. What is Visual Studio doing when I make a deployment? Can Visual Studio autoscript all the deployment steps for me? Can I save it to a file and execute it manually?

    Read the article

  • Problem using DataGridView Control of VB.NET 2008

    - by Tareq
    Hi, I am using VB.NET 2008 based on Framework 3.5 I use a datagridview control on a form and the form's load event as follows: Private Sub frmServiceSettings_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load With dgvFinishedProduct Dim myCombo As New DataGridViewComboBoxColumn ... I generate the combo here from the result of my database .Columns.Add(myCombo) End With End Sub Now when i want to get the data that is set in this column, there is no problem. But if I want to set the data programmatically, there arises problem. How can I solve the problem? If you want more info, please let me know.

    Read the article

  • Stripping variable names from VB.Net assemblies

    - by CFP
    Hello every one :) I'm trying to reduce as much as I can my VB.Net assembly side, and I just figured out that all variable names were kept unchanged in the actual assembly. Since I tend to use pretty long var names, it adds up and, by running dotfuscator on my assembly, I could shrink it by as much as 10%. Thus I wonder: is there any way to tell Visual Studio to use shorter var names in the generated assembly? Are there any downsides to using dotfuscator (I'd rated avoid it though, since it'd need to be called after every compilation, therefore forcing me to update my build scripts...)? Thanks a lot, CFP.

    Read the article

  • Converting 24BPP to 4BPP with GDI+ in VB.NET

    - by Chris
    My VB.NET program currently takes a 4BPP TIFF as an Bitmap, converts it to a Graphic, adds some text strings and then saves it out again as a TIFF file. The output Bitmap.Save() TIFF file by default seems to be 24BPP (regardless of the input) and is a lot larger than the original TIFF. Is it possible to keep the same 4BPP palette encoding as the input for the output and if not, how can I convert my Bitmap PixelFormat from 24BPP to 4BPP Indexed. I've seen an example for converting 24 BPP to 1 BPP at http://www.bobpowell.net/onebit.htm using BitmapData.Lockbits() but cannot figure out how to do it for 4BPP. Many thanks Chris

    Read the article

  • VB listbox cannot be indexed because it has no default value

    - by Shane Fagan
    I have a listbox and I want to loop through each of the items to see if the string im looking for is inside. I know I could do .contains but that wouldnt look at substrings. The code im using looks like this: While tempInt > Listbox.items.count then if searchString.contains(listbox(tempInt)) then end if tempInt+=1 end while Everything in the loop is fine but VB gives an error on the listbox(tempInt) part. The error is "class windows.forms.listbox cannot be indexed because it has no default value". Can anyone help get around the default value crap? I tried putting in a blank string but no change.

    Read the article

  • Print ms access data in vb.net

    - by user225269
    How do I print the ms access data(.mdb) in vb.net? Here is the code that I'm using to view the data in the form. What I want to do is to be able to print what is currently being viewed. Perhaps automatically save the .pdf file and the pdf viewer installed on the system will open that newly generated pdf file Dim cn As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\search.mdb") Dim cmd As OleDbCommand = New OleDbCommand("Select * from GH where NAME= '" & TextBox6.Text & "' ", cn) cn.Open() Dim rdr As OleDbDataReader rdr = cmd.ExecuteReader If rdr.HasRows Then rdr.Read() NoAcc = rdr("NAME") If (TextBox6.Text = NoAcc) Then TextBox1.Text = rdr("IDNUMBER") If (TextBox6.Text = NoAcc) Then TextBox7.Text = rdr("DEPARTMENT") If (TextBox6.Text = NoAcc) Then TextBox8.Text = rdr("COURSE") End If -some sites for beginners regarding this topic would help a lot:)

    Read the article

  • Backing Up Database from Remote Server to Local in VB.NET

    - by Pradeep
    Hi, I am making a VB.NET application that can download/backup the database that is currently on a remote server. I have Remote Server IP,Username,Password and Database name. I am also able to connect to it. But i don't know what to do after connecting to it. I don't know what all files are need to be backed up. ( i think database and log file both must be backed up, i am not sure ) please let me know that basic commmands that i will need to backup the whole database. Thanks in advance.

    Read the article

  • VB.net Cross-Thread

    - by PandaNL
    Hello, I have a cmd command that needs to be executed, when the command starts it starts to fill a progressbar. When the cmd command is done the progressbar needs to fill up to 100. This is the code i use, but it gives me an error when the progressbar.Value = 100 comes up. Public Class Form1 Dim teller As Integer Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TimerProgressbar.Tick teller += 1 ProgressBar1.Value = teller If ProgressBar1.Value = ProgressBar1.Maximum Then TimerProgressbar.Stop() End If End Sub This are the tow commands in another private sub where the app is crashing on ProgressBar1.Value = 100 TimerProgressbar.Stop() When i debug it and i try it out it crashes on ProgressBar1.Value = 100 But when i build it under Windows 7 it runs fine without crashing, however a few people reported me it crashes on there Windows xp system. VB gives me a suggestions about Cross Thread, but i don't know how i could make it work with this.

    Read the article

  • Dynamically Adding Multiple User Controls vb.net

    - by Jamie Hartnoll
    I have a User Control which returns a table of data, which in some cases needs to be looped, displaying one on top of another. I am able to dynamically add a single instance of this by placing a fixed placeholder in the page. I am now trying to work out how to add more than one, given that I don't know how many might be needed I don't want to hard code the Placeholders. I've tried the following, but I am just getting one instance, presumably the first is being overwritten by the second My HTML <div id="showHere" runt="server"/> VB Dim thisPh As New PlaceHolder thisPh.Controls.Add(showTable) showHere.Controls.Add(thisPh) Dim anotherPh As New PlaceHolder anotherPh .Controls.Add(showTable) showHere.Controls.Add(anotherPh) How do I make it add repeated tables within the showHere div?

    Read the article

  • VB.Net variable declaration

    - by dcp
    I notice that both of these compile without any compiler warnings or errors, even with Option Strict and Option Explicit both turned on: Dim x As Exception = New Exception("this is a test") Dim y = New Exception("this is another test") My question is, is it more proper to use the first way (see variable x) or the second way (see variable y)? My guess is that VB doesn't need the As clause since the variable is being initialized in place, so the compiler can infer the type. I tend to like the first way as it just "feels" right and is more consistent with other languages like C#, just wondered if there was some good reason for one way over the other. I guess it's really personal choice.

    Read the article

  • reading excell file in vb.net

    - by Mark
    can anyone help me on how to know EOF of excel using vb.net? i have this code but it crash when i try delete the proceeding rows from row 6 to downward. my problem is, my code was still reading a null values of rows that i deleted in excel.. this is my code: Dim xlsConn As New OleDbConnection Dim xlsAdapter As New OleDbDataAdapter Dim xlsDataSet As New DataSet xlsConn = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & pathName & " ; Extended Properties=Excel 8.0") strSQL = "SELECT * FROM [Sheet1$]" xlsAdapter.SelectCommand = New OleDbCommand(strSQL, xlsConn) xlsDataSet.Clear() xlsAdapter.Fill(xlsDataSet) ListView1.Items.Clear() Dim listItem As ListViewItem For ctr As Integer = 0 To xlsDataSet.Tables(0).Rows.Count - 1 listItem = ListView1.Items.Add(xlsDataSet.Tables(0).Rows(ctr).Item("EmpNo").ToString) listItem.SubItems.Add(xlsDataSet.Tables(0).Rows(ctr).Item("EmpName").ToString) Next Can anyone help me to fix this bugs!

    Read the article

  • ListBox Control in VB.NET 2008

    - by Tareq
    Hi all, I am currently working on a multi branch desktop based project using VB.NET 2008. My Admin want to see the list of currently working branches and not working branches. Additionally they want to know how long a branch is not working. To display the offline branches I first take a ListBox control named lstListBranch and then upon that control I take another ListBox control named lstListTime to display the offline time. I want to permanently hide the scrollbar for lstListTime control and want to scroll lstListTime when lstListBranch is scrolled. Can anyone help me in that purpose? Thanks in advance.

    Read the article

  • VB.net 'cross-referencing' tables.

    - by Lee
    Hello, I have a DataGridView that is being filled with data from a table. Inside this table is a column called 'group' that has the ID of an individual group in another table. What I would like to do, is when the DataGridView is filled, instead of showing the ID contained in 'group', I'd like it to display the name of the group. Is there some type of VB.net 'magic' that can do this, or do I need to cross-reference the data myself? Here is a breakdown of what the 2 tables look like: table1 id group (this holds the value of column id in table 2) weight last_update table2 id description (this is what I would like to be displayed in the DGV.) take care, lee BTW - I am using Visual Studios Express.

    Read the article

  • Git ignore file for vb.net projects

    - by John C
    Placing a vb.net project under git control in windows (was previously under VSS - long sad story of repository corruption, etc). How should I set up the ignore file? The exclusions I'm thinking of using are: *.exe *.pdb *.manifest *.xml *.log (is git case sensitive on windows? Should I exclude *.Log as well?) *.scc (I gather these were left over from VSS - maybe I should delete them?) Is this a sensible list? Should I be excluding directories?

    Read the article

  • VB.NET function that takes other functions as a parameter, and executes them

    - by rob
    Hello, Is there a way in vb.net to create a sub/function that will take as an argument some kind of pointer to another function, and allow this new sub/function to execute the passed function? What I have are 10-12 xml-rpc functions I am calling against a remote server. Each of these functions has different argument lists (one takes 1 string, another might take 3 strings and one int, etc). All of them return an object. As I am calling these, it seems like it should be able to be factored better. For instance, everytime I call any of these functions, I want to test the return value for a session drop, and do something to try and reconnect to the remote system, etc. Using .net 3.5 Thanks! -R

    Read the article

  • VB.NET overloading array access?

    - by Wayne Werner
    Hi, Is it possible to overload the array/dict access operators in VB.net? For example, you can state something like: Dim mydict As New Hashtable() mydict.add("Cool guy", "Overloading is dangerous!") mydict("Cool guy") = "Overloading is cool!" And that works just fine. But what I would like to do is be able to say: mydict("Cool guy") = "3" and then have 3 automagically converted to the Integer 3. I mean, sure I can have a private member mydict.coolguy and have setCoolguy() and getCoolguy() methods, but I would prefer to be able to write it the former way if at all possible. Thanks

    Read the article

  • System.UnauthorizedAccessException from Serial Port in VB.NET

    - by psuhas
    I am using VB.NET 2008 Express Edition to access Serial Port which is a USB to Serial port. Since this is removable, the app user can disconnect it at any time in app. I am getting an unhandled exception when I remove the USB Serial Port. After research, it seems like a known problem in .NET (even in 3.5) I am looking for some solution to get this done. I have already tried the app.config solution that was suggested and it does not work Here is the link for issue http://connect.microsoft.com/VisualStudio/feedback/Validation.aspx?FeedbackID=140018

    Read the article

  • VB.net Edit-And-Continue: ignore "unable to apply this change while debugging"

    - by FastAl
    When using VB.Net (2008) and paused in debugging, Edit-And-Continue is a great time-saver. However if you change any module/class-level information (variable, sub/function signature, etc), you get the error message like this: "unable to apply this change while debugging" While I can understand the technical challenge to making this work (and why it would be hard), it leaves me in a tight spot with just a few options: 1) Restart and recompile and get the program back to the same state 2) Continue debugging without making the change, and risk forgetting 3) Type up a reminder note to make the change All of which are annoying. Now I know that option '4) Just actually make the change' may not be possible. but does anybody know how to enable the following 'technically easy' possibility? 4) Let me change the code, get it flagged with the purple squiggly underline, so I can save it, but just ignore the change until recompile I have checked the Tools|options|debug|edit and continue, nothing appears to let me do this. thanks!

    Read the article

< Previous Page | 12 13 14 15 16 17 18 19 20 21 22 23  | Next Page >