|
Thanks Pavel. Would u pls give me a start for the same...
Thanks again...
|
|
|
|
|
You can attach the debugger to the service after it is running, and then set breakpoints in it to stop it and look in on things. If you need to see what it is doing when it first starts up, then just add some code to your service to sleep for a minute or so to give you time to attach the debugger right after you start the service.
|
|
|
|
|
Hi !
Why don't you use windows scheduler to run your your program?
To have debug infomation make sure that you write all needed infotmation in a file for exemple.
|
|
|
|
|
Thanks for the reply.
Would u pls give me a start for the same...
Thanks again...
|
|
|
|
|
In crystal report, you can select the printing direction in Layout tab between "Across then Down" and "Down then Across."
I was wonder how to do this in local RDLC report or is rdlc even have this option?
|
|
|
|
|
I'm looking to create a VBS that will query the RSoP and return the security settings of the system e.g. account policys, local policys, event log etc.
So far with a bit of research i have this, however this seems to just display password details - min password age, lockout duration, min max length etc.
strComputer = "."
Set objWMIService = GetObject _
("winmgmts:\\" & strComputer & "\root\rsop\computer")
Set colItems = objWMIService.ExecQuery _
("Select * from RSOP_SecuritySettings")
For Each objItem in colItems
Wscript.Echo "Key Name: " & objItem.KeyName
Wscript.Echo "Precedence: " & objItem.Precedence
Wscript.Echo "Setting: " & objItem.Setting
Wscript.Echo
Next
Can anyone help me further or point me in some directions.
Cheers
Gary
|
|
|
|
|
I am trying to invalidate one mdi child form from another to call PanelDraw.Paint- basically refreshing one form based on user input from another (using VB.net 2008). The form I'm trying to refresh/invalidate is called "GraphicsViewer" and I'm currently using
GraphicsViewer.Invalidate()
GraphicsViewer.Update()
from the user input form. The GraphicsViewer form seems to be updated but the panel does not actually get refreshed until the GraphicsViewer form is minimized then maximized again. I am not finding a solution online- is it possible to do this?
I have tried using GraphicsViewer.TopLevel = True before calling Invalidate() with no luck.
|
|
|
|
|
Member 2512391 wrote: I am trying to invalidate one mdi child form from another
That would be a Bad Practice or Bad Design. See Model-View-Controller[^] where one principle is that Views should not be coupled.
led mike
|
|
|
|
|
I am currently working on a program that have external program window in one of his controls.
This external program in the form control is focused standardly.
But when i want to click something on the mainform i have to click twice before the options is selected.
And i have to press CTRL + TAB twice to get another program focused.
How can i attach this external program to my form so they both hold the focus ?
I have tryed many things with Win32 API Calls but nothing works.
So has anyone an idea how to handle this ?
|
|
|
|
|
2 different application can't have focus at the same time. Have you seen anything like that before?
Ahsan Ullah
Senior Software Engineer
|
|
|
|
|
Yes its possible i have seen this before.
Because the second program in this task putty is opened in a user defined control.
I have before that when you activate the program in the usercontrol that mainform is activated to.
And we have a direction in which we are searching for a solution but we have not found an fix yet.
AttachThreadInput is an API user32 Call we are trying to use for this problem and a couple of other calls. But with the last 4 time the computer crashed totally because af an incorrect call.
|
|
|
|
|
Hi,
I'm working with C# on .NET 3.5SP1. What I'm trying to achieve is as follows:
I have a form (frmShell) which can "spawn" other forms. Each of the other forms (frmMyFormType, for example), has a main content panel, into which I add a control of an appropriate type (cntMyFormTypeView, for example). Whilst the control is loading, I display a loading panel (cntLoader in my case).
In the constructor of each form I create a loading panel, and add it to the Controls of the content panel like this:
var Loader = new cntLoader { Dock = DockStyle.Fill };
contentPanel.Controls.Add(Loader);
In the Form_Load event, I then start a background worker, whose DoWork method looks something like this:
e.Result = Invoke(new CreateViewInvoker(CreateView), parameters.ObjectIdentifier);
Where CreateViewInvoker is defined with the following:
private delegate cntMyFormTypeView CreateViewInvoker(long itemId);
And the CreateView method is as follows:
private cntMyFormTypeView CreateView(long itemId)
{
return new cntMyFormTypeView(this, itemId) { Dock = DockStyle.Fill };
}
In the Completed method of the background worker, I do the following:
var control = (Control)e.Result;
contentPanel.Controls.Clear();
contentPanel.Controls.Add(control);
contentPanel.Invalidate();
The problem: this works, but freezes the UI when I Invoke the CreateView method (the constructor of cntMyFormTypeView can take a long time to run). This does make sense since it will be invoked on the UI thread.
Does anyone have any suggestions as to how to do this differently such that I create a control in the background (without locking up my UI), but then still use it from my UI thread?
Thanks,
James
|
|
|
|
|
I think it's pest or cholera there. Either you create your control on the UI thread which then freezes while the control is being loaded, or you start a second thread with windows message queue and all for the control, but then you'll have to communicate with it via (Begin)Invoke, with all the overhead this requires.
|
|
|
|
|
Thanks for the reply. Do you have any pointers for documentation/examples on your second suggestion? There isn't too much communication between the form and its control, so the overhead might be bearable.
Thanks,
James
|
|
|
|
|
Sorry, I never did this and only vaguely remember having read about it.
Anyway, why do you need to load a control in the background? Usually loading a control doesnt't take so long that another thread makes sense. If it's because of many data or a huge image, you could load those in a (non-UI) worker thread.
|
|
|
|
|
It has several large-footprint controls on it(5 x DevExpress XtraGrids, an XtraLayoutControl, an XtraScheduler etc). They are all on tabs though, so I may try lazy loading on tab changes. I'm already using a background worker for making a service call to get data.
Thanks for the replies,
James
|
|
|
|
|
You're not going to gain anything there. The framework marshals BeginInvoke calls to the correct thread by posting messages; in this instance having the extra thread actually creates more work.
|
|
|
|
|
Hi,
I am new to the Visual C#, I have an application where I need to create the Combobox cells in the DatagridViewcolumn. I am able create the Comboboxes dynamically by replacing the DataGridviewTextBoxColumn Cell. The static Data to be updated in the ComboBox is from the dbc File, which can have any number of items. Here let us take 2 items from the dbc file, there is another source in the same datagrid from different column which data should be reflected in the ComboBox Cell but the items shall not be added, the only value shall be displayed in the combobox cell. Please help me .
modified on Tuesday, August 19, 2008 2:21 PM
|
|
|
|
|
Is there a way to Filter the DataGridViewComboBoxCell Items from the Display. Please give any clues.
SomaShekhar
|
|
|
|
|
Soma Shekhar wrote: Is there a way to Filter the DataGridViewComboBoxCell Items from the Display.
Yes
Soma Shekhar wrote: Please give any clues.
You can filter the DataSource[^]
led mike
|
|
|
|
|
mike Thanks for your help.
Using DataSource, DisplayMember, and ValueMember we can Filter.
I have an application where I have a NumericUpDownCell in the Column1 and ComboBox Cell in Column2 both are created Run time. I need to Display what ever the value updating in the NumericUpDownCell in the ComboBox Cell, but when user selects the ComboBox Cell in the Drop Down view only the item from the File needs to be displayed how can I acheive this. Example : I need to Display 0 to 254 in ComboBox Cell when updating the NumericUpdown. When user selects the ComboBox I need to show only 255 rest of the values shall not be shown in the Drop Down list.
Please provide a snippet of VC# code .
SomaShekhar
|
|
|
|
|
Soma Shekhar wrote: Using DataSource, DisplayMember, and ValueMember we can Filter.
No. Using whatever you used for the DataSource you filter the items.
led mike
|
|
|
|
|
Hi mike,
My application is some thing like threre are 2 datagridviews 1 with main data and the second displays the if any sub items in the main item. sub items can be value range, few selections, true or false type. In the second gridview I have NumericUpDownCell, ComboBox Cell. In the Sub Items there are only 2 values for the comboBox but the range of values can be 0 to 255, so when user selects ComboBox I need to display 0 ("Initial Value") and 255 ("Invalid Value"). When NumericUpdOwn is selected I have to increment/decrement values range from 0 to 255 and the 1 to 254 shall display in the ComboBox.
I have done some mimik based on your input but differently. When ComboBox is selected I have removed the rest of the items, if there is no event selectionchanged I have restored the item, but it causes a blank ComboBox for a short duration.
SomaShekhar
|
|
|
|
|
I'm having a difficult time understanding what your requirements are. For this reason I cannot suggest a specific solution. However in general, for cases that might require more complicated behavior a custom column might be a good solution.
led mike
|
|
|
|
|
Mike,
Thanks for your guidence, I will check it out, mean while what i did was I have added a Item when the value is changed in the Numericupdowncell and removed when combobox is selected. Now it is working fine.
SomaShekhar
|
|
|
|