private void Init() { // String fileName = "particle"; try { //set the step of the scrollbars hWndControl.setGUICompRangeX(new int[] { scrollBarX.Minimum, scrollBarX.Maximum }, scrollBarX.Value); hWndControl.setGUICompRangeY(new int[] { scrollBarY.Minimum, scrollBarY.Maximum }, scrollBarY.Maximum - scrollBarY.Value); } catch (Exception ex) {; } }