|
I've decided a course of action since my original posting of this afternoon. What I have done is gone into Photoshop and created my own form bitmap mask. I placed a simple(not really, it's rather complex ) border on the edge of the image so now I can set it to my background image and then set my formBorderStyle to None while still having a border. But, if I'm gonna go to all that trouble for a stupid border, I'm gonna go a little bit over the top, which I did. I cut out a shape for my form so that the upper left is at the standard border position (so I can put buttons for my form controls) but about a third the way from the left, I drop the edge down and run it to the far right side with a rounded corner.
(Now to my new issue) ...I've never tried this, so I'm kinda stuck and I can't find any info on it. My main form is an MDI parent, and the custom-shaped form with the transparency mask is a child. The transparency works, but instead of dropping the transparency to the background of the parent form, it performs full transparency and ends up falling through to my desktop background. Has anyone ever tried doing this and come up with a solution to this issue? ...Sometimes I really, really hate Windows : P (*Rumbling* ...I didn't mean it, I didn't mean it!!)
|
|
|
|
|
Are you that desperate? check the Form.Left property as I told you in my previous post!!
Regards
|
|
|
|
|
can someone send me a backtracking program solving sudoku puzzle
|
|
|
|
|
I'm sure there are many people here willing to do that for their normal hourly fee.
Oh wait, you wanted to get something for free without doing any work?
|
|
|
|
|
Hello
Did you seach the articles[^] first?
[edit]
First, welcome to CP. I know you are new here, but there are simple rules you must follow before posting in the forums. If you want to learn about a topic in general -as the case now- you should search the articles for samples and walkthroughs. The link I provided to you above should give you a good start. If you have a specific question about something you stuck in, you can post it in the appropriate forum.
May I suggest that you revise Chris' Posting Guidlines[^]. It should give you a good idea on how to post.
Regards
|
|
|
|
|
Dear jonathan
would you, could you, send me a backtracking student who does not post his assignments to the cpians?! I wish you could, you munkey turd, because every time i get student he posts assignments on cpians like a little cheatingers. now i will go sing an hindu lamentation over your failures as a human being.
Sincelery yours, Computer Information conSciences Professor and grader, Sharada Ulhas
|
|
|
|
|
make no doubt u must no, post homework assignments to cpian projectiles.
|
|
|
|
|
I have an XSD with a datatable called typedTable. There are 6 fields in that table.
First, Last, Address1, City, State, Zip.
I have datatable with a single record. Same column names in the table, except there is no value for the City, State, Zip.
First, Last, Address1, City, State, Zip.
I am trying to cast the [on the fly datatable] to the typedTable. I get the object ref error.. I have used the DataTable's writexml method and it wrote only the first 3 columns being there are no values in the last three.
Please advise,
Thanks in advance...
Shrini Viswanathan
|
|
|
|
|
try fill your dataset in code instead of reading and writing XML files.
|
|
|
|
|
static ArrayList Permute(int[] a,int start,int finish))
{
if(start!=finsh)
Permute(a,start+1,finish)
}
In this recursive function I need to add the int [] a(array) collection to array list and return the array list how can I do that?
(simply how to add values to a array list in a recursive function and the return the array list with all values)
like (
arraylist alist =new arraylist();
alist .add(1);
alist .add(2);
then return alist
but this wont work in recursive function like above
due
each time alist get reinitialized
|
|
|
|
|
I think that you don't want to do what you are asking for at all. I think that you want to create the ArrayList once, and use it in the recursive function.
Create the ArrayList before you call the recursive function, and pass the reference to the ArrayList as a parameter:
static void Permute(int[] a, int start, int finish, ArrayList results)) {
results.Add(a);
if (start != finish) {
Permute(a, start + 1, finish, results);
}
}
---
b { font-weight: normal; }
|
|
|
|
|
Hello
Again?!! Why do you insist on making it in a recursive call?? One line of code is enough:
ArrayList MyArrayList = new ArrayList(a);
If you insist, you can check if the ArrayList is already initialized before reinitializing it:
ArrayList alist;
static ArrayList Permute(int[] a, int start, int finish)
{
if(alist.Count == 0)
alist = new ArrayList()
alist.Add(1);
alist.Add(2);
if(start != finish)
Permute(a, start+1, finish)
return alist;
}
but I'm sure there is a much better way of doing whatever you are trying to do!! Please post more details about what you are trying to do, perhaps we code suggest a better approach.
Regards
|
|
|
|
|
Hey all,
I am trying to create a windows.forms.control object that has the resize function like a normal windows.form object (real-time windows.form size change displayed). Can anyone help me with it? I cannot find a way to do it, been searching for awhile and cannot find any way to do so.
Thanks in advance!
Tom
|
|
|
|
|
Hello
Well, I guess you have to do it manually!! Have a lok at this article[^].
Regards
|
|
|
|
|
Hey Nader
Thanks for your help!! I couldnt find it before!! Thx Thx
Tom
|
|
|
|
|
I have a DataGrid. I want to enable a "commit" button once the user modifies any column in the row. When user leaves that column (CurrentCellChanged event fires) -- I check the underlying DataSet for changes via DataSet.HasChanges(). If user has clicked anywhere outside of original row - still in grid or otherwise --- no problem. Problem is if user simply stays within the original row --- no changes have been detected by the dataset yet.
I have done some searching and found others with this problem, but haven't found a solution --- mostly frustrated comments as to why this appears to be so difficult. Anyone know how to detect that the datagrid has a change that is about to be committed to the dataset as soon as the user leaves the current row??
Thanks in advance.
John
|
|
|
|
|
Hello
The problem is -as I got from your post- that you want to detect changes made to the DatagridView -or was that DataGrid only?- when the user changes the content of one cell and moves to another cell within the same row, right??
Well, DatagridViews don't signal changes until you commit the current row to the current transaction. That means that until you actually leave the row, you still have a chance to cancel your changes. The unit of editting is the row, not the cell. So, if you want to narrow the spectrum of changes detection, you have to do it manually by handling events like CellEndEdit if you use .Net 2.0 framework.
Regards
|
|
|
|
|
Thanks Nader.
You've confirmed what I thought. And no, I'm using 2003 Vis Studio with 1.1, so don't seem to find the CellEndEdit event. I guess I can instruct users to do an extra click outside the row to enable the "commit" button. Not really sure why this wasn't as obvious to MS earlier but if I understand correctly, they've provided a solution in the newer version, but still with a little more intervention than maybe one should have to make.
It seems so natural that as soon as you make any change, the user should immediately have the ability to save the change -- i.e., shouldn't be told "click here so you can click someplace else".
Thanks again for your info.
John
|
|
|
|
|
"Hello Dear brother please read u'r mail and reply me a soon as possible. But u must reply. I am waiting. Have u read the mail?"
Syed Shahid Hussain
|
|
|
|
|
I've got a problem with this code in C#:
Controls[id + "gbR" + r].Controls[id + "rtbRunda" + r + "ABin"].ReadOnly = p;
The first Control is GroupBox, the second is RichTextBox, 'id' and 'r' is an integer. I want to change the ReadOnly property, but compilator throws na error: "'System.Windows.Forms.Control' does not contain a definition for 'ReadOnly'"
What should I do? I've tried some casting, but without success.
Thanx for any help!
|
|
|
|
|
Hello
You must cast your control first from Control type to RichTextBox type:
Control MyControl = Controls[id + "gbR" + r].Controls[id + "rtbRunda" + r + "ABin"];
if(MyControl is RichTextBox)
{
((RichTextBox)MyControl).ReadOnly = p;
}
else
{
}
Regards
|
|
|
|
|
Yes, it needs two pairs of parentheses, when casting, oh my...
((RichTextBox)Controls[id + "gbR" + r].Controls[id + "rtbRunda" + r + "ABin"]).ReadOnly = p;
Thanx for advice!
|
|
|
|
|
Hi Nader
Just a small nitpick, but the code you posted requires a double cast: one cast to check if the control is a RichTextBox, then another cast to cast it to a RichTextBox.
Here's a superior way to do it:
RichTextBox richTextBoxControl = myControl as RichTextBox;
if(richTextBoxControl != null)
{
richTextBoxControl.Readonly = p;
}
else
{
}
|
|
|
|
|
I have a remoting app that works fine when executed from a local hard drive, but will give "This assembly does not allow partially trusted callers" exception when executed from a network drive. The remoting app is used for transfering files. The code for server, shared assembly, and client:
<br />
<br />
using System;<br />
using System.Collections;<br />
using System.Collections.Generic;<br />
using System.Text;<br />
using System.Runtime.Remoting;<br />
using System.Runtime.Remoting.Channels;<br />
using System.Runtime.Remoting.Channels.Http;<br />
using System.IO;<br />
<br />
namespace RemotingTest<br />
{<br />
class Program<br />
{<br />
static void Main(string[] args)<br />
{<br />
IDictionary properties = new Hashtable();<br />
<br />
SoapClientFormatterSinkProvider clientSinkProvider = new SoapClientFormatterSinkProvider();<br />
SoapServerFormatterSinkProvider serverSinkProvider = new SoapServerFormatterSinkProvider();<br />
<br />
serverSinkProvider.TypeFilterLevel =<br />
System.Runtime.Serialization.Formatters.TypeFilterLevel.Full;<br />
<br />
properties["name"] = "";<br />
properties["port"] = 0;<br />
properties["typeFilterLevel"] = "Full";<br />
<br />
HttpChannel commChannel = new HttpChannel(properties, clientSinkProvider, serverSinkProvider);<br />
<br />
ChannelServices.RegisterChannel(commChannel, false);<br />
<br />
RemotingConfiguration.RegisterWellKnownClientType(<br />
typeof(ServerInterface),<br />
"http://igor.no-ip.ca:1024/Server");
<br />
ServerInterface server = new ServerInterface();<br />
<br />
string text = "";<br />
<br />
while((text = Console.ReadLine()) != "Quit")<br />
{<br />
Console.WriteLine(server.ShowText("testing string"));<br />
Console.WriteLine(server.ShowFileInfo(text).Name);<br />
}<br />
<br />
Console.Read();<br />
}<br />
}<br />
}<br />
<br />
<br />
<br />
<br />
using System;<br />
using System.Collections.Generic;<br />
using System.Text;<br />
using System.IO;<br />
<br />
namespace RemotingTest<br />
{<br />
public class ServerInterface: MarshalByRefObject<br />
{<br />
public FileInfo ShowFileInfo(string filename)<br />
{<br />
Console.WriteLine("Filename " + filename + " requested");<br />
<br />
return new FileInfo(filename);<br />
}<br />
<br />
public string ShowText(string text)<br />
{<br />
Console.WriteLine(text);<br />
<br />
return "\"" + text + "\" show on the server.";<br />
}<br />
}<br />
}<br />
<br />
<br />
<br />
<br />
using System;<br />
using System.Collections;<br />
using System.Collections.Generic;<br />
using System.Text;<br />
using System.Runtime.Remoting;<br />
using System.Runtime.Remoting.Channels;<br />
using System.Runtime.Remoting.Channels.Http;<br />
<br />
namespace RemotingTest<br />
{<br />
class Program<br />
{<br />
static void Main(string[] args)<br />
{<br />
IDictionary properties = new Hashtable();<br />
<br />
SoapServerFormatterSinkProvider serverSinkProvider = new SoapServerFormatterSinkProvider();<br />
<br />
serverSinkProvider.TypeFilterLevel =<br />
System.Runtime.Serialization.Formatters.TypeFilterLevel.Full;<br />
<br />
properties["name"] = "";<br />
properties["port"] = 1024;<br />
properties["typeFilterLevel"] = "Full";<br />
properties["machineName"] = "igor.no-ip.ca";
<br />
HttpChannel commChannel = new HttpChannel(properties, null, serverSinkProvider);<br />
<br />
ChannelServices.RegisterChannel(commChannel, false);<br />
<br />
RemotingConfiguration.RegisterWellKnownServiceType(<br />
typeof(ServerInterface),<br />
"Server", WellKnownObjectMode.SingleCall);<br />
<br />
Console.Read();<br />
}<br />
}<br />
}<br />
Please help.
|
|
|
|
|
If you want your application to allow partially trusted callers, go into AssemblyInfo.cs (typically auto-generated in the Properties folder of your solution) and add the following line:
[assembly: System.Security.AllowPartiallyTrustedCallers]
|
|
|
|