I have a report (vb.net - rdlc) and I have two buttons - preview (which brings up a preview window) and print which allows me to print the report directly to my default printer with no interface whatso ever.When I call the print the calling form disappears or at least goes behind any other open windows - ie if I have MS word open my whole programme would go behind word and I loose focus)I found the code on the net to print directly and it is basically creating a stream to do the printing. [code]
For a while i have been playing a guessing game with this line of code.
If Sdown = True And Shooter.Top >= Me.ClientRectangle.Height Then Shooter.top += Shooterspeed End If
Basically i have a shooter on the form and whenever i press the down key the shooter moves down the form and disappears off of the bottom of the form. I have been trying to get this to stop for some while.
I have a form that I am using to search for records in a dataset, it has a text box for entry of the search criteria and a 'Search' button to initiate the editing of the entry and .Filter on the BindingSource. This is one form in a project with many, when I show it using .ShowDialog it always disappears, (not visible and not loaded) after the 'Search' button is clicked, I have stepped through and there is no .Hide or .Close that it encounters, it performs all of the logic correctly but control is returned to the main form it was shown from. When I use the .Show method, I do not have this problem.
This happened to be once awhile ago and I thought I had the solution, but apparently I don't. Very rare, but what happens is, I'll start a new project, build my controls on the form, go into the code window and write some code. I'll save this all out, but when I reload the project, the code window comes up OK, but the design window is just gone. The code for the form and all the controls is still there in the form.designer window, but the form itself just will not appear, and there is no icon for it over in the Solution Explorer to click on
trying to print a Form that I created using a VB.Net console application. My console application creates an instance of a Windows Form and fills it with data. I then created an instance of the Print Form class from the Microsoft Power Pack and am trying to get the form I filled with data to print but no matter what I've tried it just prints the command console window.
Dim firstPage As New FrontPage 'Windows Form Dim pf As New PrintForm 'Print Form Power Pack firstPage.Visible = True
I have a custom UserControl that I am hosting inside a FlowLayoutPanel. Each time that I run the application the control will disappear off the hosting form's design view. I have to close the form's design view and then reopen it each time. The control is not getting removed in any way, just isn't being shown.
Edit, alright this got a bit weirder. Only the first usercontrol that I put into the FlowLayoutPanel disappears. This problem also happens on a project Build and Rebuild.
I am making a program for easily entering maths symbols. For entering the powers, I superscipted the text in richtext box, but whenver I use another symbol, the effect of superscripting disappears and the text becomes in its original form
I'm trying to get this to work.. What am I doing wrong?? vhost32 crashes as soon as it comes to calling ReadEventLog.
<DllImport("advapi32.dll")> _ Private Shared Function OpenEventLog(ByVal lpUNCServerName As String, ByVal lpSourceName As String) As Integer End Function
I have a Windows form Application that I am creating, could also be a Windows Service that I need to run.There are basically 2 Classes that were converted from java to vb.net and 1 xml file to this. for testing purposes I would like to use the Button.click event to manually run the code.However i get an error when trying to call the sub/function the normal way.I even tried to put this classes information in the Public Class Form1 but it keeps on giving me errors.This is the Sub:
Shared Sub Main(ByVal args() As String)
so how do I call it from a Button.click event?
normally i would just do a "call main()" and it works however this time it is not because of the (byVal args() as string)
I get success calling updateresource function but after when i call endupdateresource i get access is denied What can i do . I have taken ownership of file still i get access is denied
I have a midterm project where we must replicate what our teacher has made, it is a convenience store program. I am having trouble calling the functions, he wants us to use these:
PopulateItems => Populate Items listbox based on the category selected GetItemPrice => Retrieve the price for a given item GetItemPriceFromPurchases => Retrieve the item price from the purchases list box (optional. You may not need
[CODE]...
So far I have the first list box populated when the form loads. However outside of that I do not know where to call the function in order to populate the second list box upon selection of the first.
I have been able to do the exercise's in the first 2 chapters and half the exercise's in the third chapter of the text book (programming in visual basic 2008, Julia Case Bradley & Anita C. Millspaugh). but this one is making my head want to explode. please point me in the right direction with this.
Heres the problem. The company has instituted a bonus program to give its employees an incentive to sell more. For every dollar the store makes in a four-week period, the employees receive 2 percent of sales. The amount of bonus each employee receives is based upon the percentage of hours he or she worked during the bonus period (a total of 160 hours). The Calculate button will determine the bonus earned by this employee, and the Clear button will clear only the name, hours-worked, and bonus amount fields. A Print button allows the user to print the form. Do not allow missing or bad input data to cancel the program; instead display a message to the user.
Here's my code so far. its giving me the wrong results. i have tried many different ways,(hence the commented code) but I just dont know where im going wrong.
I have a VB .NET 2010 application. I added a C# project to my solution. I tried to call the form called 'main'. However, I could not figure out a way to do that. What is the best way to do that? I Goggled, and did not find anything. Actually I noticed that my Developer converted everything to VB .NET.
However, I get an error in the call to BeginInvoke (the UpdateApplicationDataUI portion of the delegate is stating "Expression does not produce a value").
Me.Dispatcher.BeginInvoke(Function() New Action(AddressOf UpdateApplicationDataUI))
I have a function where I am performing a lot number of database operations inside a Sub. The operation when called directly like:ExecProcess()
takes about 11 seconds to run.However, if I create a Delegate, and call the sub using BeginInvoke(), the very same process takes over 40 seconds to execute.Here's the threaded code:
Protected del As ProcessDelegate Protected Delegate Sub ProcessDelegate() del = New ProcessDelegate(AddressOf SELocal.ExecJob) Dim cb As New AsyncCallback(AddressOf Me.ExecJobComplete) del.BeginInvoke(cb, del)
Anyone know what may cause a function to take longer inside a new thread, rather than calling directly?
In a large old application I have to fix, I have two forms, like in the image (that is a Notepad example)
When I leave (with mouse cursor) my small(Y) form's area, that form will "disappear", some like I'd clicked on the big form and activated it.
But I didn't click on X, neither the X caption is active, however the small Y form goes backward and is not visible anymore.
How to track the problem?
Any of Resize, Activated, Deactivate, LostFocus, GotFocus, GiveFeedback, MdiChildActivate is not tracked on any of both forms when I leave the Y area...
I'm having an interesting issue that I can't reproduce on a different project, but can consistently on this one. I have no clue what might be causing it, but am hoping that someone may have seen it before.
I have a main form, from which I run a series of checks. On this form, I have a listview control. Because of some issues with the refreshing of this listview control, I had to create my own messagebox. It's just a form that displays some text ( it also happens to look nicer than MsgBox; in my opinion, anyways ). It's been working great for months, until recently.
My problem is that on my main form's load event, I run this check, which returns an error within a try/catch block. I then call my custom messagebox with a message. It in turns calls it's ShowDialog() function.
In any other situation ( after the main form has been loaded ), I have no problems. The messagebox goes on the screen and behaves appropriately ( ie: waits for my input and acts as a modal dialog ( stops execution of my main form's thread ) ). However, on this onload event, my messagebox comes up and goes away almost immediately afterwards.
I've traced it all the way to the showdialog() call. For no explicable reason, it appears to skip right over this call, without me doing anything on the form.
Here's what the inner trace looks like ( when I put a breakpoint on the onclosing event for this messagebox form ):
Is there a way to terminate calling procedure from the callep up procedure? I tried 'Stop' from a called up procedure in an executable; it has gone stuck; I am not able to remove it(the form) from the screen!
how to call a function from a different form. Like the button click event. i have this scenario. I have a main form and a child form in the main form there is a navigation panel on the left side controlling the child form. What i want is if clicking the add record in my navigation panel will call a function in the child form to execute.
i am working on Scrollable form, when i am trying to print this form with PrintForm object its printing only the showing part not all the form this the code which am using. Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click Me.PrintForm1.Print(Me, PowerPacks.Printing.PrintForm.PrintOption.Scrollable) End Sub
I have two forms. Form A and Form B. Form A has a datagrid that is populated from a SQL Database Table query. When a button is pressed Form B is launched that allows you to add a record to the database table. I need for the datagrid to be refreshed and show the newly added record when I close form B and go back to the parent.
I need to know the proper way, or maybe I should say, the different ways to call another form from a parent or preceding form. I am currently using ex: formname.showdialog() to call my next form, but I am uncertain if I should be using that in every situation. [code] Whats the difference between these different methods? (ex: .showdialog() , .show() )I tried both of these to open a temporary form to retrieve a persons name from a database, so as the users progresses through my training program they can keep track of their scores.But, I also call other forms as I branch through my program, from the main page, to a secondary page, to a testing page, to a results page and then back to the secondary page