|
Thank you for replying but how do i paint it on the image... ???
|
|
|
|
|
Hi,
Graphics.FromImage() is what you want.
|
|
|
|
|
Thank you so much... it worked... prob. solved
|
|
|
|
|
Button User Control ?
I Need To Create a Button User Control as follow.
1. The Control must be based on the standard button control and a MS Common Dialog Control
2.The back color of the button must be exposed
3.When The Button is clicked, it must use the Common Dialog Control To Show The Color palette and allow the user to select a color for the form
4.The Button Must be Captioned 'Color Button'
5.The Button Must be Named 'ColorButton'
Please Feel Free To Email me on rynoeengelbrecht@webmail.co.za
Sampel Code Whould Help a lot
Thank
Your Help Will Really BE appreciated
|
|
|
|
|
If you're unable to attempt this yourself and post what you've done, perhaps this link can help.
Cheers!
Any suggestions, ideas, or 'constructive criticism' are always welcome.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
Will The Parts That i Am no getting right is
2.The back color of the button must be exposed
3.When The Button is clicked, it must use the Common Dialog Control To Show The Color palette and allow the user to select a color for the form
Help on This as i have never done somthing like this before
Regardes
Ryno Engelbrecht
|
|
|
|
|
Create a composite control where there is a button (or have a hotkey like a function button) to launch the common dialog control or ColorDialog - that handles opening the dialog.
Trap for when the ok button specifically is pressed and then update the backcolor on your control with the color selected by the user.
Any suggestions, ideas, or 'constructive criticism' are always welcome.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
I'm getting "Requested registry access is not allowed" error while trying to open the subkey.
I'm trying to set permissions for a particular subkey using registry class.
I want to set permissions for "HKLM\SYSTEM\CurrentControlSet\Services\USBSTOR\"
Currently for USBSTOR "everyone" is not added.
the code is as follows:
<br />
Imports System<br />
Imports System.Windows<br />
Imports System.Reflection<br />
Imports System.Runtime.InteropServices<br />
Imports System.Security<br />
Imports System.Security.Policy.ApplicationTrust<br />
Imports System.Security.Policy.CodeGroup<br />
Imports System.Security.Policy<br />
Imports System.Security.PermissionSet<br />
Imports System.Security.AccessControl<br />
Imports System.Security.Permissions<br />
Imports Microsoft.Win32<br />
Imports Microsoft.Win32.Registry<br />
Imports Registry.My.Resources<br />
Imports System.Collections<br />
Imports System.ComponentModel<br />
<br />
<Assembly: PermissionSetAttribute(SecurityAction.RequestMinimum, Name:="FullTrust")> <br />
<br />
Public Class USB_Storage<br />
<br />
Private Const reg_key_a As String = "SYSTEM\CurrentControlSet\Services\USBSTOR\"<br />
<br />
<br />
Private Sub btnEnable_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnEnable.Click<br />
<br />
Dim rk As RegistryKey = Registry.My.Computer.Registry.LocalMachine<br />
<br />
Dim user As String = "everyone"<br />
Dim rs As New RegistrySecurity()<br />
rs.AddAccessRule(New RegistryAccessRule(user, _<br />
RegistryRights.WriteKey, _<br />
InheritanceFlags.None, _<br />
PropagationFlags.None, _<br />
AccessControlType.Allow))<br />
<br />
rk.OpenSubKey(reg_key_a, True).SetAccessControl(rs)<br />
<br />
End Sub<br />
<br />
End Class<br />
Please suggest.. thanks in advance.
- Musthafa
|
|
|
|
|
Is your app running under an administrator account?
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
Unless the account that's running your code is in the Administrators group, this won't work. Users don't have write permissions to anything under HKEY_LOCAL_MACHINE.
|
|
|
|
|
i have created a timer job..which inserts a new item in the list name sunil.
..
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.SharePoint.Administration;
using Microsoft.SharePoint;
namespace Moss_job_insert
{
public class Insert: SPJobDefinition
{
public Insert()
{
}
public Insert(string jobName, SPWebApplication webApplication)
: base(jobName, webApplication, null, SPJobLockType.ContentDatabase)
{
this.Title = "Moss_job_insert";
}
public override void Execute(Guid targetInstanceId)
{
SPSite site = new SPSite("http://punib10070:24674/");
SPWeb web = site.OpenWeb();
//web.AllowUnsafeUpdates();
SPList list = web.Lists["sunil"];
SPQuery sbq = new SPQuery();
SPListItemCollection Icoll = list.GetItems(sbq);
web.AllowUnsafeUpdates = true;
SPListItem item = list.Items.Add(); ;
item["ename"] = "sharma";
item.Update();
}
}
}
....
and created a console application which has create job().
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.SharePoint.Administration;
using Microsoft.SharePoint;
using Moss_job_insert;
namespace job_insert_cnfg
{
class Program
{
static void Main(string[] args)
{
Createjob();
DisplayJobs();
}
public static void DisplayJobs()
{
using (SPSite site = new SPSite("http://punib10070:24674"))
{
foreach (SPJobDefinition job in site.WebApplication.JobDefinitions)
{
Console.WriteLine("--------------------------------");
Console.WriteLine("Job Title: " + job.Title);
Console.WriteLine("Schedule: " + job.Schedule.ToString());
Console.WriteLine("Last Run At: " + job.LastRunTime.ToString());
Console.WriteLine("Is job Enabled: " + job.IsDisabled.ToString());
Console.WriteLine("Job Display Name: " + job.DisplayName);
Console.WriteLine("-----------------------------------------");
Console.WriteLine("");
}
}
Console.ReadKey();
}
public static void Createjob()
{
SPServer myServer = SPServer.Local;
SPSite mySite = new SPSite("http://punib10070:24674/");
SPWebApplication myApplication = mySite.WebApplication;
SPJobDefinitionCollection myJobsColl = myApplication.JobDefinitions;
Insert jobinsert = new Insert("Moss_insert", myApplication);
SPMinuteSchedule SPM = new SPMinuteSchedule();
SPM.BeginSecond = 0;
SPM.EndSecond = 50;
SPM.Interval = 2;
jobinsert.Schedule = SPM;
myJobsColl.Add(jobinsert);
jobinsert.Update();
myApplication.Update();
}
}
}
i have added dll of my assembly Moss_job_insert in GAC..
restart IIS.
when i run this console application...
my job gets created..but while execution it fails..
JOB status :FAILED..
any one plz help ..
|
|
|
|
|
I am working on an SDK. The SDK supports plug-ins. The issue I am running into is when I test a new build of the SDK, none of the Plug-ins will load. The reason they will not load is that they were developed with v2.1.5689.0 of the SDK. Since I do nightly builds of the SDK, it is now v2.1.5690.0 and the plug-in will not bind to it. I understand that they might not work if there were some interface change or such, but there typically is not. Is there a setting I can use in the plug-in project to cause it to bind to the major and minor number only in the version (OK, maybe the path as well, but definitely not the build).
Tanks for your support
Pat O
<a href="http://currentchaos.blogspot.com/">Blog</a>
_ _ _
|
|
|
|
|
On a WinForm I'm working on I want to draw attention to two particular controls.
One is a TextBox and I can set the BackColor property.
The other is a DateTimePicker, and...
"
Setting the BackColor has no effect on the appearance of the DateTimePicker. To set the background color for the drop-down calendar of the DateTimePicker, see the CalendarMonthBackground property.
"
I don't want to set the background color for the drop-down calendar, in fact I'm setting ShowUpDown to true so the drop-down calendar won't be available anyway.
This particular application is just a test bed for a class I'm debugging, so it isn't worth deriving a custom DateTimePicker or using a third-party control. That's why this is a rant. However, if anyone has a simple solution I'd like to hear it in case this comes up again in the future... as it likely will.
|
|
|
|
|
Why not put the DateTime picker in a Panel that's slightly larger and set the color of the panel? That would give you a bit of a border and you could even 'flash' it if you wanted to.
|
|
|
|
|
Yeah, I might do that, thanks.
|
|
|
|
|
i want a calendar like this :
1、you can type the date by youselfe when you type the data , control can show details eg:you type the month it can show the month in calendar control .
2、we can select the date with mouse no keyboard.
how can i do it .somebody can help me ! thanks very much!
|
|
|
|
|
I don't know of a way. Try posting it as a new message so more people see it.
|
|
|
|
|
Hi,
I'm looking for an ECMAScript-327 (ie ECMAScript Compact Profile) interpreter for the .Net Compact Framework, to run on a WinCE platform. Do you have any idea where I could find this ? I saw (but didn't further investigate) ecmascript-net[^] - do you think this may be useful for me? Any other trick I may try ?
Thanks
Sebastien
|
|
|
|
|
Well from what it says on the page "EcmaScript.NET is an open-source implementation of EcmaScript based on Rhino (JavaScript for Java) written entirely in C#." it sounds like it's exactly what you want.
Only you know your requirements though, so you should download it and give it a try.
Come up with a list of what you absolutely must have it do, and then test everything on your list.
Simon
|
|
|
|
|
Today I tried to remove all memory leaks from my application.
I used the tool .net memory profiler.
Some of my objects that use a datagridview are not collected by the garbage collection.
I searched google and there are a lot of hits with that problem,
not all for datagridview but this one seems to be the same problem:
f.e. :
http://www.scitech.se/blog/index.php/2007/10/05/memory-leak-in-toolstriptextboxcontrol/[^]
There's a static event "UserPreferenceChangedEventHandler" which is not unregistered in the right way.(it's the same event with my objects)
The article describes a workaround which uses reflection to unregister manually from the events.
I did a much easier workaround:
Just called dispose on the eventslist of the datagridview if my objects are deleted.
f.e.
mObject.dataGridView1.Events.Dispose()
This seems to work well!?
The objects are collected by the garbage collection after I do so!
Do you think this is ok?
Or do you have another solution for that problem!
I found nothing on msdn.
Thanks for any help!
|
|
|
|
|
LocalReport.Render method is working for less number of pages.
but when we try for more number of pages (say 20,000) we are getting "Server Application UnAvailable"
Any Alternate method for this?
Please help us , this is very urgent.
Thanks inadvance.
|
|
|
|
|
I am having the same problem, when you find the solution tell me please
|
|
|
|
|
Hi Guys,
I'm looking for a way to store resources in a secure centralized file. The idea is to imitate how Zip files work in windows where you can get a path like:
C:\Temp\MyTemp.zip\MyWebpage.html
I can't map a path directly into a zip, but this is what I'd like to achieve.
Does anyone have any ideas how to achieve this result?
Regards
Tris
-------------------------------
Carrier Bags - 21st Century Tumbleweed.
|
|
|
|
|
Get out your Visual C++ and Windows DDK skills and start writing an IFS, or Installable File System. This is an NTFS extension that manages, you guessed it, an alternate File System.
|
|
|
|
|
I have not the skillz
-------------------------------
Carrier Bags - 21st Century Tumbleweed.
|
|
|
|