|
Hi i´m try to add a backgroundimage at the tab(top button)(no icon) but i can´t,and i would like to do that the backcolor of the tab is same at the tab page.thanks.
this link is similar but this link don´t paint the top button (tap).
http://www.codeproject.com/KB/tabs/GradientTabControlPackage.aspx"
|
|
|
|
|
You need to make it owner drawn and write your own code to draw the bitmap
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
yes i maked my code is this:
private void RepaintControls())
{
foreach (TabPage ctl in this.TabPages)
{
System.Drawing.Drawing2D.LinearGradientBrush gradBrush;
gradBrush = new System.Drawing.Drawing2D.LinearGradientBrush(new
Point(0, 0),
new Point(ctl.Width, ctl.Height), PageStartColor, PageEndColor);
Bitmap bmp = new Bitmap(ctl.Width, ctl.Height);
Graphics g = Graphics.FromImage(bmp);
g.FillRectangle(gradBrush, new Rectangle(0, 0, ctl.Width,
ctl.Height));
ctl.BackgroundImage = bmp;
ctl.BackgroundImageLayout = ImageLayout.Stretch;
}
}
is the same code to //www.codeproject.com/KB/tabs/GradientTabControlPackage.aspx
but i would add a backgroundimage at the top or the bitmap is same that the page color.how to ..?
|
|
|
|
|
I want to make a windows forms application(which would run on a client) which would contain a web browser, and this would link to some url(from a server) and load the page from there...
The page would contain some buttons and listboxes etc and when the user clicks on this, some processing should occur on the client side..
How can I do this?
For example suppose that the page to be displayed in the web browser from the server contains a textbox and two buttons (Get Machine Name) and (Submit)..
When the client clicks the Get Machine Name, the machine name of the client is fetched and put in the textbox in the web browser and when the client hits the Submit button, the text is forwarded to the server..
Can all this implemented???
|
|
|
|
|
Erhm, you can use the webbrowser control, drag it onto your form and use it's navigate() method to navigate to a certain webpage.
I think it's easier to fetch the machine name from code and pass it to the webpage using a querystring rather then trying to fetch the machine name from your webpage. You can insert the name as value of the textbox so users only need to hit the submit button...
|
|
|
|
|
That question was just a short example to know whether I can perform client side processing and send them along with the web browser..
Can we access the controls inside the web browser in the client side?
The textbox for example?
|
|
|
|
|
Not easily, but yes. You can inject javascript into the page, and interact with it, you can access and change the HTML using the DOM.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
You can access C# methods with JScript that are in a class which you set to com visible and point the Web Browser's ObjectForScripting Property[^]
-Spacix
All your skynet questions[ ^] belong to solved
I dislike the black-and-white voting system on questions/answers.
|
|
|
|
|
i have created a setup wizarad project............Setup file is working good..... But when we run it on a system that dont have >net Framework 2.0...... it asks for download.... i have added in dependencies of Setup project..... But asks download
What should i do to avoid download...... What i need is Framework should be install automatically
What should i do..
Thanks
|
|
|
|
|
Right Click on Setup Project -> Click on Prerequietic Button
Now check the Framework that is as dependency
Now , there should have three option button for Installing Framework
you can choose any one of theme.
Best Regards
-----------------
Abhijit Jana
"Success is Journey it's not a destination"
|
|
|
|
|
Hello,
there is a c# method perfoming some operations:
protected override bool checkDatalinkEntry(PlausicheckKernel.Datalink.DatalinkEntry entry, ref string msgReason, ref string msgReasonShort)
{
bool retValue;
Thread.CurrentThread.CurrentCulture.DateTimeFormat.FirstDayOfWeek = DayOfWeek.Sunday;
return retValue;
}
In addition, there is a unit test method which calls checkDatalinkEntry.
Calling the test method from main will work, but calling the test via nunit gui, System.InvalidOperationException is thrown (instance is write protected) at setting FirstDayOfWeek property.
Any idea on how to fix this? I don't want to modify my businesslogic (checkDatalinkEntry) for nunit..
thanks in advance
|
|
|
|
|
Dear friends.....
I build a project in VS2008 and want to use it on the differen computers.
it is working fine on my PC but when i try on some another system it generate an error try to send
error report to microsoft.
I have already installed .net fraamework 3.5 on the other system where i m trying.
Please help me what to do???
Deepak Nigam
|
|
|
|
|
How do you deploy your application? Make sure that all the necessary files such as referenced dlls and configuration file is copied on the other PC.
Giorgi Dalakishvili
#region signature
my articles
#endregion
|
|
|
|
|
Try a simple "Hello World!" application to see weather it's a Program error, or a problem with the Software on the other System.
-= Reelix =-
|
|
|
|
|
try to build a setup file from Setupproject and then try.
Best Regards
-----------------
Abhijit Jana
"Success is Journey it's not a destination"
|
|
|
|
|
Is there any way to start programs from the same folder as your C# program without getting a file not found exception? the only way I can seem to fix it is to put the other files into the root of C:\ and telling the program System.Diagnostics.Process.Start(@"C:\example.exe");. But the problem is I have an installer that puts all the files into "C:\program files\Random Title here". And that folder is what ever the user wants it to be, so I cant make my program predict that so just typeing System.Diagnostics.Process.Start(@"Example.exe"); gives me a file not found Exception unless i tell it to always install it "C:\". Any advice?
Y*Live Long And Prosper*Y
|
|
|
|
|
try use , FileInfo Property for a process.
and for Exe file , just give the file name only, no need to give .exe.
Thanks
Best Regards
-----------------
Abhijit Jana
"Success is Journey it's not a destination"
|
|
|
|
|
|
Try
System.Diagnostics.Process.Start(Application.StartupPath + @"\Example.exe");
-= Reelix =-
|
|
|
|
|
Hi
I have a test certificate on my system and i would like to place this on the clients store using c# code... Can we achieve this using X509Certificate class??
|
|
|
|
|
guys please help me solve this maze program
Problem
Create a simple Maze game. You must submit multiple iterations where each iteration is in its own directory and has associated structure charts, pseudo code, and flowcharts as required.
This game is played as follows:
1. The maze contains a number of Rooms.
2. A room has a title, a description, and a number of doors which lead to other rooms.
3. Each door leads in a direction (North, South, East or West). Tthere can be multiple exits in one direction.
4. One room is the goal or target, the game ends when the player reaches this room.
5. A player starts in the starting room, the first room declared in the maze, e.g. room 1, although this could be a parameter in the data file.
6. The player is shown the title and room description of the room he is in, as well as a list of exits, from which he can choose one to take.
7. When the player goes in a direction (through a door) he is in the next room, and step 6 above is repeated.
8. The rooms for the maze are read from a text file. The following map is for the accompanying text file.
9. The format of the text file is as follows:
a. The number of rooms (int)
b. The goal room number (int)
c. For each room
i. Room title (string)
ii. Room description (string)
d. Number of exits from rooms (int)
e. For each exit
i. From room (int), to room (int), direction (char, separated by spaces on a single line)
|
|
|
|
|
|
while (!endOfMaze)
{
DoMazeSolvingLogic();
}
-= Reelix =-
|
|
|
|
|
Ah, I remember writing something like that in Pascal on a PDP-11 back in college.
I used a breadth-first algorithm.
I also chose to write a progress log to the hard drive... filled the drive and crashed the system... Good times.
I see no purpose for "3. Each door leads in a direction (North, South, East or West)."
Good luck and have fun! I did!
|
|
|
|
|
Hi Guys. In my app that I am working on I am importing a csv file into a FileHelpers engine. I take the one field from the res and use it to look up a description for it in another function, validate pcode.
I then write the output of the res + prov to a textbox. I then write the textbox data to a .txt file using StreamWriter.
I need to keep count of the totals of each prov I find. There are a total of 9 provinces and I need to list a total of each province. Can sombody advise me on the easiest way of doiing this? Below my code.
This is where I do the validation to find the appropriate province.
My apologies for the lengthy post
private string SearchPcode(string inputStr)
{
string retval = "";
int pcode = 0;
if (!int.TryParse(inputStr, out pcode))
{
retval = "Invalid Integer!";
}
else if ((pcode >= 4731) && (pcode <= 6499))
{
retval = "Eastern Cape";
}
else if ((pcode >= 9300) && (pcode <= 9999))
{
retval = "Free State";
}
else if ((pcode >= 0001) && (pcode <= 0299)
|| (pcode >= 1400) && (pcode <= 2199))
{
retval = "Gauteng";
}
else if ((pcode >=2900) && (pcode <= 4730))
{
retval = "Kwazulu Natal";
}
else if ((pcode >= 0500) && (pcode <= 0999))
{
retval = "Limpopo";
}
else if ((pcode >= 1000) && (pcode <= 1399)
|| (pcode >= 2200) && (pcode <= 2499))
{
retval = "Mpumalanga";
}
else if ((pcode >= 0300) && (pcode <= 0499)
|| (pcode >= 2500) && (pcode <= 2899))
{
retval = "North West Province";
}
else if ((pcode >= 8100) && (pcode <= 8999))
{
retval = "Northern Cape";
}
else if ((pcode >= 6500) && (pcode <= 8099))
{
retval = "Western Cape";
}
else
{
retval = "Invalid PostCode";
}
return retval;
}
This is the import for the csv file where I instantiate the search for the province.
private void btnOpenFile_Click(object sender, EventArgs e)
{
txtboxDisplay.Text = "";
txtboxPcode.Text = "";
if (openFileDialog1.ShowDialog() != DialogResult.OK)
{
return;
}
else
{
txtboxSelectFile.Text = openFileDialog1.FileName;
}
string filePath;
filePath = txtboxSelectFile.Text;
FileHelperEngine<CsvImp> engine = new FileHelperEngine<CsvImp>();
engine.ErrorManager.ErrorMode = ErrorMode.SaveAndContinue;
CsvImp[] res = engine.ReadFile(filePath);
StreamWriter sw = new StreamWriter(@"C:\SOLZ_PROV_" +
DateTime.Now.ToString("ddMMyyhhmmss") + ".txt");
if (engine.ErrorManager.ErrorCount > 0)
engine.ErrorManager.SaveErrors("Errors.txt");
foreach (CsvImp imp in res)
{
string prov = SearchPcode(imp.CallComments);
txtboxDisplay.Text += imp.CompanyCode + "\t"
+ imp.CallType + "\t"
+ imp.CallComments.ToString()
+ "\t" + prov + Environment.NewLine;
}
sw.WriteLine(txtboxDisplay.Text);
sw.Close();
}
Please advise the easiest way of keeping track and writing the totals for each province.
Excellence is doing ordinary things extraordinarily well.
|
|
|
|