|
QBTeKcom wrote: I still would like to know why this one failed and all the others worked.
Simple; it does something different from the others, or they would fail equally.
QBTeKcom wrote: What would cause the module to be invoked before the frmMain constuctors?
Modules can't be "invoked", methods within the module can. I'm doubting that the module has it's own constructor (similar to a static class) - so what method is getting called?
Your app begins on it's entry-point, and might have a StartUp[^]-event defined. Next, it'd load the main-form, and all controls on it.
If any of those touch a module, it'd cause initialization of that static class. In other words; calling a method from a module for the first time would cause it to be loaded, no sooner. Finding out is done by stepping through your code. Press F10 to start your project and execute it step by step and line by line.
I can give better advice if you posted your code, especially the method where the form is created
Bastard Programmer from Hell
|
|
|
|
|
It is all happening before any 'user' code except the changed events for the controls and they just usually exit. The same applies to all the programs.
I am not following the rest of what you are saying to know what I should do in the future.
What code would I post? It is a very large program 30 screens with code behind and 40 other modules. But fails in the startup frmMain.
I have posted what the flow is. frmMain .load is the first user code.
|
|
|
|
|
QBTeKcom wrote: It is all happening before any 'user' code except the changed events for the controls and they just usually exit. The same applies to all the programs.
Are you using any third-party controls? Are you referencing any other libraries?
When you go to the projects' properties page, on the tab "Application", is there a checkbox "Enable application framework"? Is it checked?
QBTeKcom wrote: I am not following the rest of what you are saying to know what I should do in the future.
You need to familiarize yourself with the debugger[^], and step through the code so that you can see what's being executed, and in what order.
QBTeKcom wrote: What code would I post? It is a very large program 30 screens with code behind and 40 other modules. But fails in the startup frmMain.
Then post the "startup frmMain"; or the lines of code that you changed that you were referring to earlier in this thread.
The stacktrace mentioned in the exception-box would be nice too
QBTeKcom wrote: I have posted what the flow is. frmMain .load is the first user code.
The flow doesn't say anything about the origin of the error, and this is not a helpdesk.
Bastard Programmer from Hell
|
|
|
|
|
Dearest VB GuRus,
thanks for all your contributions. this time, I have a problem and I need your magnanimous assistance and contributions.
I have developed a a VB Cash-expense application and I am designing a Database using MS-Access to be used as back-end.
I am confused on which fields should BE in the following tables below.
Table1: Department (This table has all the departments that are eligible to receive cash and make purchases.)
Table2: Items (this table has all items that are purchasable by all the departments.)
Table3: Purchases (This table SHOULD record all purchases made by individual departments.)
Table4: ReceiveableCash (This table SHOULD record all receivable cash that comes into the organisation (NOT THE DEPARTMENT).
Table5: PayableCash (This table SHOULD record all financial expenses made to a particular department.)
Table6: Accounts (This table records all the currentBalance, accountName and the AccountCode of different accounts. Every financial transaction is through a particular account.)
Kindly help me on the design of the above tables.
I do not know which fields should be included in the respective tables.
But my conception is:
Department:
DeptID
DeptName
Items:
ItemID
ItemName
Purchases:
PurchaseID
ItemID
PurchaseDate
Amount
PayableCash:
PayID
DeptID
Amount
Date
ReceiveableCash:
ReceiveID
Amount
Date
Accounts:
AcctID
AcctName
CurrBal
I do not know what SHOULD constitutes these table above and I really need your kindest assistance in the design.
Moreover, I also need to know the how to construct an SQL SELECT statement that will retrieve all expenses made.
Thank you.
Eyo Honesty
|
|
|
|
|
Eyo1 wrote: Dearest VB GuRus
You be wanting the database-guru's. (Aaaargh/Avast/more grog?)
Eyo1 wrote: I do not know which fields should be included in the respective tables.
Google for "normalization", it'll provide steps to get from an unorder collection of facts to a normalized model (so help me Codd). It won't take more than a day
Bastard Programmer from Hell
|
|
|
|
|
Ok, I've search Far and wide and have been unable to find a clear answer. What I want is to have a URL opened into my Custom tab controlled browser(Form1.vb)
From a link in my Main form (mainform.vb). I found the code to have it opened in a non tabbed control browser, but not for a tabbed controlled one which was:
Private Sub WebBrowser1_NewWindow(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles WebBrowser1.NewWindow
Dim myElement As HtmlElement = WebBrowser1.Document.ActiveElement
Dim target As String = myElement.GetAttribute("href")
Dim newInstance As New Form1
newInstance.Show()
newInstance.WebBrowser1.Navigate(target)
e.Cancel = True
End Sub
I am using Visual Studio 2010.
|
|
|
|
|
|
That only shows how to open a browser from another form. I want it to open the browser and navigate to the specified url.
|
|
|
|
|
I'm a little confused as all the parts are there.
If you are in main form, you open the browser (form1) if it is not already open and navigate to the url.
If you are in main form, and the browser is already open, send it the link via a public method, create the new tab and navigate to the url passed in via the message.
The article I linked to will show how to handle multiple tabs, and the rest is standard form interaction.
|
|
|
|
|
I'm not sure if you've understood my question correctly. I'll try explain it a bit more.
I have made a web browser that uses tabcontrol in "form1".
"mainform" is where I want to access the browser from, normally you would just use "form1.Show()" on the button, and it would open the browser form.
However I want it to open the browser "form1" and navigate to a specified url. The code I supplied only works with a browser made without using tabcontrol.
Hopefully I've explained it well enough now.
Thanks,
Brad
|
|
|
|
|
And my answer before this one, tells you what do to to achieve this.
See this article on how to pass values between forms if you are unsure of how to do this; Passing Values between Forms in .NET 1.x with C# and VB.NET examples[^]
On the browser form, read the url, create a new browser tab and then fire of the browser control navigate to the method (the same way as you would be doing at present).
|
|
|
|
|
I'm really hoping someone is able to give me the code. I looked at that link and I saw how I was able to get a url into the address bar, though not navigate to it.
|
|
|
|
|
|
It's a tab control browser. It doesn't use webbrowser1. And everytime I put tabcontrol1.navigate("url") it give me the error that navigate is not declared in form1.
|
|
|
|
|
But what is inside the tab control? it has to be a web browser control.
You need to be reading what we are telling you, and looking at the links we are giving you and start to digest the information and think about what you are doing, not just blindly copy and pasting what you are doing, you will get nowhere if you work like that.
|
|
|
|
|
I still am not able to get my head around this one =/
|
|
|
|
|
|
Sorted it out myself using
Form1.Show()
Form1.addresssearch.Text = "URL HERE"
Form1.gosearch.PerformClick()
|
|
|
|
|
How can i make movable buttons?
These buttons will represent the computers installed in a cybercafe.
These buttons will moove depending on administrators choice.
Thnx
|
|
|
|
|
Set their Left/Top properties via code. That's the basics of it, at least.
Anything specific you are stuck with?
|
|
|
|
|
I don't have any code.
can you help me please?
|
|
|
|
|
Hello everybody
This is the code for saving data in my acess database.
it works but the problem is that i can't save the flexgrid data.
Can anyone of you help me solving this????
Call DB
With ar
.Open "Select *From tblSupplies", strConek, adOpenStatic, adLockOptimistic
.AddNew
!Time = txtTime
!Date = txtDate
!User = txtUser
!VTotal = txtVTotal
!Qty = txtQTY
!Nr = txtNr
!ProdName = FG1.TextMatrix(FG1.Rows - 1, 2)
!Supplier = txtSupplier
.Update
MsgBox "Quanitities of product are being updated.", vbInformation, "POS"
End With
End Sub
|
|
|
|
|
What exception you are getting? As per your code you should have atleast 1 row and 2 columns in the flexgrid. The syntax for using TextMatrix property looks correct. I can help if you can provide more details about the rows and columns in it....
|
|
|
|
|
Form-Load i have insert this code :
With Me.FG1
.ColWidth(0) = 0
.ColWidth(1) = 1000
.ColWidth(2) = 4380
.ColWidth(3) = 1100
.ColWidth(4) = 1500
.ColWidth(5) = 1500
.Row = 0
.Col = 1
.Text = "Nr."
.Col = 2
.Text = "Product"
.Col = 3
.Text = "Quantity"
.Col = 4
.Text = "Price/Unit"
.Col = 5
.Text = "Price"
End With
txtTime.Text = Format(Now, "HH:mm")
txtDate.Text = Format(Now, "dd/mm/yyyy")
FG1.SelectionMode = flexSelectionByRow
End Sub
|
|
|
|
|
Hello everybody,
I want to extend the Trace method in order to write to different target files using the 'Trace.Writeline' command.
Imports System.Runtime.CompilerServices
Module mdlTraceListenerExtensions
<Extension()> _
Public Sub WriteLine(ByVal tr As Trace, ByVal LogType As Integer, ByVal message As String)
If Not tr Is Nothing Then (Do-what-has-to-be-done)
End Sub
End Module Everything compiles without errors, but the new overload doesn't show up in intellisense. Could someone pls. tell me where I'm going wrong?
Thanks,
Mick
|
|
|
|