How are you creating the PDF, with a library or something?
I used to rock and roll every night and party every day. Then it was every other day. Now I'm lucky if I can find 30 minutes a week in which to get funky. - Homer Simpson
Arrrr, mateys! Ye needs ta be preparin' yerselves fer Talk...
It seems you should do this in the code that opens the child form, not in the child form's load even handler.
For example, say this is the code to open a new child form, FormChild, from the parent:
Dim frmChild As FormChild
frmChild = New FormChild
'here, Me is the MdiParent
For Each loForm...
I'm sorry, I wasn't clear before. You *should* set Me.DoubleBuffered = True - it might help with the flickering. Set it in Form_Load, before anything else.
I used to rock and roll every night and party every day. Then it was every other day. Now I'm lucky if I can find 30 minutes a week in...
Try setting the solution to target 64-bit:
Right-click on the project-->Properties-->Build-->set "Platform target" to x64
I used to rock and roll every night and party every day. Then it was every other day. Now I'm lucky if I can find 30 minutes a week in which to get funky. - Homer Simpson...
Take a look at the String.EndsWith function.
As to your function:
' Parameter's verification
If VarType(tsPath) <> VariantType.String Then
MsgBox("Invalid parameter passed: " & Chr(34) & "tsPath" & Chr(34) & " must be of type String", MsgBoxStyle.Critical, "Fatal Error: INVALID PARAMETER")...
The problem is occurring because you're *declaring* 2 variables with the same name. So, Using may destroy the *object* created by the declaration, but the declaration still exists. There's no way around this other than using different names in the declarations. Or, just use one declaration...
This should work:
ReDim lcBuffer(2^14)
This will clear any data already in lcBuffer. If you already have data in lcBuffer and want to keep it use the Preserve keyword:
ReDim Preserve lcBuffer(2^14)
Also, trying to read more than 14 chars into the buffer (before the ReDim) will result in an...
Environment is not read-only. Use Environment.SetEnvironmentVariable(variable As String, value As String) to set an Environment variable. Use Environment.GetEnvironmentVariable(variable As String) to retrieve.
I used to rock and roll every night and party every day. Then it was every other...
If all you want is to distinguish between IDE and EXE runs, what I do is set a command line argument in the project properties, then do a check to see if there are any command line arguments when the program starts. If there are, it's in the IDE. To do this:
Go to the PROJECT menu, then select...
Instead of doing this:
bindingSource1 = dgvProducts.DataSource ' ERROR LINE HERE
table = bindingSource1.DataSource
Just do this:
table = dgvProducts.DataSource
Also, your update is going to fail, because you don't have your DataAdapter's InsertCommand, UpdateCommand or DeletCommand...
Well, DoubleBuffered is indeed a property of a Form object. The mouse-over text of DoubleBuffered reads: "Gets or sets a value indicating whether this control should redraw its surface using a secondary buffer to reduce or prevent flicker."
Here's a couple of links I found...
First, create the handler code for the ToolStripMenuItem's Click event:
Say it's named RecentFilesMenu, so use
Private Sub RecentFilesMenu_Click(Sender as Object, e as EventArgs)
'code here
End Sub
Then, in the form's Load event, put the AddHandler code:
AddHandler...
Do you have Me.DoubleBuffered = True in the form's load event?
I used to rock and roll every night and party every day. Then it was every other day. Now I'm lucky if I can find 30 minutes a week in which to get funky. - Homer Simpson
Arrrr, mateys! Ye needs ta be preparin' yerselves fer...
You could put a Try...Catch block around the call to the function:
Try
MyFunc(123, "String")
Catch ex As Exception
MsgBox(ex.Message)
End Try
You can get a lot of information about the exception thrown via the Exception object (ex). In the Catch code you can take various actions, like logging...
Try putting the Application.DoEvents(); after the call to updateProgressBar, like so:
oPD.updateProgressBar ( localPrinterSettings.pBar, localPrinterSettings.lblCaption, numRecs, currentMember + 1 );
System.Windows.Forms.Application.DoEvents();
I used to rock and roll every night and party...
Loop through the items in the collection and add an item to the DropDownList for each item in the collection, something like this:
For Each sMenuItem As String In colMenuItems
DropDownList.Items.Add(New ListItem(sMenuItem))
Next
Note that this assumes the Items in your Collection are Strings...
The purpose of throwing an Exception like this is to halt processing of the code and return the Exception to whatever procedure called this code. When the exception is thrown, it stops processing at that point and returns the Exception object to the calling code. If that code has a Try...Catch...
Try using Application.DoEvents immediately after updating the label.
I used to rock and roll every night and party every day. Then it was every other day. Now I'm lucky if I can find 30 minutes a week in which to get funky. - Homer Simpson
Arrrr, mateys! Ye needs ta be preparin' yerselves...
Visual Studio builds your program every time you hit the Run button. To manually build, hit Ctrl+Shift+B, or go to the Build menu and select Build Solution.
I used to rock and roll every night and party every day. Then it was every other day. Now I'm lucky if I can find 30 minutes a week in...
Try using a BindingList, as in this article:
http://www.codeproject.com/KB/linq/bindinglist_sortable.aspx
I used to rock and roll every night and party every day. Then it was every other day. Now I'm lucky if I can find 30 minutes a week in which to get funky. - Homer Simpson
Arrrr...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.