![]() |
|
Модераторы: diadiavova, gambit |
![]()
|
|
| orhor |
|
||||
|
Новичок Профиль Группа: Участник Сообщений: 5 Регистрация: 27.10.2006 Репутация: нет Всего: нет |
Здравствуйте, у меня возникает та же проблема: Visual Studio внезапно стала выкидывать эту ошибку. Каждый раз VS указывает на следующую часть Application.Designer.vb:
и после этого происходит ещё одна ошибка: The CLR has been unable to transition from COM context 0x1b2258 to COM context 0x1b23c8 for 60 seconds. The thread that owns the destination context/apartment is most likely either doing a non pumping wait or processing a very long running operation without pumping Windows messages. This situation...... Что странно: если я выбираю другую форму в качестве формы по умолчанию, всё проходит нормально. Я снова выбрал предыдущую (которую и хотел сделать стартовой), запустил приложение и всё было нормально. Но после нескольких запусков ошибка снова стала возникать. Это сообщение отредактировал(а) Exception - 28.10.2006, 18:34 |
||||
|
|||||
| ivashkanet |
|
|||
![]() Кодю потиху ![]() ![]() ![]() ![]() Профиль Группа: Участник Клуба Сообщений: 3684 Регистрация: 23.2.2006 Где: Гомель, Беларусь Репутация: 5 Всего: 149 |
orhor, please give us the full VS project (compress it, click on a first green maple leaf here (with "ответить" word, then click on browse and attach the file).
This code is added in each VB application by VS wizard. Therefore, we can’t understand the problem you have. P.S.
This code is marked with DebuggerStepThroughAttribute so the debugger isn't stop at this place, I think. P.P.S. Кроме того. Что это за понты писать на английском? Если ты попал на этот сайт, понял куда тебе писать P.P.P.S. Или это к нам стали приводить поисковики после изменения адресной строки |
|||
|
||||
| orhor |
|
|||
|
Новичок Профиль Группа: Участник Сообщений: 5 Регистрация: 27.10.2006 Репутация: нет Всего: нет |
hi, thank you for your quick answer, i think i'm gonna write in english, even when I'm from Czech Republic - thats the reason I 'can' read po ruski
I can attach all the project, but it is all written in czech, including the controls and variables names so if you don't mind... Now I'm a step closer to figuring out whats wrong: when I delete the dir with user.config file (I'm using My.Settings in my app) the prog runs OK, even when several settings are saved, the prog runs OK. So now Im investigating what settings are doing wrong. I attach my project, if you need me to translate it to english just let me know. Thank you Присоединённый файл ( Кол-во скачиваний: 7 )
PrejmenovavacFotek.zip 41,84 Kb |
|||
|
||||
| $tatic |
|
|||
![]() Опытный ![]() ![]() Профиль Группа: Участник Сообщений: 651 Регистрация: 28.1.2005 Репутация: нет Всего: 22 |
|
|||
|
||||
| Exception |
|
|||
|
Эксперт ![]() ![]() ![]() ![]() Профиль Группа: Участник Клуба Сообщений: 4525 Регистрация: 26.12.2004 Репутация: 18 Всего: 186 |
Возвращаясь к теме, а может заработает, если заменить Form1 на New Form1() в коде того метода? Returning to the topic, it seems to me your code will work if you replace Form1 with New Form1() in the code of that method. |
|||
|
||||
| orhor |
|
||||
|
Новичок Профиль Группа: Участник Сообщений: 5 Регистрация: 27.10.2006 Репутация: нет Всего: нет |
Yeah I vote so! It's very pleasant experience to be on a russian forum, even when I cannot join in with your language (maybe a bit later back to the topic: have you meant this?
This generates another error of the same desription but in the other place. Now it stops in the stav module at line
I cant see why it says that the form has referenced to itself by the name Form1 when it is in the module stav in the stav.vb file? Díky za vaše nápady Thanks for your ideas |
||||
|
|||||
| Exception |
|
|||
|
Эксперт ![]() ![]() ![]() ![]() Профиль Группа: Участник Клуба Сообщений: 4525 Регистрация: 26.12.2004 Репутация: 18 Всего: 186 |
Well, if I were you I would:
1. Set another form as startup and see if generated code changes and what exactly difference is (compare normal and error causing code). 2. If the way above wouldn't work for you then just create a new form, set it as the startup, ensure that it runs OK and then copy-paste all the controls and code from the original one to it to see what causes the error. Это сообщение отредактировал(а) Exception - 28.10.2006, 22:06 |
|||
|
||||
| orhor |
|
|||
|
Новичок Профиль Группа: Участник Сообщений: 5 Регистрация: 27.10.2006 Репутация: нет Всего: нет |
yes, the only thing that changes when I change the starting form is the line Me.MainForm = Global.AppName.Form1 to the corresponding form.
I thing the problem is somwhere else. That behaviour I described above with the Settings. When I delete the user.congig file all is OK. But I cant see where do I use the settings in a wrong way. PLease could you focus on that? I cant determine which setting is doing wrong Это сообщение отредактировал(а) orhor - 28.10.2006, 22:55 |
|||
|
||||
| Exception |
|
|||
|
Эксперт ![]() ![]() ![]() ![]() Профиль Группа: Участник Клуба Сообщений: 4525 Регистрация: 26.12.2004 Репутация: 18 Всего: 186 |
Seems like a settings problem. Why don't you just use classes from the System.Configuration namespace rather than trying to make all that visual stuff work? It is much more powerful and flexible mechanism - and it does not require any additional code to be generated. If you're new to it, you might want to MSDN/google for information on using ConfigurationManager class and others related. Though this model doesn't support scopes of settings different than the application scope (all of them are being stored in the app.config file naturally) I don't think this feature was really useful. Personally, I would rather use System.Configuration than that buggy My.Settings classes.
Это сообщение отредактировал(а) Exception - 29.10.2006, 01:54 |
|||
|
||||
| ivashkanet |
|
|||
![]() Кодю потиху ![]() ![]() ![]() ![]() Профиль Группа: Участник Клуба Сообщений: 3684 Регистрация: 23.2.2006 Где: Гомель, Беларусь Репутация: 5 Всего: 149 |
It is really strange, but I haven't any compiling errors I have started the app. It works OK. I think the problem is a framework or VS problem. Try to reinstall the FW and VS. If it doesn't solve the problem, you have to refuse using the VB class My. Yes, it is bad solvution but it is solution. P.S. I hope the reinstalling will fix the problem you have. |
|||
|
||||
| ivashkanet |
|
||||
![]() Кодю потиху ![]() ![]() ![]() ![]() Профиль Группа: Участник Клуба Сообщений: 3684 Регистрация: 23.2.2006 Где: Гомель, Беларусь Репутация: 5 Всего: 149 |
Ouhch, I have generated the exception (it appear in Release compiling mode)
But I don't understand how
I think it isn't a setting's problem. It is a your code problem. Sometimes, some part of your code takes too much time (more then 60 sec). we need to find this part and do it more easy or insert Application.DoEvents inside it. Добавлено @ 13:07 orhor, it should be better Iа you used the english variables naming because it is too difficalt to andertsand you code |
||||
|
|||||
| orhor |
|
||||||
|
Новичок Профиль Группа: Участник Сообщений: 5 Регистрация: 27.10.2006 Репутация: нет Всего: нет |
Thank you for your suggestion, I'll try. I used to use VB6 years ago, now I'm trying to get back to VB.NET, so I have to learn a lot
The way to generate the error is to run the app, it runs OK for the first time, to set all the settings needed, run the copying action, close the app and then rerun the app and voila - the error is here. Detailed description of app: The app should copy or move files from one location to another alowing to rename the files. Typical model: Move files from digital camera (they are named like P20566544.JPG) to your picture folder. The tabs: Tab 1: here you set the source folder, by clicking on Set default you set the path to be used the next time you run the app. If the default path is not set, the app remembers the path last used. The check box in the middle sets if the files from the children folders will be copied/moved too. The radio buttons determine wether all the directories substructure will be copied, or the files from the source subfolders will be copied/moved to one destination folder. Tab2: Destination path. 'Set default' will remember the path to be used next time, otherwise the app remembers the path last used. The check box at the bottom determines whether to create the subfolder in the destination folder. The name of the subfolder can be generated automaticly according to the mask created. The mask is saved in the combobox. So in the next run yhe user dont need to set anything. the folder will be created automaticly... Tab 3: Action: Move x Copy Checkbox: renaming of the files . User can use the mask. The mask items are selfexplanatory Ithink. The checkbox on the bottom: Automatic counter. It should work in this way: if you use this mask for example 2006-10-29 - 10.29.33.jpg ( $(CreateDate:RRRR)-$(CreateDate:MM)-$(CreateDate:DD) - $(CreateDate:hh).$(CreateDate:mm).$(CreateDate:ss)$(ext) ) you can have two or three files with the same name (if your camera's automatic shutting mode is fast enough Tab 4: Summary and run button. The app should be able to run in the system tray, and when it captures 'New device' windows system message, it shoud check if the default path is present and it could automaticly transfer the files. Thats to the app. I know I should use all the stuff in english. That was just a learning try so I thought I won't need english naming conventions and here is the result
I think the 60sec gap is generated by the settings problem. If the settings are not used (when I delete the user.config file) the problem does not appear. Should I translate the source code to english? Thank you for your time and patience and ideas Это сообщение отредактировал(а) orhor - 30.10.2006, 00:06 |
||||||
|
|||||||
![]()
|
| Правила форума VB .NET | |
|
|
Если Вам помогли и атмосфера форума Вам понравилась, то заходите к нам чаще! С уважением, diadiavova. |
| 0 Пользователей читают эту тему (0 Гостей и 0 Скрытых Пользователей) | |
| 0 Пользователей: | |
| « Предыдущая тема | VB .NET | Следующая тема » |
|
|
По вопросам размещения рекламы пишите на vladimir(sobaka)vingrad.ru
Отказ от ответственности Powered by Invision Power Board(R) 1.3 © 2003 IPS, Inc. |