I'm trying to show a Windows Form from a DLL file - it's added to the application's refrences But I can't call the Windows Form from the DLL, I tried to make a function that shows the form but when I try to call that function in my application it says: Reference to a non-shared member requires an object reference How can I show the form? I'm tried to use this method: (it's in the DLL's form)
Public Sub Open()
Dim Instance As Windows.Forms.Control = Me
Instance.Show()
End Sub
I'm showing an excel file in a WebBrowser control on my form, but it doesn't show any toolbars. The customers wants the ability to make changes in the control and save them, hence the need to show the standard toolbars.
I've tried many different things including:
For Each cb As CommandBar In xlApp.CommandBars cb.Visible = True Next 'and
[Code]....
how I can get toolbars to show in the WebBrowser control?
I have developed a couple of windows applications in Visual Vasic Express 2008. To my horror, I have just discoved that the Setup Project is not available in the express edition.I have been searching to discover which DLLs I will need to include when using my 3rd party Deployment Application.
I know which ones I need for my 3rd Party Controls, but am stuck on which Microsoft DLLs will be needed the Microsoft Controls I have used, plus any other Common DLLs that are always needed.
I have tried searching Microsoft's site but without success.
Let say I had a project contains 10 forms and 10 reports and typed dataset (xsd)I am trying to divide my project forms into dlls, so when the client had a problem or asks for modification in single forms, I had to build the project all over again and the exe size will be large.
in my current project, the exe size is 4.8 MB, and I am working with customers by internet and remoting, so every time I make small changes (change the back color of textbox in one form) I had to rebuild and send the whole 4.8 MB to the customer. And not forgetting the increasing size of the exe with time.I know that converting my project to class library and built it will convert it to dll, so I had to create a second project to manage it.
1 - Can I convert 3 or 4 forms / 10 forms total in my current windows application project to dll?
2- What is the best recommended method to divide the project into smaller entity.
I am trying to understand how to interact with external DLLs written in C++ for use in my VB.NET application. I have some DLLs that a client wrote that do some math functions. Everything was working on a 32-bit machine. Because we were taxing the 32-bit machine we moved to 64-bit. Now we can't get the same functions to work. The DLLs were re-compiled as 64-bit DLLs and they still don't work. So my client wrote some dummy DLLs to see if we could figure out the problem. Here are the "signatures" of the DLL calls that I am making:[code]....Ultimately I would like to get to calling initialize_quiet and I am guessing at the format of the marshalling, const size etc.
I have built an application where there is a MDI parent form and other forms which i have not declared as Child forms but have set these forms not to show in Taskbar. While the application is running, if i have any of these forms open and i switch over to any other application other than this and when i come back to it, all these forms hide. I cannot reopen it or see it anymore.. Why is this happening?? how can i sustain these forms as it is even when i leave the application.LuxCoder
I have added a MDI parent to my application and assigned all new forms to it (i.e. Form1.MDIparent = myMDI). When i hide and then show a form, it loses all of the data previously typed in the textboxes.
Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim connectionString As String
[Code]....
I'm needing to do is to show in my messagebox.show the date from the sql query that I ran before this. I know that I havent declared a variable in that statement but I'm having a bit of a lapse today and was just wondering how to show that result in my messagebox.show.
When my login screen loads, if the user has not created an account the form will close and a form to create an account will appear. However when I code this both forms stay visible, instead of just the one. Where am I going wrong?[code...]
I've just upgraded from Visual Basic 6 to Visual Basic 2008 Express Edition.
1. Show anothor form (ie. Form2)
2. Close Form1.
At present when I use the me.form1 , but both Form1 and Form2 both closes.I would like to press a button or on a timer, to show Form2, while closing Form1.
my scenario is this: I have two forms and a module. Let's call one of the forms MainForm and the other SecondForm. My module is running on a seperate thread to MainForm. A sub routine is triggered in the module, and I want it to display SecondForm.
I understand that I cannot do this directly because SecondForm needs to be called from the UI thread, which is shared by MainForm. How would I go about doing this? I'm guessing that I would have to use a combination of invocation and calls to MainForm to activate SecondForm.
Well I accidently double clicked both of my forms in a project and then they weren't pinned anymore so I exited them out hoping they'd be pinned aghain, but now when I open the project, no forms show up. Just blank blue wall... How can I get the forms back?
I am just learning vb.net using vs 2008. I have a small forms app which I have conected to a small, single table 2 column database. I enter some numbers into a text box, press a button and the data gets entered into the dbase. However the only data that gets displayed in the data table I have on my form is the existing data.No new data entered is shown until I close down and restart the app. I have tried many times using statements such as [code]...
What is the difference between the following two statements (in terms of memory management):
Dim frm as New MyForm() frm.Show() VS MyForm.Show()
I am originally a C# developer, how does the second one make sense or even compile for that matter in VB.NET? (Show() is not a Shared/Static method) What is happening in the second case?
I've been trying to get my head round a problem for days now, I want to read 'File.ini' line by line checking if specific text exists in the file and then display on a windows form weather particular settings are turned on or off.
So far this code works if "TargetText" exists but if it doenst I get an error on the code line: "If line.Contains("TargetText") Then".
[Code]...
It works if "TargetText" existin in a line in the file but if it doesnt exist I get the 'Null Reference Exception. Object reference not set to an instance of an object.' Any suggestions greatfully recieved!
and as you can see, I am showing users the next available date open to them is determined with the value dteReturnValue.ToShortDateString .. but what I'd like to do is show the user both the start date and the end date, which will always be +7 days from the field in my database.
When I create an inherited form, after creation for some reason I cant see the form to edit in designer, I mean I cant drag and drop buttons, labels or any control to it since I just CANT see it, I have included a pic of what I see below where Form1 is the Inherited Form. What Am I doing wrong or what is happening
I make a program upon sending emails to my friends using smtp. The problem is that I have confusions why my another form will not show until it is not finished sending all of the messages. I want my next form to show how many percent were finished but the problem is that my form will show only until all the emails are sent on my listbox. I put my code on the load event of the for
I am using a MDI parent to house each of the forms in my application. I have a main form and 2 sub forms. The sub forms are opened using the code below. Also, when I am finished entering info into these forms, i am hiding them so that I can reopen them with the same info still entered.
The problem is that when i show the form again, it is blank. Why would this be the case? I am never closing or disposing the form, so shouldn't it just unhide easily?Showing the sub-form(savingsfrm1) and and hiding the main form(riskfrm1)Public savingsfrm1 As Savings
Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
I have the code which checks if there is a selected tab
Private Function GetBrowser() As WebBrowser If TabControl1.SelectedTab IsNot Nothing Then For Each c As Control In TabControl1.SelectedTab.Controls If TypeOf (c) Is WebBrowser Then Return c
I am trying to fix a vb.net program that works with windows xp but not windows 7. The following steps will recreate the basis of the problem I am having. 1. Run MS Visual Basic 2010 on Windows 7.
I have a form e.g. Form1 , which displays a datagridview. 1) On form load, the datagridview doesn't have any data 2) The user clicks on a button called filter, this opens a form where the user can specify parameters to filter the data by 3) This form calls a setData() in Form1, which fills the dataset with the data
This works fine. If I click on a button called controlPanel it launches another form and hides this. E.g. dim cp as new ControlPanel() this.hide() cp.show()
On the controlpanel I have a button that links to form1. If I click on it. E.g. dim frm as new Form1() this.hide() frm.show() It redisplays Form1 but without any data in the datagridview.
I think the problem is that since I am creating a new instance for Form1 it comes up with the blank Form1. Is there a way to redisplay Form1 so that it retains the data that was displayed last, without having to retrieve the data from the database.
Have anyone developed a textbox where it is possible to display 2 fields in the textbox. We want to be able to show ID + description in the same textbox. (When user enter the textbox description may go away and the user can enter an ID)
I added a tooltip control in my form and set a tooltip for a checkbox. The tooltip shows fine until I check the checkbox... If I check the checkbox once and uncheck it, the tooltip never shows up when I hover the mouse over it... How to make the tooltip to show on mousehover no matter the checkbox is clicked or not?
I've finally gotten multi-threading working on my application, but now I'm having trouble showing forms when I need to. I currently have three threads in my program: one for updating a textbox, one for transferring files, and one for displaying forms. Here's a snippet of code from my program:
[code]...
I'm getting the error: Control 'frmXCopy' accessed from a thread other than the thread it was created on. I know what this means, but I can't find a way to make the ShowForm Sub run off of the main application thread.
Can anyone with more experience with User Controls see what I've done wrong here? The mouse cursor disappears as soon as the user enters the area of the Form although MouseMove, MouseEnter and MouseLeave event handlers are firing correctly. I want an overridden custom cursor to appear on the form with a reticle such as occurs here in this image as per the code listed below and in a VS2010 solution on SkyDrive.
Option Explicit On Option Strict On Imports System.Drawing
i'm developing a web application. i want if user access it, it will prompt for windows authentication, if the username and password is correct, then the page appears.i've been working around on this but it's not working. my web app prompt users for windows authentication, but it always failed or access denied.anything i should check?
I'm trying to put a listview on a VS 2010, vb.net winform form. I
1. drug the listview from the toolbox to the form.
2. right cick and did an edit columns
3. added two columns with the names of (chLocationID, chLocation) and the text of LocationID and Location.
4. when i click ok, nothing shows up in the listview designer.
In the code behind i did a for loop to add some data.
For Each O In oS Dim itm As New ListViewItem itm.SubItems.Add(O.tblLocationID.ToString) itm.SubItems.Add(O.Location) itm.Tag = O lvLocation.Items.Add(itm) Next
when i step through the code.. it says that it adds the row.. a lvLocation.items.count give me a value of 1.. which is correct but nothing displays on the screen.