|
That bis only part of the designer-script what you will find on every designer-created container-control.
|
|
|
|
|
on 02.11.16 at 19:16 you wrote :
seems that the problem is the main form.
I've made a test , and I have configured that after login form to open other forms and not the main form. When this forms is open , and I try to close , the application is closed correctly.
could you please explain this ...? I think, there you could find the Solution ...
|
|
|
|
|
Ok , to be more clear :
My default configuration is that after the login form , the main form is open. Just for test , I've tried to open another form after the login form.
So I have 2 situations :
This scenario fail :
Start the application - Login form is open - Login form is closed and Main form is open - Try to close the main form - Main form is closed but application continue to run.
This scenario works correctly :
Start the application - Login form is open - Login form is closed and another form (not Main form) is open - Try to close the open form - The form and the application are closed correctly.
so it seems that the problem is that when the main form is the last open form , when closes the application continue to run.
|
|
|
|
|
When I read this reply I agree with Richard.
The problem comes from your login-form - maybe the main-form has also some circumstances ... but the common part is the login-form.
Here you should look - or perhaps "we" if you provide some code ...
|
|
|
|
|
Ok , let's suppose I remove the main form from my project. there will be no more problems.
so I think the main form is the problem.
|
|
|
|
|
But you have still not provided any useful information that could help us to diagnose your problem.
|
|
|
|
|
OK ... I agree with Richard again.
To give you suggestions we need much more information about the things which happen on your Mainform.
In this context are possible mistakes :
- a still running Task / Thread / Backgroundworker
- you added an Eventhandler to a method and don't removed it
Have you set any Breakpoints inside your code which show you what happens if you try to close the application ( which methods are called and which not) ?
|
|
|
|
|
Every time you drag a control to the form and drop it there, the IDE generates some code. Code to initialize the control at that location, and code to add it to the "components" collection. If the form closes, the controls in the "components collection" are disposed.
Does the mainform try to show a messagebox on closing? To prevent the user from losing work or anything similar?
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
no , does not display any message on closing. I repeat that inside form there's no code.
|
|
|
|
|
It really sounds as if your login form is the culprit, but without seeing some code it is anyone's guess what you are doing.
|
|
|
|
|
Hello !
i'm using vb.net 2013.
I have a situation where I need to have a combobox and a tabcontrol below it.
I've put the combobox at the top and set dock type as Top.
Below I've set the tab control and set the dock type as Fill.
But now the beginning of tab control is covered by combobox.
I've tried to set the tabcontrol's dock type as bottom , but I have empty space between combobox and tabcontrol.
Is there any way to resolve this ?
Thank you !
|
|
|
|
|
You need to change the z-order of the controls. Select the combobox control, then right-click it and select "Send to Back". That should do the trick.
Cheers,
Mick
------------------------------------------------
It doesn't matter how often or hard you fall on your arse, eventually you'll roll over and land on your feet.
|
|
|
|
|
Hello !
I'm using vb.net 2013
1) I have problems running my program on different PC with different monitor and screen size.
when the screen resolution is lower than my form size the form does not fit on the screen and the controls are dragged ut of their positions , the situation does not make better even when I maximize the form to fit the screen. And on larger high resolution screens , the forms becomes too small. Is there any solution ?
2) And another question , the form's size width and height that I can configure inside vb.net , are related with screen resolution ? for example a form with size 968x610 can be fully displayed on a 1024x768 resolution ?
Thank you !
|
|
|
|
|
There are several possibilities to solve your problem.
- you could create forms which size matches to your lowest possible screen-resolution
- your form matches to your screen-resolution and you re-calculate the position (and perhaps also the size) of each control on the form. In this case it could also make sense that you change the fontsize of the involved controls. But this makes a lot of work - you should realize that.
I'm sorry but I don't understood your question 2
|
|
|
|
|
To be more clear for question 2 :
when I choose Form's size Width and height , these numbers does have any relations with screen size or resolution ? For example if a have a form with size 1024x768 and the screen size ( resolution ) is 1024x768 , does this form fits completely on the screen and is full displayed ?
|
|
|
|
|
No, they don't. They are absolute pixel count position, height, and width.
If you pick a size of 1024x768 and the screen size is the same, it'll fill the screen.
|
|
|
|
|
And then how do you explain that a form with size 968x610 goes outside a screen 1024x768 ?
Speaking for form's size the width 968 is greater than 1024(when speaking for screen resolution ) ?
|
|
|
|
|
You would first have to produce some evidence that a form that is smaller than the screen is displayed bigger than the screen.
Speed of sound - 1100 ft/sec
Speed of light - 186,000 mi/sec
Speed of stupid - instantaneous.
|
|
|
|
|
I have no idea what your system is setup like, such as setting a custom scaling level in the Display control panel, but normal the form if set to 968x610 WILL BE 968x610.
|
|
|
|
|
I always design for the smallest reasonable screen size. I used to have a graphic as my background that displayed the sizes from 640 - to 1024 but that was a long time ago. Now I make sure my forms fit a 13" laptop at 1024.
I then use a dock type layout where the central control (commonly the gridview) is expandable to fill the area when the user maximises the form.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hello !
I'm using vb.net 2013 and Entity Framework 6
I need to implement the INotifyPropertyChanged
I've done that by manually changing the classes.But I have problems , because every time that I make changes on my database , the "update model from Database" on visual studio is almost unusable , so I have to re-create from the beginning the Model.edmx.But after that , all that I wrote for implementing InotifyPropertyChanged is lost , so I have to make from the beginning.
Is there any easy way to do that ?
Thank you !
|
|
|
|
|
This article may help[^]
It's in C#, but you can use a convertor to translate it to VB, such as the one from Telerik[^].
What do you get when you cross a joke with a rhetorical question?
The metaphorical solid rear-end expulsions have impacted the metaphorical motorized bladed rotating air movement mechanism.
Do questions with multiple question marks annoy you???
|
|
|
|
|
Hello !
I'm using vb.net 2013 and entity Framework 6.
I'm trying to save a new object and a child object like this :
MyObject ---- id , nm , value
ChildObject ---- id , name , vl , MyObjectID ( Foreign key related with id on MyObject )
Dim obj1 as Myobject
Dim child1 as ChildObject
obj1=new MyObject
obj1.nm="123"
obj1.value=25
obj1.ChildObjects=New List(of ChildObject)
child1=new ChildObject
child1.name="abc"
child1.vl="efd"
obj1.ChildObjects.Add(child1)
context.MyObjects.add(obj1)
Context.SaveChanges
After this code , the obj1 is saved on database , but the child1 is not saved. No error messages.
What can I do ?
|
|
|
|
|
Show the code that defines the Myobject and ChildObject. I'm suspicious of the code that adds a NEW list of ChildObject.
|
|
|
|
|
Partial Public Class MyObject
Public Property id As Integer
Public Property nm As String
Public Property valu As Integer
Public Overridable Property ChildObjects As ICollection(Of ChildObject) = New HashSet(Of ChildObject)
End Class
Partial Public Class ChildObject
Public Property id As Integer
Public Property name As String
Public Property vl As String
Public Property MyObjectID As Integer
Public Overridable Property MyObject As MyObject
End Class
|
|
|
|