How do you limit the CPU of a while loop?
In this case, the code which is inside the while loop:
Private Sub wait(ByVal time)
Dim sw As New Stopwatch
sw.Start()
Do While sw.ElapsedMilliseconds < time And StillOpen = True
Application.DoEvents()
Loop
sw.Stop()
End Sub
But now, her...
I have created a simple table and i need to position. does anyone have experience with tables in itextsharp?
here's my code
Private Sub generate_PDF()
Directory.SetCurrentDirectory("C:\Users\alexluvsdanielle\Desktop\")
Console.WriteLine("Chapter 6 example 1: Adding a Wmf, Gif, Jpeg and Png-file using urls")
Dim document ...
In the past, perhaps versions of Visual Studio prior to the 2008 that I am using now, I would do something like this in my VB.NET code:
System.Diagnostics.Debug.WriteLine("Message")
..and the output would go to the output window.
Now it doesn't. Something must first apparently be enabled.
If this involves "attaching a debugger", pl...
Setup: ASP .NET MVC 1
The Problem:
When ASP .NET hits the RenderPartial("Openings"...) line, an exception is thrown ("Could not load type 'System.Web.Mvc.ViewUserControl(of IEnumerable(of OpenSpace))'.") even though the view exists and the proper model is being passed in. The views are all inside the View folder and in this case, they'...
Hello Everyone:
I have a winforms (VB 2008) based app that I'm developing and I want to use custom roles for user access.
Application Layout:
I have a Main form that opens a login form when certain actions occur. The Login form intern uses an authentication class that I've created, to authenticate users and set access rights. On my...
Does anyone have any good advice or experience on how to create an engine using C# (VB.NET is okay too) that is generic enough to handle most cases of MS Word text fields I need to fill with data I'm getting from a database? In short, I'm about to embark on this little Office automation excursion and I'm hoping a little bit of feedback ...
I am working on an Excel report and I would like the top rows to be empty to allow for an image to be inserted. However, I do not want the image size to change the width of the columns and would rather the data below do that.
This is what I have so far:
If ComDset.Tables(0).Rows.Count > 0 Then
Try
With Excel
...
Hi
How can I set the column width and leave the top 10 rows empty in order to insert an image into my Excel report?
Here is my code:
If ComDset.Tables(0).Rows.Count > 0 Then
Try
With Excel
.SheetsInNewWorkbook = 1
.Workbooks.Add()
.Worksheets(1).Select()
Dim i As Integer = 1...
I've a website that puts info into a mySQL database and a windows service (written in VB.Net) that polls the db and actions what's in there.
However, occasionally it stalls and rather than having to RDP into the server, I want superusers to click on a button to restart the service.
I can get the button to say, do a directory listing of c...
Hi,
I hade build sctive record dal with subsonic3 Vb.net templates. and i am dealing with alot of bugs in the sub sonic dlls.
1)in Add() function: (i have fix)
when indx has counter in the db the returnd new key type is decimal the active record fil have an exception "Public member 'Change Type To' n type 'Decimal' not found".
i manage...
I want the location of the current execution project i.e in VB.NET/C# or the current class file's path?
Ok,let me elaborate i got 2 projects in one solution file,lets say A,B are projects, my startup project is B ,and im accessing a class file in A ,now i need to know virtual path of B. because i need it for accessing the resource file ...
I have vb.net method and i call it from JS code i can't send parameter to this method and here is sample:
JS Code :
function OnSave()
{
var sign = document.FORM1.SigPlus1.Signature();
<%Save(sign) %>
}
VB method :
Public Sub Save(ByVal obj As Object)
Dim obj1 As New PFSIGNATURELib.SigniShellSignature
...
I have used the "using" statement in both C# and VB. I agree with all the critics regarding nesting using statements (C# seems well done, VB not so much)
So with that in mind I was interested in improving my VB using statements by "using" more than one system resource within the same block:
Example:
Using objBitmap as New Bitmap(100,...
can someone please show me documentation on this method?
i have the following line:
datatable.WriteSelectedRows(0, -1, document.LeftMargin, document.TopMargin, writer.DirectContent)
and it doesnt seem to matter whether its topmargin or bottommargin, it puts it at the bottom of the page.
...
how do i use pdfptable as a real table (A x B) instead of just (A x A)
declaring it this way gives me just one row:
Dim datatable As PdfPTable = New PdfPTable(4)
how can i declare it so that it has multiple rows and multiple columns?
...
My Ms-Access .mdb file is on my website.
It is in the App_Data Folder
The current connection string is:
OleDbDataAdapter Da = new OleDbDataAdapter("Select * from SerialNo",
new OleDbConnection(@"provider=microsoft.jet.oledb.4.0;
data source=ftp://ftp.WebsiteName.com/App_Data/SerialNo.mdb"));
Where am I making ...
how do i set the font for a pdfptable?
...
I am looking for some (preferable vb.net) code to use in an asp.net application that will allow me/my users to setup calendars (that I store in SQL server db).
I am looking for something that will make it easy to schedule recurring appts (i.e. every monday, every other week on thursday at 9AM, every month,1st and 3rd tuesday, every year...
I'm trying to clean-up after an exception, and I'm not sure how to handle a StreamWriter.
Dim sw As StreamWriter
Try
''// stuff happens
somethingBad1() ''//Sometimes throws an exception
sw = New StreamWriter(File.Open("c:\tmp.txt", FileMode.Create))
''// stuff happens
somethingBad2() ''//Also sometimes throws a...
in my document i am creating 3-4 pdfptables. at design time i dont know the size of the tables. i need to place the 2nd table right after the first, but i dont know the position of the first (i cant calculate it because i dont know how big it is). how do i know where to place the second table?
...