Hi
(not sure if im posting in right place so apologies if its not)
I have multiple entities, for example
Customer
Suppler
Sales Invoice
Purchase Invoice
Currency
etc etc
I would like to be able to add a "Notes" record to ANY type of record
The Notes table would like this
NoteID - Int (PK)...
Lets say I have a Master/Detail form bound to Linq2Sql objects (for arguments sake an Order / Order Line form)
The order form shows the order lines in a datagrid, which is readonly
To add/edit an order line the user clicks a button.
The button opens up another form and the details are entered...
Well i tried amended the code as follows
Dim str As String = vbCrLf
Dim Words() As String = text.Split(" "c, vbCrLf)
Dim currentLineLength As Integer = 0
Dim Lines As ArrayList = New ArrayList((text.Length / maxLength))
Dim currentLine As String = ""...
Well I have just realised what is happening when i dont remove the vbcrlf.
It doesnt reset the currentlinelength so everytime i run the event the text gets longer as linebreaks keep getting added every x chars.
So i need to somehow check for a linebreak and if one is found reset the count...
Hi Guys,
This is driving me daft, I need to restrict the length of each line entered onto a multi line textbox to only be X chars, however the number of lines is not a concern.
Now i have found this code on internet which needed a little tweaking but as it stands now ...
Public Function...
Ah ha,
Sorted it.
I had put jebenson's code in the resize event of my base form from which i inherit so everytime i set the dockstyle the form resized and maximized.
Removed that and it works like a treat :)
i have tried the exact code you pasted pmegan however i still get the bar across top. Very Annoying
I also tried setting the borderstyle to none and docking but again no luck.
There has to be a way, that grey bar is ruining my nice new GUI :)
jebenson cheers, that fixes another problem I have...
Yes, the parent is set to MDI Container and when i load the forms i set the mdi parent and then .show
But i still get the controls when the mdichild is maximized even if the showclose and showminimize etc properties are set to false. I have also tried setting the form border to none.
The form is set to maximized, however just below the application title bar there is a second set of buttons for min / max / closed which control the mdi child
I have an application which uses an MDI interface, forms are loaded into the MDI form and a tab strip lists all open forms for the user to select between any open forms.
the user should never be able to change the MDI Children from been maximized (kinda like worksheets in Excel whereby they are...
i might have misled you here,
the someinstance i mentioned above is a reference to a loaded form which has all the dataloaded.
So if i cycled through the controls like so
for each c as control in f.controls
'do whatever
next
i could access the data in those controls.
however i need to...
ah sorry yea the reference is being passed.
Basically i want to get the bindingsource's current datarow and extract a field value which i will then pass to crystal reports.
The way i do it at the moment is have a sub in about 20 forms and reference the binding source by name in each but...
So the components dont exist until an actual form is created?
if i used code like the following
dim f as Form
f = someinstance
for each c as control in f.controls
'do whatever
next
There must be someway of doing the same with components?
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.