2066 / 1483 / 384
Регистрация: 26.06.2017
Сообщений: 4,252
|
||||||
1 | ||||||
Операция с Visual Styles привела к ошибке, поскольку сейчас нет активных стилей отображения03.02.2021, 22:14. Показов 3160. Ответов 6
Метки нет (Все метки)
Добрый день.
Создаю собственную прорисовку ComboBox (см. код ниже), взято отсюда. Однако при добавлении элемента UserControl1 на форму возникает сообщение: Visual Styles-related operation resulted in an error because no visual style is currently active. (Операция с Visual Styles привела к ошибке, поскольку сейчас нет активных стилей отображения.). Никак не соображу, что делаю не так. Проблема исчезает при комментировании SetStyle, но тогда не вызывается OnPaint. В чём проблема? Кликните здесь для просмотра всего текста
0
|
03.02.2021, 22:14 | |
Ответы с готовыми решениями:
6
Установка PHP5 привела к ошибке Шаблонное название стилей - core-styles Операция не может быть завершена, поскольку эти папки или файл открыты Сообщение об ошибке "Не удалось запустить приложение, поскольку его параллельная конфигурация неправильна" |
04.02.2021, 17:31 | 2 | |||||
Думаю, что если убрать InitializeComponent, все благополучно разрешиться.
Ну и, наверное, нужно определить
1
|
04.02.2021, 19:55 | 4 |
Такой проблемы не наблюдается. Это никакой не UserControl, а обычный класс, наследуемый от ComboBox. Для получения картинки выше использовался ваш код лишь слегка подредактированный.
Вы бы пояснили, какого эффекта вы ожидаете.
0
|
04.02.2021, 22:29 | 6 | ||||||||||
Вот код соответствующий приложенной картинке
Кликните здесь для просмотра всего текста
PS. Среда: - VS2010 Ultimate, а у вас, как я понял, версия Express - NET 4.0 Client, м.б. попробовать поставить полную версию NET 4.0
0
|
2066 / 1483 / 384
Регистрация: 26.06.2017
Сообщений: 4,252
|
||||||
04.02.2021, 23:01 [ТС] | 7 | |||||
Решено.
ovva, спасибо за помощь. Кому будет интересно почему у меня (и возможно у Вас) так, то внимательно читаем ms-доки . Дело в стиле темы оформления операционной системы, если включен классический стиль, то имеем InvalidOperationException при вызове методов класса ComboBoxRenderer. Ну и в догонку как правильно решить задачку:
1
|
04.02.2021, 23:01 | |
04.02.2021, 23:01 | |
Помогаю со студенческими работами здесь
7
Сообщение об ошибке: "Не удалось запустить приложение, поскольку его параллельная конфигурация неправильная" Операция горизонтального отображения прямоугольной матрицы Очередь: операция удаления и отображения текущего состояния Стек: операция удаления и отображения текущего состояния Visual Studio 2013: С# Debug - не может начать отладку, поскольку цель отладки отсутствует Visual studio 2015 Не удалось запустить приложение, поскольку его параллельная конфигурация неправильная Искать еще темы с ответами Или воспользуйтесь поиском по форуму: |