vb.net-2010

Function doesn't return a value on all code paths Vb.net

て烟熏妆下的殇ゞ 提交于 2019-12-20 06:04:20
问题 I'm somewhat new to programming and I am having trouble just making this work. I'm supposed to run this code using a delegate but I've run into error after error. I'm using Vb.net. Could anyone help me solve the issues in this code? Public Delegate Function D() Dim Str As String = Console.ReadLine() Sub Main() Dim D1 As D D1 = New D(AddressOf Fn1) End Sub Function Fn1() System.Console.WriteLine("Please enter the string") Dim revstr As String = StrReverse(Str) Console.WriteLine("Reverse:")

VB.net Excel.worksheet().cells().Value

℡╲_俬逩灬. 提交于 2019-12-20 03:12:32
问题 Trying to write information in Excel worksheet But have some strange problems ;) i looked info on Google but no result.. So plz help ) I Add reference Microsoft.excel 14.0 Object Library and also Import Microsoft.Office.interop I need to get Value from specific cell so i use command Checker = shXL.cells(1,1). And here i don't have Value.... i only got this (Equal / GetHashCode / GetType / toString) So question is WHY i don't have (.Value) for .cells and where is an Error Dim appXL As Excel

VB.net Excel.worksheet().cells().Value

半腔热情 提交于 2019-12-20 03:12:30
问题 Trying to write information in Excel worksheet But have some strange problems ;) i looked info on Google but no result.. So plz help ) I Add reference Microsoft.excel 14.0 Object Library and also Import Microsoft.Office.interop I need to get Value from specific cell so i use command Checker = shXL.cells(1,1). And here i don't have Value.... i only got this (Equal / GetHashCode / GetType / toString) So question is WHY i don't have (.Value) for .cells and where is an Error Dim appXL As Excel

How to access to a custom component properties by name?

ⅰ亾dé卋堺 提交于 2019-12-19 11:26:53
问题 I have a custom component with several checkboxes and a textbox inside; also have a property/variable that I called "seconds" to store the time. This customized control is added several times to a TabPage that is inside(nested) another two TabPages at running time. Every one of this controls have sequential names that are assigned when their are created at running time. TimerCtrl1 TimerCtrl2 TimerCtrl3 etc... Now I want to set those checkboxes, the text inside the textbox and the variable

Web Browser to handle pop ups within the application

落花浮王杯 提交于 2019-12-19 09:03:26
问题 I am trying to use the WebBrowser control to launch a new form for popups instead of it opening in IE. I have tried to use the AxWebBrowser instead to get the popups which works with NewWindow3 event and just doing e.ppDisp = AxWebBrowser.Application , but there are many limitations that come with AxWebBrowser. So instead I am trying to Extend the normal WebBrowser to include the NewWindow3 event like the AxWebBrowser but running into problems. With e.ppDisp = AxWebBrowser.Application I am

how to read pdf file with blank spaces (as it is) line by Line in c#.net using iTextsharp

我们两清 提交于 2019-12-17 21:23:24
问题 I am using iText (for .net) to read pdf files. It reads the document but when there are whitespaces it reads only one space. That makes it impossible to extract data by getting substrings. I want to read data line by line with whitespaces so I know the actual position of text because I want to write the data into a database. The file is a bank statement, I want to dump it into a database for designing a reconciled system, Here is a screen shot of a file Following is the code which I am using

How can I able to see the image in my picturebox?

那年仲夏 提交于 2019-12-14 02:29:31
问题 I have used the following code to draw what I want but when I used this code I cannot see the image I set on my picturebox. What should I do to draw on the picture box with an image? Please help me with this. Public Class Form1 Dim draw As Boolean Dim DrawColor As Color = Color.Black Dim DrawSize As Integer = 6 Dim bmp As Bitmap Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load cbxSize.SelectedIndex = 2 bmp = New Bitmap(pbDraw.Width, pbDraw.Height)

Error: No data exists for the row/column

拥有回忆 提交于 2019-12-13 20:31:55
问题 I get the following error: No data exists for the row/column . It should retrieve the image sSql = "SELECT TOP 1 * FROM Attendance ORDER BY Attendance_id DESC" Dim cmd As New OleDbCommand(sSql, con) Dim dr As OleDbDataReader = cmd.ExecuteReader() dr.Read() lab1id.Text = dr.GetValue(1).ToString lab1fname.Text = dr.GetValue(2).ToString lab1lname.Text = dr.GetValue(3).ToString lab1position.Text = dr.GetValue(4).ToString lab1subject.Text = dr.GetValue(5).ToString dr.Close() sSql = "select Pfile

using datareader with dbnull values in .net4

浪尽此生 提交于 2019-12-13 15:06:32
问题 I heard there is a field extension method in framework 4 that permits one to receive null values from a datareader, without having to go through the process of first testing if not null then ... etc. There's information about the extension method here (MSDN), but i don't know how to use it in code (am relatively new to .net and never used extension methods before). Would appreciate if anyone can give an example. This is what i tried to implement, but it returns an error when a dbnull is

VB 2010 error (INSERT INTO) syntax error [duplicate]

夙愿已清 提交于 2019-12-13 09:57:21
问题 This question already has an answer here : VB 2010 INSERT INTO syntax error (1 answer) Closed 2 years ago . I have a program in VB.NET that will input data from textboxes into an Access database. Here is sample image: This is the code I am using and it gives me an error: m = TextBox1.Text b = "'" + TextBox2.Text + "'" x = "'" + TextBox3.Text + "'" d = TextBox4.Text n = "'" + TextBox5.Text + "'" Dim s2 As String s2 = "insert into users1 ( num , name1 , pass , add , phone ) " & " values ( " + m