|
Steve51771 wrote: Mark would be right if...
Perhaps you are incorrect in asking to do what is not possible.
only two letters away from being an asset
|
|
|
|
|
Then I suppose that should have been the initial answer.. No matter... Thanks for your help...
|
|
|
|
|
Steve51771 wrote: Keep getting a NullException
Byte[][] allScriptImage = null;
Gee, I don't understand why you'd be getting a NullException here.
You have to initialize it somehow, like
Byte[][] allScriptImage = new Byte[4][];
only two letters away from being an asset
|
|
|
|
|
The key is DYNAMIC assignment...
But thanks anyway
|
|
|
|
|
C# WinForms .Net 3.5
I have datagridview that displays a list of entries pulled from a database. This part works.
The datagridview has 'ScrollBars' set to 'Both'.
The setup is as follows...
TabControlMain has 2 pages, TabControlMain.page1 has a tabcontrol of which its first page contains the DGV in question.
TabControlMain.page2 also has a tabcontrol.
When the entries load (added via 'ReportProgress' event of background worker) then scroll bars appear as desired.
However, If the entries are loaded when TabControlMain.page2 is displayed and the user selects TabControlMain.page1, then the scroll bars are disabled, even thou the content is larger than the display area. If the user click a button to reload the list, then they appear again.
Basically, if the datagridview is populated while it is not visible then the problem occurs.
Also to note, that the DGV is part of a userControl.
Has anybody come across this issue before?
So far I have had no luck, my best idea was to try to update the DGV whenever the page is reselected. But I have tried .Refresh, .Update, .Invalidate...
...Just tried setting 'ScrollBars' to 'None' and then back to 'Both' when the DGV is reselected and the scrollbars are enabled again. This is what I want but is not the ideal solution. Can anybody offer a better alternative? Or reason why it happens in the first place?
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
Hi,
I want to create a simple GUI designer for users. The designer should be very simple and user can select some components such as text boxes , labels and others from tool window and than they can place this components on windows form during run time.
Please give me or name of such articles or which topic should I search in google..
Thanks.
|
|
|
|
|
Take a look at this[^] article. It doesn't contain the answer to your problem itself but if you scroll to the bottom the links listed there do. They will at least give you some terms to search for.
Other useful terms:
Design Surface
Hosting Controls at run time
Good luck!
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
muhammadumairomee wrote: The designer should be very simple and user
As a general rule, the simpler it is for users the harder it is for you to program.
This is a massive topic, and with the risk of sounding harsh; If you need to ask how to start this, you do not yet have the knowledge to complete it.
|
|
|
|
|
You could always create a windows application using VS(assuming you use it).
Place whatever components you require on the form.
Then have a look at the YourForm.designer.cs files.
This will give you all the necessary info on creating the various controls.
Next investigate Drawing,DragDrop using the mouse.
Finally you will need to save this info (control type,position etc) in some type of file XML etc.
After all this you should have yourself a pretty fine GUI Editor.
Best of luck
Regards
Mick Curley
|
|
|
|
|
How to enable the C# windows service application write access to some folder and eventLogs
I created the simple service and in OnStart method written file write creation operation. It fails however.
Either adding eventLog.WriteEntry component without try/catch blocks in the OnStart method generates exception to Windows Applications Log as System.Security.SecurityException in System.Diagnostics.EventLog.WriteEntry()
Чесноков
|
|
|
|
|
What (user)account does your service use?
LocalSystem?
|
|
|
|
|
LocalService.
I found out that changing it LocalSystem, NetworkSystem created the file in windows\system32 directory.
Thus, creating file by providing the name, does not create it in the directory of the servise exe.
After I provided full path to the service dir with LocalService the file has been created.
However eventLog still does not work.
Чесноков
|
|
|
|
|
1. To have full access to all paths you want, just create a new user, give him all rights he should have and assign him to your service.
2. In my opinion your problem with the EventLog, has an other cause. Because normally LocalSystem has the
rights to access the EventLog and if you look at your installed services on your computer you will find many services working under LocalSystem and can write to EventLog.
So can you please provide your code you use to write to eventlog?
Greets Covean
|
|
|
|
|
Yes, after I changed to LocalSystem and the event logging worked.
BTW do you know how to interact with the service?
1) When I execute custom command using ServiceController from external app it throw exception that the service can not be manipulated.
2) Is there any way to retrieve the data from the service, e.g. return codes from command execution?
Чесноков
|
|
|
|
|
There are many ways to interact with your service.
1. Build a tiny TCP/IP server in your service and let your clients interact with this service.
To get started with this take a look at the .NET classes TcpListener, TcpClient and Socket.
2. Use interop-functions to interact with your service.
To get started with this, learn how to use one event in more then one application (CreateEvent, SetEvent, ResetEvent, CloseHandle) and how to map a shared memory block (CreateFileMapping, OpenFileMapping, MapViewOfFile, UnmapViewOfFile).
3. Use named pipes.
|
|
|
|
|
Anyone else run into this issue? I'm using a third-party system via an RCW-wrapped COM interface in a console app... When I try to clean up during a reconnect (It's a network interface to their servers), I'm running the following simple line on each component, in reverse order of instantiation:
if ([component] != null)
Marshal.FinalReleaseComObject([component]); Simple, right? Well, the trouble is that it's locking up solid at this point. It doesn't return or throw an exception. I've tried with the old-style ReleaseComObject (Which only decrements once), but it does the same thing.
I think it has something to do with the context, as this is a console application with 3-4 background threads (Will be turning it into a windows service), and this is running on a thread that was instantiated within the COM library.
Any ideas on how to make this thing return, or at least crash so I can handle and recover?
|
|
|
|
|
Hi All ...
I Have A Problem In Crystal Report
It's Apper blank Page betwwen 2 page
How I Can Solve This Problem ??
thanks
Thaer
|
|
|
|
|
Thaer Hamael wrote: How I Can Solve This Problem ??
Don't use Crystal Reports!
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Dear friends,
i would like to develop IRM (Information Rights management) appliction (server and client)
i do not know how to start and where to start ...
i like to develop in c# or c++,
at the most i prefer to develop in c#
can some one guide me?
please send me some links to startwith ..
thank U.
By
Joe.I
|
|
|
|
|
=>Joe<= wrote: please send me some links to startwith ..
You could try using Google to find them for yourself.
|
|
|
|
|
Dear Richard MacCutchan,
Thanks for your replay.
i have tried with google and i could find only "Windows share point server" it's configration and how to inherite it our programe.
i want to have my own server instade of buying "Windows share point server" want to have my own clinet..
if you have gone through somewhere like that please send the like.
thank U
By
Joe.I
|
|
|
|
|
=>Joe<= wrote: i want to have my own server instade of buying "Windows share point server" want to have my own clinet..
The scope of your request is far beyond what can be provided by this forum. It would take many man years of effort to develop such a system.
|
|
|
|
|
Dear Richard MacCutchan,
Thank You Very much .............
for your replay.
with Love
joe.I
|
|
|
|
|
Dear frineds ...
i have small clarification.
i am starting a word application like
process.start("a.doc");
and i have started
process.start("b.doc");
both runs in same process id (winword.exe) . how to make it two diffrent processs?
is is possible? please tell me.
any idea,link,suggestion ?
With love
Joe.I
|
|
|
|
|
This way:
Process.Start("winword","a.doc");
Process.Start("winword", "b.doc");
It's not necessary to be so stupid, either, but people manage it. - Christian Graus, 2009 AD
|
|
|
|