본문 바로가기
300x250

c#93

DevExpress / Winform 메시지 박스안의 버튼에 커스텀 이미지 추가하기 메시지 박스안의 버튼에 커스텀 이미지 추가할 수 있습니다. using System.Windows.Forms; using DevExpress.XtraEditors; namespace WindowsFormsApp1 { /// /// 메인폼 클래스 입니다. /// public partial class MainForm : Form { // Constructor (Public) #region MainForm() - 생성자 입니다. /// /// 생성자 입니다. /// public MainForm() { InitializeComponent(); XtraMessageBoxArgs xtraMessageBoxArgs = new XtraMessageBoxArgs(); xtraMessageBoxArgs.Caption = ".. 2019. 6. 7.
DevExpress / Winform 자동 종료 메시지 박스 만들기. DevExpress / Winform 자동 종료 메시지 박스 만들기 입니다. 몇초뒤에 닫힐지 설정하고, 설정된 시간이 점점 줄어드는 것을 확인할 수 있습니다. using System.Windows.Forms; using DevExpress.XtraEditors; namespace WindowsFormsApp1 { /// /// 메인폼 클래스 입니다. /// public partial class MainForm : Form { // Constructor (Public) #region MainForm() - 생성자 입니다. /// /// 생성자 입니다. /// public MainForm() { InitializeComponent(); XtraMessageBoxArgs xtraMessageBoxArgs = .. 2019. 6. 7.
C# / Winform 다른 객체의 속성을 ListBox로 불러올 때 정상적으로 값이 출력 안될 때 해결방법 입니다. Winform 다른 객체의 속성을 ListBox로 불러올 때 정상적으로 값이 출력 안될 때 해결방법 입니다. 아래의 그림과 같이 리스트 박스에 값이 안나오고 객체 이름이 출력되는 경우에 리스트 박스의 속성중 DisplayMember를 설정해주면 됩니다. this.recordListBox.DisplayMember = "Time"; 위의 코드와 같이 다른 객체의 속성 값을 리스트 박스의 DisplayMember에 추가해주면 됩니다. 2019. 6. 2.
C# / Winform ListBox 데이터 소스에 바인딩 안될 때 해결방법 입니다. Winform의 ListBox에 바인딩 할 때 this.listBox.DataSource = sourceList; 와 같이 바로 제네릭 리스트와 같은 데이터를 바로 데이터 소스에 넣게 되면 제대로 동작하지 않습니다. 이럴 경우 먼저 데이터 소스에 null 값을 넣어준 다음 데이터를 데이터 소스에 넣어주게 되면 정상적으로 데이터가 들어갑니다. 아래 코드는 예제 소스 입니다. #region SetListBoxControlData(sourceList) - 리스트 박스 컨트롤 데이터를 설정합니다. /// /// 리스트 박스 컨트롤 데이터를 설정합니다. /// /// 소스 리스트 private void SetListBoxControlData(List sourceList) { this.recordListBox.Da.. 2019. 6. 2.
300x250