Имя пользователя:
Пароль:
 

Показать сообщение отдельно

Аватара для XCodeR

Ветеран


Сообщения: 878
Благодарности: 53

Профиль | Сайт | Отправить PM | Цитировать


Так, нашел решене:
Код: Выделить весь код
private void PrintFromWB()
        {
            String key = @"Software\Microsoft\Internet Explorer\PageSetup";
            // read current user settings for header and footer
            String _footer = Registry.CurrentUser.OpenSubKey(key).
                      GetValue("footer").ToString();
            String _header = Registry.CurrentUser.OpenSubKey(key).
                      GetValue("header").ToString();
            Registry.CurrentUser.OpenSubKey(key, true).
              SetValue("footer", "");
            Registry.CurrentUser.OpenSubKey(key, true).
              SetValue("header", "");
            Reports_wb.ShowPrintDialog();
            Registry.CurrentUser.OpenSubKey(key, true).
              SetValue("footer", _footer);
            Registry.CurrentUser.OpenSubKey(key, true).
              SetValue("header", _header);
        }
Если у кого есть более "красивый" вариант - буду признателен

Отправлено: 18:13, 23-05-2009 | #3